diff --git a/.sdk-version b/.sdk-version index 21f74272..8aa2922b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v4.75.0 +v4.77.1 diff --git a/README.md b/README.md index cd302c21..44ff86f8 100644 --- a/README.md +++ b/README.md @@ -123,13 +123,13 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**insert_analysis_log**](docs/AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis *AnalysesCoreApi* | [**list_analyses**](docs/AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses *AnalysesCoreApi* | [**lookup_binary_id**](docs/AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID -*AnalysesCoreApi* | [**put_analysis_strings**](docs/AnalysesCoreApi.md#put_analysis_strings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis *AnalysesCoreApi* | [**requeue_analysis**](docs/AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis *AnalysesCoreApi* | [**start_analysis_function_matching**](docs/AnalysesCoreApi.md#start_analysis_function_matching) | **POST** /v3/analyses/{analysis_id}/functions/matches | Start function matching for an analysis *AnalysesCoreApi* | [**update_analysis**](docs/AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis *AnalysesCoreApi* | [**update_analysis_tags**](docs/AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags *AnalysesCoreApi* | [**upload_file**](docs/AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File *AnalysesCoreApi* | [**v3_create_analysis**](docs/AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis +*AnalysesCoreApi* | [**v3_create_dynamic_execution_run**](docs/AnalysesCoreApi.md#v3_create_dynamic_execution_run) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs | Start a dynamic execution run. *AnalysesCoreApi* | [**v3_delete_analysis**](docs/AnalysesCoreApi.md#v3_delete_analysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. *AnalysesCoreApi* | [**v3_download_binary_export**](docs/AnalysesCoreApi.md#v3_download_binary_export) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export *AnalysesCoreApi* | [**v3_get_analysis**](docs/AnalysesCoreApi.md#v3_get_analysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. @@ -142,30 +142,31 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**v3_get_analysis_strings**](docs/AnalysesCoreApi.md#v3_get_analysis_strings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. *AnalysesCoreApi* | [**v3_get_analysis_strings_status**](docs/AnalysesCoreApi.md#v3_get_analysis_strings_status) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. *AnalysesCoreApi* | [**v3_get_binary_export_operation**](docs/AnalysesCoreApi.md#v3_get_binary_export_operation) | **GET** /v3/operations/binary-export/{task_id} | Get a binary export operation -*AnalysesCoreApi* | [**v3_get_dynamic_execution_artifact**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_artifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256} | Download an artifact. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_logs_download**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_logs_download) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/logs/download | Download the execution logs archive. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_memdump**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_memdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256} | Download a memory dump. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_operation**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_operation) | **GET** /v3/operations/dynamic-execution/{analysis_id} | Get a dynamic execution operation. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_pcap**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_pcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/pcap | Download the network capture. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_report**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_report) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/report | Get the dynamic execution report. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_screenshot**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_screenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index} | Download a screenshot. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_summary**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_summary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/summary | Get the dynamic execution summary. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_summary_operation**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_summary_operation) | **GET** /v3/operations/dynamic-execution-summary/{analysis_id} | Get a dynamic execution summary operation. -*AnalysesCoreApi* | [**v3_get_dynamic_execution_wireshark_keys**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_wireshark_keys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys | Download Wireshark TLS session keys. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_operation**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_operation) | **GET** /v3/operations/dynamic-execution/{run_id} | Get a dynamic execution operation. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id} | Get a dynamic execution run. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_artifact**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_artifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256} | Download a run's artifact. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_logs_download**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_logs_download) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download | Download a run's execution logs archive. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_memdump**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_memdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256} | Download a run's memory dump. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_pcap**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_pcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap | Download a run's network capture. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_report**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_report) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report | Get a run's dynamic execution report. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_screenshot**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_screenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index} | Download a run's screenshot. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_summary**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_summary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary | Get a run's dynamic execution summary. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_run_wireshark_keys**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_run_wireshark_keys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys | Download a run's Wireshark TLS session keys. +*AnalysesCoreApi* | [**v3_get_dynamic_execution_summary_operation**](docs/AnalysesCoreApi.md#v3_get_dynamic_execution_summary_operation) | **GET** /v3/operations/dynamic-execution-summary/{run_id} | Get a dynamic execution summary operation. *AnalysesCoreApi* | [**v3_grant_analysis_access**](docs/AnalysesCoreApi.md#v3_grant_analysis_access) | **POST** /v3/analyses/{analysis_id}/access-rules | Share an analysis with a user or team *AnalysesCoreApi* | [**v3_list_analyses**](docs/AnalysesCoreApi.md#v3_list_analyses) | **GET** /v3/analyses | List analyses *AnalysesCoreApi* | [**v3_list_analysis_access_rules**](docs/AnalysesCoreApi.md#v3_list_analysis_access_rules) | **GET** /v3/analyses/{analysis_id}/access-rules | List who an analysis is shared with *AnalysesCoreApi* | [**v3_list_analysis_globals**](docs/AnalysesCoreApi.md#v3_list_analysis_globals) | **GET** /v3/analyses/{analysis_id}/globals | List the global variables in an analysis. *AnalysesCoreApi* | [**v3_list_analysis_operations**](docs/AnalysesCoreApi.md#v3_list_analysis_operations) | **GET** /v3/analyses/{analysis_id}/operations | List the operations run on an analysis. -*AnalysesCoreApi* | [**v3_list_dynamic_execution_screenshots**](docs/AnalysesCoreApi.md#v3_list_dynamic_execution_screenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots | List the screenshots captured during execution. +*AnalysesCoreApi* | [**v3_list_dynamic_execution_run_screenshots**](docs/AnalysesCoreApi.md#v3_list_dynamic_execution_run_screenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots | List a run's screenshots. +*AnalysesCoreApi* | [**v3_list_dynamic_execution_runs**](docs/AnalysesCoreApi.md#v3_list_dynamic_execution_runs) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs | List the dynamic execution runs. *AnalysesCoreApi* | [**v3_list_example_analyses**](docs/AnalysesCoreApi.md#v3_list_example_analyses) | **GET** /v3/analyses/examples | List example analyses *AnalysesCoreApi* | [**v3_list_global_functions**](docs/AnalysesCoreApi.md#v3_list_global_functions) | **GET** /v3/analyses/{analysis_id}/globals/{vaddr}/functions | List the functions referencing a global variable. *AnalysesCoreApi* | [**v3_lookup_analysis_by_binary_id**](docs/AnalysesCoreApi.md#v3_lookup_analysis_by_binary_id) | **GET** /v3/analyses/lookup/{binary_id} | Look up the most recent analysis for a binary. *AnalysesCoreApi* | [**v3_queue_binary_export**](docs/AnalysesCoreApi.md#v3_queue_binary_export) | **POST** /v3/analyses/{analysis_id}/binary-export | Queue a binary export *AnalysesCoreApi* | [**v3_requeue_analysis**](docs/AnalysesCoreApi.md#v3_requeue_analysis) | **POST** /v3/analyses/{analysis_id}/requeue | Requeue an analysis *AnalysesCoreApi* | [**v3_revoke_analysis_access**](docs/AnalysesCoreApi.md#v3_revoke_analysis_access) | **DELETE** /v3/analyses/{analysis_id}/access-rules | Stop sharing an analysis with a user or team -*AnalysesCoreApi* | [**v3_run_dynamic_execution**](docs/AnalysesCoreApi.md#v3_run_dynamic_execution) | **POST** /v3/analyses/{analysis_id}/dynamic-execution:run | Trigger a dynamic execution run. -*AnalysesCoreApi* | [**v3_run_dynamic_execution_summary**](docs/AnalysesCoreApi.md#v3_run_dynamic_execution_summary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/summary:run | Regenerate the dynamic execution summary. +*AnalysesCoreApi* | [**v3_run_dynamic_execution_run_summary**](docs/AnalysesCoreApi.md#v3_run_dynamic_execution_run_summary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run | Regenerate a run's dynamic execution summary. *AnalysesCoreApi* | [**v3_search_tags**](docs/AnalysesCoreApi.md#v3_search_tags) | **GET** /v3/tags | Search tags *AnalysesCoreApi* | [**v3_update_analysis**](docs/AnalysesCoreApi.md#v3_update_analysis) | **PATCH** /v3/analyses/{analysis_id} | Update an analysis. *AnalysesCoreApi* | [**v3_update_analysis_global**](docs/AnalysesCoreApi.md#v3_update_analysis_global) | **PATCH** /v3/analyses/{analysis_id}/globals/{vaddr} | Edit a global variable. @@ -175,9 +176,11 @@ Class | Method | HTTP request | Description *AnalysesResultsMetadataApi* | [**get_capabilities**](docs/AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis *AnalysesResultsMetadataApi* | [**get_functions_list**](docs/AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis *AnalysesResultsMetadataApi* | [**get_tags**](docs/AnalysesResultsMetadataApi.md#get_tags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score +*AnalysesResultsMetadataApi* | [**v3_get_analysis_feedback**](docs/AnalysesResultsMetadataApi.md#v3_get_analysis_feedback) | **GET** /v3/analyses/{analysis_id}/feedback/{type} | Get the caller's feedback on an analysis. *AnalysesResultsMetadataApi* | [**v3_get_analysis_xref**](docs/AnalysesResultsMetadataApi.md#v3_get_analysis_xref) | **GET** /v3/analyses/{analysis_id}/xrefs/{vaddr} | Look up xrefs by virtual address. *AnalysesResultsMetadataApi* | [**v3_list_analysis_capabilities**](docs/AnalysesResultsMetadataApi.md#v3_list_analysis_capabilities) | **GET** /v3/analyses/{analysis_id}/capabilities | List the capabilities found in an analysis. *AnalysesResultsMetadataApi* | [**v3_list_analysis_tags**](docs/AnalysesResultsMetadataApi.md#v3_list_analysis_tags) | **GET** /v3/analyses/{analysis_id}/tags | List the tags on an analysis. +*AnalysesResultsMetadataApi* | [**v3_upsert_analysis_feedback**](docs/AnalysesResultsMetadataApi.md#v3_upsert_analysis_feedback) | **PUT** /v3/analyses/{analysis_id}/feedback/{type} | Record feedback on an analysis. *AnalysesXRefsApi* | [**get_xref_by_vaddr**](docs/AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address *AuthenticationUsersApi* | [**get_user**](docs/AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**get_user_activity**](docs/AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity @@ -188,6 +191,7 @@ Class | Method | HTTP request | Description *AuthenticationUsersApi* | [**v3_list_teams**](docs/AuthenticationUsersApi.md#v3_list_teams) | **GET** /v3/teams | Search teams *AuthenticationUsersApi* | [**v3_list_users**](docs/AuthenticationUsersApi.md#v3_list_users) | **GET** /v3/users | Search users *AuthenticationUsersApi* | [**v3_submit_user_feedback**](docs/AuthenticationUsersApi.md#v3_submit_user_feedback) | **POST** /v3/users/feedback | Submit feedback +*BillingApi* | [**v3_get_credit_estimates**](docs/BillingApi.md#v3_get_credit_estimates) | **GET** /v3/credit-estimates | Get credit estimates. *BinariesApi* | [**download_zipped_binary**](docs/BinariesApi.md#download_zipped_binary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**get_binary_additional_details**](docs/BinariesApi.md#get_binary_additional_details) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary *BinariesApi* | [**get_binary_additional_details_0**](docs/BinariesApi.md#get_binary_additional_details_0) | **GET** /v3/binaries/{binary_id}/additional-details | Get additional details for a binary. @@ -203,6 +207,7 @@ Class | Method | HTTP request | Description *BinariesApi* | [**v3_get_binary_externals**](docs/BinariesApi.md#v3_get_binary_externals) | **GET** /v3/binaries/{binary_id}/externals | Get third-party threat-intel lookups for a binary. *BinariesApi* | [**v3_get_binary_related**](docs/BinariesApi.md#v3_get_binary_related) | **GET** /v3/binaries/{binary_id}/related | Get the binaries related to this one by unpacking. *BinariesApi* | [**v3_get_binary_related_status**](docs/BinariesApi.md#v3_get_binary_related_status) | **GET** /v3/binaries/{binary_id}/related/status | Get the archive-unpacking status for a binary. +*BinariesApi* | [**v3_list_malware_families**](docs/BinariesApi.md#v3_list_malware_families) | **GET** /v3/malware-families | Look up the malware families of binaries in the RevEng.AI malware corpus. *BinariesApi* | [**v3_search_binaries**](docs/BinariesApi.md#v3_search_binaries) | **GET** /v3/binaries | Search binaries *BinariesApi* | [**v3_upload_file**](docs/BinariesApi.md#v3_upload_file) | **POST** /v3/upload | Upload a file. *CollectionsApi* | [**create_collection**](docs/CollectionsApi.md#create_collection) | **POST** /v2/collections | Creates new collection information @@ -269,8 +274,6 @@ Class | Method | HTTP request | Description *FunctionsAIDecompilationApi* | [**v3_upsert_ai_decompilation_rating**](docs/FunctionsAIDecompilationApi.md#v3_upsert_ai_decompilation_rating) | **PATCH** /v3/functions/{function_id}/ai-decompilation/rating | Upsert AI decompilation rating *FunctionsCoreApi* | [**add_function_callee**](docs/FunctionsCoreApi.md#add_function_callee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function *FunctionsCoreApi* | [**add_user_string_to_function**](docs/FunctionsCoreApi.md#add_user_string_to_function) | **POST** /v3/functions/{function_id}/user-provided-strings | Add a user-provided string to a function. -*FunctionsCoreApi* | [**get_analysis_strings**](docs/FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis -*FunctionsCoreApi* | [**get_analysis_strings_status**](docs/FunctionsCoreApi.md#get_analysis_strings_status) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis *FunctionsCoreApi* | [**get_function_blocks**](docs/FunctionsCoreApi.md#get_function_blocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function *FunctionsCoreApi* | [**get_function_blocks_0**](docs/FunctionsCoreApi.md#get_function_blocks_0) | **GET** /v3/functions/{function_id}/blocks | Get function disassembly *FunctionsCoreApi* | [**get_function_callees_callers**](docs/FunctionsCoreApi.md#get_function_callees_callers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function @@ -281,8 +284,7 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**get_function_details**](docs/FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details *FunctionsCoreApi* | [**get_function_details_0**](docs/FunctionsCoreApi.md#get_function_details_0) | **GET** /v3/functions/{function_id} | Get function details *FunctionsCoreApi* | [**get_function_indirect_call_sites**](docs/FunctionsCoreApi.md#get_function_indirect_call_sites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function -*FunctionsCoreApi* | [**get_function_strings**](docs/FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -*FunctionsCoreApi* | [**get_function_strings_0**](docs/FunctionsCoreApi.md#get_function_strings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. +*FunctionsCoreApi* | [**get_function_strings**](docs/FunctionsCoreApi.md#get_function_strings) | **GET** /v3/functions/{function_id}/strings | List strings for a function. *FunctionsCoreApi* | [**get_functions_callees_callers**](docs/FunctionsCoreApi.md#get_functions_callees_callers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions *FunctionsCoreApi* | [**get_functions_matches**](docs/FunctionsCoreApi.md#get_functions_matches) | **GET** /v3/functions/matches | Get function-matching results for an explicit set of functions *FunctionsCoreApi* | [**get_functions_matching_status**](docs/FunctionsCoreApi.md#get_functions_matching_status) | **GET** /v3/functions/matches/status | Get function-matching status for an explicit set of functions @@ -292,8 +294,10 @@ Class | Method | HTTP request | Description *FunctionsCoreApi* | [**start_functions_matching**](docs/FunctionsCoreApi.md#start_functions_matching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions *FunctionsCoreApi* | [**v3_canonicalize_function_names**](docs/FunctionsCoreApi.md#v3_canonicalize_function_names) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names *FunctionsCoreApi* | [**v3_get_analysis_func_maps**](docs/FunctionsCoreApi.md#v3_get_analysis_func_maps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis +*FunctionsCoreApi* | [**v3_get_function_feedback**](docs/FunctionsCoreApi.md#v3_get_function_feedback) | **GET** /v3/functions/{function_id}/feedback/{type} | Get the caller's feedback on a function. *FunctionsCoreApi* | [**v3_list_function_globals**](docs/FunctionsCoreApi.md#v3_list_function_globals) | **GET** /v3/functions/{function_id}/globals | List the global variables a function references. *FunctionsCoreApi* | [**v3_search_functions**](docs/FunctionsCoreApi.md#v3_search_functions) | **GET** /v3/functions | Search functions +*FunctionsCoreApi* | [**v3_upsert_function_feedback**](docs/FunctionsCoreApi.md#v3_upsert_function_feedback) | **PUT** /v3/functions/{function_id}/feedback/{type} | Record feedback on a function. *FunctionsRenamingHistoryApi* | [**batch_rename_function**](docs/FunctionsRenamingHistoryApi.md#batch_rename_function) | **POST** /v2/functions/rename/batch | Batch Rename Functions *FunctionsRenamingHistoryApi* | [**batch_rename_functions**](docs/FunctionsRenamingHistoryApi.md#batch_rename_functions) | **POST** /v3/functions/rename | Batch rename functions *FunctionsRenamingHistoryApi* | [**get_function_history**](docs/FunctionsRenamingHistoryApi.md#get_function_history) | **GET** /v3/functions/{function_id}/history | Get function name history @@ -386,10 +390,7 @@ Class | Method | HTTP request | Description - [AnalysisRequirement](docs/AnalysisRequirement.md) - [AnalysisScope](docs/AnalysisScope.md) - [AnalysisStringFunction](docs/AnalysisStringFunction.md) - - [AnalysisStringInput](docs/AnalysisStringInput.md) - [AnalysisStringItem](docs/AnalysisStringItem.md) - - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) - - [AnalysisStringsStatusResponse](docs/AnalysisStringsStatusResponse.md) - [AnalysisTagBody](docs/AnalysisTagBody.md) - [AnalysisTags](docs/AnalysisTags.md) - [AnalysisTagsOutputBody](docs/AnalysisTagsOutputBody.md) @@ -402,8 +403,6 @@ Class | Method | HTTP request | Description - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) - - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) - [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md) - [ArchiveContentEntry](docs/ArchiveContentEntry.md) - [ArrayDataType](docs/ArrayDataType.md) @@ -423,8 +422,6 @@ Class | Method | HTTP request | Description - [BaseResponseAnalysisFunctionMapping](docs/BaseResponseAnalysisFunctionMapping.md) - [BaseResponseAnalysisFunctions](docs/BaseResponseAnalysisFunctions.md) - [BaseResponseAnalysisFunctionsList](docs/BaseResponseAnalysisFunctionsList.md) - - [BaseResponseAnalysisStringsResponse](docs/BaseResponseAnalysisStringsResponse.md) - - [BaseResponseAnalysisStringsStatusResponse](docs/BaseResponseAnalysisStringsStatusResponse.md) - [BaseResponseAnalysisTags](docs/BaseResponseAnalysisTags.md) - [BaseResponseAnalysisUpdateTagsResponse](docs/BaseResponseAnalysisUpdateTagsResponse.md) - [BaseResponseBasic](docs/BaseResponseBasic.md) @@ -449,7 +446,6 @@ Class | Method | HTTP request | Description - [BaseResponseFunctionBlocksResponse](docs/BaseResponseFunctionBlocksResponse.md) - [BaseResponseFunctionCapabilityResponse](docs/BaseResponseFunctionCapabilityResponse.md) - [BaseResponseFunctionSearchResponse](docs/BaseResponseFunctionSearchResponse.md) - - [BaseResponseFunctionStringsResponse](docs/BaseResponseFunctionStringsResponse.md) - [BaseResponseFunctionsDetailResponse](docs/BaseResponseFunctionsDetailResponse.md) - [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md) - [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md) @@ -482,7 +478,6 @@ Class | Method | HTTP request | Description - [BatchRenameItem](docs/BatchRenameItem.md) - [BatchRenameOutputBody](docs/BatchRenameOutputBody.md) - [BinariesRelatedStatusResponse](docs/BinariesRelatedStatusResponse.md) - - [BinariesTaskStatus](docs/BinariesTaskStatus.md) - [Binary](docs/Binary.md) - [BinaryAdditionalDetailsDataResponse](docs/BinaryAdditionalDetailsDataResponse.md) - [BinaryAdditionalResponse](docs/BinaryAdditionalResponse.md) @@ -522,6 +517,7 @@ Class | Method | HTTP request | Description - [CapabilitiesResult](docs/CapabilitiesResult.md) - [Capability](docs/Capability.md) - [CapabilityEntry](docs/CapabilityEntry.md) + - [CapabilityImplementation](docs/CapabilityImplementation.md) - [ChildBinariesResponse](docs/ChildBinariesResponse.md) - [CodeSignatureModel](docs/CodeSignatureModel.md) - [CollectionBinariesUpdateRequest](docs/CollectionBinariesUpdateRequest.md) @@ -598,6 +594,7 @@ Class | Method | HTTP request | Description - [CryptoScanMetadata](docs/CryptoScanMetadata.md) - [CryptoScanResult](docs/CryptoScanResult.md) - [CryptoVerification](docs/CryptoVerification.md) + - [CurrentUser](docs/CurrentUser.md) - [DailyAnalysesCountOutputBody](docs/DailyAnalysesCountOutputBody.md) - [DailyCountBody](docs/DailyCountBody.md) - [DataTypeEntry](docs/DataTypeEntry.md) @@ -612,6 +609,7 @@ Class | Method | HTTP request | Description - [DecompilationData](docs/DecompilationData.md) - [DecompilerSummary](docs/DecompilerSummary.md) - [DecompilerSummaryEvidence](docs/DecompilerSummaryEvidence.md) + - [DeleteMeBody](docs/DeleteMeBody.md) - [DieMatch](docs/DieMatch.md) - [DisassemblyOutputBody](docs/DisassemblyOutputBody.md) - [DisassemblySummaryEvidence](docs/DisassemblySummaryEvidence.md) @@ -620,6 +618,8 @@ Class | Method | HTTP request | Description - [DrakvufFileMetadata](docs/DrakvufFileMetadata.md) - [DynamicExecutionMetadata](docs/DynamicExecutionMetadata.md) - [DynamicExecutionResult](docs/DynamicExecutionResult.md) + - [DynamicExecutionRun](docs/DynamicExecutionRun.md) + - [DynamicExecutionRunConfig](docs/DynamicExecutionRunConfig.md) - [DynamicExecutionStatus](docs/DynamicExecutionStatus.md) - [DynamicExecutionSummary](docs/DynamicExecutionSummary.md) - [DynamicExecutionSummaryMetadata](docs/DynamicExecutionSummaryMetadata.md) @@ -689,6 +689,7 @@ Class | Method | HTTP request | Description - [ExtractedURL](docs/ExtractedURL.md) - [ExtractionFailure](docs/ExtractionFailure.md) - [FeedbackOutputBody](docs/FeedbackOutputBody.md) + - [FeedbackSubmission](docs/FeedbackSubmission.md) - [FileActivityEntry](docs/FileActivityEntry.md) - [FileFormat](docs/FileFormat.md) - [FileHashes](docs/FileHashes.md) @@ -708,6 +709,7 @@ Class | Method | HTTP request | Description - [FindingCountsBody](docs/FindingCountsBody.md) - [FindingEvidenceInner](docs/FindingEvidenceInner.md) - [FormFile](docs/FormFile.md) + - [Function](docs/Function.md) - [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md) - [FunctionBlockResponse](docs/FunctionBlockResponse.md) - [FunctionBlocksResponse](docs/FunctionBlocksResponse.md) @@ -734,9 +736,7 @@ Class | Method | HTTP request | Description - [FunctionSimilarity](docs/FunctionSimilarity.md) - [FunctionSimilarityEvidence](docs/FunctionSimilarityEvidence.md) - [FunctionSourceType](docs/FunctionSourceType.md) - - [FunctionString](docs/FunctionString.md) - [FunctionStringItem](docs/FunctionStringItem.md) - - [FunctionStringsResponse](docs/FunctionStringsResponse.md) - [FunctionTypeDefinition](docs/FunctionTypeDefinition.md) - [FunctionUsage](docs/FunctionUsage.md) - [FunctionsDetailResponse](docs/FunctionsDetailResponse.md) @@ -752,6 +752,7 @@ Class | Method | HTTP request | Description - [GetBinaryExternalsOutputBody](docs/GetBinaryExternalsOutputBody.md) - [GetCollectionOutputBody](docs/GetCollectionOutputBody.md) - [GetConfigOutputBody](docs/GetConfigOutputBody.md) + - [GetCreditEstimatesOutputBody](docs/GetCreditEstimatesOutputBody.md) - [GetDataTypeHistoryBody](docs/GetDataTypeHistoryBody.md) - [GetDieInfoOutputBody](docs/GetDieInfoOutputBody.md) - [GetFindingOutputBody](docs/GetFindingOutputBody.md) @@ -811,6 +812,7 @@ Class | Method | HTTP request | Description - [ListCollectionsOutputBody](docs/ListCollectionsOutputBody.md) - [ListConversationsOutputBody](docs/ListConversationsOutputBody.md) - [ListDataTypeFunctionsBody](docs/ListDataTypeFunctionsBody.md) + - [ListDynamicExecutionRunsOutputBody](docs/ListDynamicExecutionRunsOutputBody.md) - [ListExampleAnalysesOutputBody](docs/ListExampleAnalysesOutputBody.md) - [ListFindingsOutputBody](docs/ListFindingsOutputBody.md) - [ListFunctionGlobalsOutputBody](docs/ListFunctionGlobalsOutputBody.md) @@ -819,6 +821,7 @@ Class | Method | HTTP request | Description - [ListGlobalFunctionsOutputBody](docs/ListGlobalFunctionsOutputBody.md) - [ListImportedFunctionsOutputBody](docs/ListImportedFunctionsOutputBody.md) - [ListInvestigationsOutputBody](docs/ListInvestigationsOutputBody.md) + - [ListMalwareFamiliesOutputBody](docs/ListMalwareFamiliesOutputBody.md) - [ListOperationPrerequisitesOutputBody](docs/ListOperationPrerequisitesOutputBody.md) - [ListPrincipalsOutputBody](docs/ListPrincipalsOutputBody.md) - [ListPublicUsersOutputBody](docs/ListPublicUsersOutputBody.md) @@ -830,6 +833,7 @@ Class | Method | HTTP request | Description - [Logs](docs/Logs.md) - [LookupAnalysisByBinaryIDOutputBody](docs/LookupAnalysisByBinaryIDOutputBody.md) - [MITRETechnique](docs/MITRETechnique.md) + - [MalwareFamily](docs/MalwareFamily.md) - [MatchFilters](docs/MatchFilters.md) - [MatchedFunction](docs/MatchedFunction.md) - [MemdumpEntry](docs/MemdumpEntry.md) @@ -859,6 +863,7 @@ Class | Method | HTTP request | Description - [OIDCCallbackInputBody](docs/OIDCCallbackInputBody.md) - [OperandXref](docs/OperandXref.md) - [OperationBinaryExportMetadataBinaryExportResult](docs/OperationBinaryExportMetadataBinaryExportResult.md) + - [OperationCostBody](docs/OperationCostBody.md) - [OperationCreateMetadataCreateResult](docs/OperationCreateMetadataCreateResult.md) - [OperationCryptoExplainMetadataCryptoExplainResult](docs/OperationCryptoExplainMetadataCryptoExplainResult.md) - [OperationCryptoScanMetadataCryptoScanResult](docs/OperationCryptoScanMetadataCryptoScanResult.md) @@ -917,11 +922,11 @@ Class | Method | HTTP request | Description - [ProtocolsAgentResponse](docs/ProtocolsAgentResponse.md) - [PublicTeamBody](docs/PublicTeamBody.md) - [PublicUserBody](docs/PublicUserBody.md) - - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [RatingOutputBody](docs/RatingOutputBody.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) + - [RecordedFeedback](docs/RecordedFeedback.md) - [ReferencedConstant](docs/ReferencedConstant.md) - [ReferencedConstantEvidence](docs/ReferencedConstantEvidence.md) - [RefreshBody](docs/RefreshBody.md) @@ -1008,6 +1013,7 @@ Class | Method | HTTP request | Description - [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md) - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) - [SingleSectionModel](docs/SingleSectionModel.md) + - [SizeBucketBody](docs/SizeBucketBody.md) - [SoftwareTypeCountsBody](docs/SoftwareTypeCountsBody.md) - [SourceDeltaEvent](docs/SourceDeltaEvent.md) - [SourceResetEvent](docs/SourceResetEvent.md) @@ -1044,10 +1050,8 @@ Class | Method | HTTP request | Description - [StepStartedData](docs/StepStartedData.md) - [StreamAiDecompilation200ResponseInner](docs/StreamAiDecompilation200ResponseInner.md) - [StreamEvents200ResponseInner](docs/StreamEvents200ResponseInner.md) - - [StringFunctions](docs/StringFunctions.md) - [StringMatch](docs/StringMatch.md) - [StringMatchEvidence](docs/StringMatchEvidence.md) - - [StringSource](docs/StringSource.md) - [StructDataType](docs/StructDataType.md) - [StructDefinition](docs/StructDefinition.md) - [Subject](docs/Subject.md) diff --git a/docs/AgentApi.md b/docs/AgentApi.md index 14a0c0cc..91e694b1 100644 --- a/docs/AgentApi.md +++ b/docs/AgentApi.md @@ -3742,7 +3742,7 @@ This endpoint does not need any parameter. Run the capabilities agent. -Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3750,6 +3750,7 @@ Starts the capabilities agent, which attributes behavioural capabilities to indi - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -3937,13 +3938,14 @@ Name | Type | Description | Notes Run the crypto-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. +Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4036,7 +4038,7 @@ Name | Type | Description | Notes Run the cryptography agent. -Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4044,6 +4046,7 @@ Starts the cryptography agent, which identifies cryptographic operations in the - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4234,13 +4237,14 @@ Name | Type | Description | Notes Run the execution-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4433,13 +4437,14 @@ Name | Type | Description | Notes Run the filesystem-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. +Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4632,13 +4637,14 @@ Name | Type | Description | Notes Run the networking-scan agent. -Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. +Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4731,7 +4737,7 @@ Name | Type | Description | Notes Run the protocols agent. -Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4739,6 +4745,7 @@ Starts the protocols agent, which identifies the network and data protocols the - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4829,7 +4836,7 @@ Name | Type | Description | Notes Run the remediation agent. -Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4837,6 +4844,7 @@ Starts the remediation agent, which generates YARA, Snort and STIX detection rul - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -4927,7 +4935,7 @@ Name | Type | Description | Notes Run the report-analysis agent. -Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4935,6 +4943,7 @@ Starts the report-analysis agent, which produces a combined threat report — su - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -5025,7 +5034,7 @@ Name | Type | Description | Notes Run the secrets agent. -Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. +Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -5033,6 +5042,7 @@ Starts the secrets agent, which finds credentials and other hardcoded secrets in - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -5123,13 +5133,14 @@ Name | Type | Description | Notes Run the security-scan agent. -Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. +Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -5223,7 +5234,7 @@ Name | Type | Description | Notes Run the triage agent. -Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. +Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -5231,6 +5242,7 @@ Starts the triage agent, which scores the binary and each of its functions for m - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -5321,13 +5333,14 @@ Name | Type | Description | Notes Run the rename-unnamed-functions agent. -Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. +Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index a9a6da2b..960628c4 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -19,13 +19,13 @@ Method | HTTP request | Description [**insert_analysis_log**](AnalysesCoreApi.md#insert_analysis_log) | **POST** /v2/analyses/{analysis_id}/logs | Insert a log entry for an analysis [**list_analyses**](AnalysesCoreApi.md#list_analyses) | **GET** /v2/analyses/list | Gets the most recent analyses [**lookup_binary_id**](AnalysesCoreApi.md#lookup_binary_id) | **GET** /v2/analyses/lookup/{binary_id} | Gets the analysis ID from binary ID -[**put_analysis_strings**](AnalysesCoreApi.md#put_analysis_strings) | **PUT** /v2/analyses/{analysis_id}/strings | Add strings to the analysis [**requeue_analysis**](AnalysesCoreApi.md#requeue_analysis) | **POST** /v2/analyses/{analysis_id}/requeue | Requeue Analysis [**start_analysis_function_matching**](AnalysesCoreApi.md#start_analysis_function_matching) | **POST** /v3/analyses/{analysis_id}/functions/matches | Start function matching for an analysis [**update_analysis**](AnalysesCoreApi.md#update_analysis) | **PATCH** /v2/analyses/{analysis_id} | Update Analysis [**update_analysis_tags**](AnalysesCoreApi.md#update_analysis_tags) | **PATCH** /v2/analyses/{analysis_id}/tags | Update Analysis Tags [**upload_file**](AnalysesCoreApi.md#upload_file) | **POST** /v2/upload | Upload File [**v3_create_analysis**](AnalysesCoreApi.md#v3_create_analysis) | **POST** /v3/analyses | Create an analysis +[**v3_create_dynamic_execution_run**](AnalysesCoreApi.md#v3_create_dynamic_execution_run) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs | Start a dynamic execution run. [**v3_delete_analysis**](AnalysesCoreApi.md#v3_delete_analysis) | **DELETE** /v3/analyses/{analysis_id} | Delete an analysis. [**v3_download_binary_export**](AnalysesCoreApi.md#v3_download_binary_export) | **GET** /v3/analyses/{analysis_id}/binary-export | Download a binary export [**v3_get_analysis**](AnalysesCoreApi.md#v3_get_analysis) | **GET** /v3/analyses/{analysis_id} | Get an analysis. @@ -38,30 +38,31 @@ Method | HTTP request | Description [**v3_get_analysis_strings**](AnalysesCoreApi.md#v3_get_analysis_strings) | **GET** /v3/analyses/{analysis_id}/functions/strings | List strings for an analysis. [**v3_get_analysis_strings_status**](AnalysesCoreApi.md#v3_get_analysis_strings_status) | **GET** /v3/analyses/{analysis_id}/functions/strings/status | Get the string-extraction status for an analysis. [**v3_get_binary_export_operation**](AnalysesCoreApi.md#v3_get_binary_export_operation) | **GET** /v3/operations/binary-export/{task_id} | Get a binary export operation -[**v3_get_dynamic_execution_artifact**](AnalysesCoreApi.md#v3_get_dynamic_execution_artifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256} | Download an artifact. -[**v3_get_dynamic_execution_logs_download**](AnalysesCoreApi.md#v3_get_dynamic_execution_logs_download) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/logs/download | Download the execution logs archive. -[**v3_get_dynamic_execution_memdump**](AnalysesCoreApi.md#v3_get_dynamic_execution_memdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256} | Download a memory dump. -[**v3_get_dynamic_execution_operation**](AnalysesCoreApi.md#v3_get_dynamic_execution_operation) | **GET** /v3/operations/dynamic-execution/{analysis_id} | Get a dynamic execution operation. -[**v3_get_dynamic_execution_pcap**](AnalysesCoreApi.md#v3_get_dynamic_execution_pcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/pcap | Download the network capture. -[**v3_get_dynamic_execution_report**](AnalysesCoreApi.md#v3_get_dynamic_execution_report) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/report | Get the dynamic execution report. -[**v3_get_dynamic_execution_screenshot**](AnalysesCoreApi.md#v3_get_dynamic_execution_screenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index} | Download a screenshot. -[**v3_get_dynamic_execution_summary**](AnalysesCoreApi.md#v3_get_dynamic_execution_summary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/summary | Get the dynamic execution summary. -[**v3_get_dynamic_execution_summary_operation**](AnalysesCoreApi.md#v3_get_dynamic_execution_summary_operation) | **GET** /v3/operations/dynamic-execution-summary/{analysis_id} | Get a dynamic execution summary operation. -[**v3_get_dynamic_execution_wireshark_keys**](AnalysesCoreApi.md#v3_get_dynamic_execution_wireshark_keys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys | Download Wireshark TLS session keys. +[**v3_get_dynamic_execution_operation**](AnalysesCoreApi.md#v3_get_dynamic_execution_operation) | **GET** /v3/operations/dynamic-execution/{run_id} | Get a dynamic execution operation. +[**v3_get_dynamic_execution_run**](AnalysesCoreApi.md#v3_get_dynamic_execution_run) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id} | Get a dynamic execution run. +[**v3_get_dynamic_execution_run_artifact**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_artifact) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256} | Download a run's artifact. +[**v3_get_dynamic_execution_run_logs_download**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_logs_download) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download | Download a run's execution logs archive. +[**v3_get_dynamic_execution_run_memdump**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_memdump) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256} | Download a run's memory dump. +[**v3_get_dynamic_execution_run_pcap**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_pcap) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap | Download a run's network capture. +[**v3_get_dynamic_execution_run_report**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_report) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report | Get a run's dynamic execution report. +[**v3_get_dynamic_execution_run_screenshot**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_screenshot) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index} | Download a run's screenshot. +[**v3_get_dynamic_execution_run_summary**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_summary) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary | Get a run's dynamic execution summary. +[**v3_get_dynamic_execution_run_wireshark_keys**](AnalysesCoreApi.md#v3_get_dynamic_execution_run_wireshark_keys) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys | Download a run's Wireshark TLS session keys. +[**v3_get_dynamic_execution_summary_operation**](AnalysesCoreApi.md#v3_get_dynamic_execution_summary_operation) | **GET** /v3/operations/dynamic-execution-summary/{run_id} | Get a dynamic execution summary operation. [**v3_grant_analysis_access**](AnalysesCoreApi.md#v3_grant_analysis_access) | **POST** /v3/analyses/{analysis_id}/access-rules | Share an analysis with a user or team [**v3_list_analyses**](AnalysesCoreApi.md#v3_list_analyses) | **GET** /v3/analyses | List analyses [**v3_list_analysis_access_rules**](AnalysesCoreApi.md#v3_list_analysis_access_rules) | **GET** /v3/analyses/{analysis_id}/access-rules | List who an analysis is shared with [**v3_list_analysis_globals**](AnalysesCoreApi.md#v3_list_analysis_globals) | **GET** /v3/analyses/{analysis_id}/globals | List the global variables in an analysis. [**v3_list_analysis_operations**](AnalysesCoreApi.md#v3_list_analysis_operations) | **GET** /v3/analyses/{analysis_id}/operations | List the operations run on an analysis. -[**v3_list_dynamic_execution_screenshots**](AnalysesCoreApi.md#v3_list_dynamic_execution_screenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/screenshots | List the screenshots captured during execution. +[**v3_list_dynamic_execution_run_screenshots**](AnalysesCoreApi.md#v3_list_dynamic_execution_run_screenshots) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots | List a run's screenshots. +[**v3_list_dynamic_execution_runs**](AnalysesCoreApi.md#v3_list_dynamic_execution_runs) | **GET** /v3/analyses/{analysis_id}/dynamic-execution/runs | List the dynamic execution runs. [**v3_list_example_analyses**](AnalysesCoreApi.md#v3_list_example_analyses) | **GET** /v3/analyses/examples | List example analyses [**v3_list_global_functions**](AnalysesCoreApi.md#v3_list_global_functions) | **GET** /v3/analyses/{analysis_id}/globals/{vaddr}/functions | List the functions referencing a global variable. [**v3_lookup_analysis_by_binary_id**](AnalysesCoreApi.md#v3_lookup_analysis_by_binary_id) | **GET** /v3/analyses/lookup/{binary_id} | Look up the most recent analysis for a binary. [**v3_queue_binary_export**](AnalysesCoreApi.md#v3_queue_binary_export) | **POST** /v3/analyses/{analysis_id}/binary-export | Queue a binary export [**v3_requeue_analysis**](AnalysesCoreApi.md#v3_requeue_analysis) | **POST** /v3/analyses/{analysis_id}/requeue | Requeue an analysis [**v3_revoke_analysis_access**](AnalysesCoreApi.md#v3_revoke_analysis_access) | **DELETE** /v3/analyses/{analysis_id}/access-rules | Stop sharing an analysis with a user or team -[**v3_run_dynamic_execution**](AnalysesCoreApi.md#v3_run_dynamic_execution) | **POST** /v3/analyses/{analysis_id}/dynamic-execution:run | Trigger a dynamic execution run. -[**v3_run_dynamic_execution_summary**](AnalysesCoreApi.md#v3_run_dynamic_execution_summary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/summary:run | Regenerate the dynamic execution summary. +[**v3_run_dynamic_execution_run_summary**](AnalysesCoreApi.md#v3_run_dynamic_execution_run_summary) | **POST** /v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run | Regenerate a run's dynamic execution summary. [**v3_search_tags**](AnalysesCoreApi.md#v3_search_tags) | **GET** /v3/tags | Search tags [**v3_update_analysis**](AnalysesCoreApi.md#v3_update_analysis) | **PATCH** /v3/analyses/{analysis_id} | Update an analysis. [**v3_update_analysis_global**](AnalysesCoreApi.md#v3_update_analysis_global) | **PATCH** /v3/analyses/{analysis_id}/globals/{vaddr} | Edit a global variable. @@ -74,11 +75,12 @@ Method | HTTP request | Description Add a user-provided string to an analysis. -Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. +Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -159,6 +161,7 @@ Name | Type | Description | Notes **201** | Created | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | @@ -1440,95 +1443,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **put_analysis_strings** -> BaseResponse put_analysis_strings(analysis_id, put_analysis_strings_request) - -Add strings to the analysis - -Add strings to the analysis. Rejects if any string already exists at the given vaddr. - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response import BaseResponse -from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesCoreApi(api_client) - analysis_id = 56 # int | - put_analysis_strings_request = revengai.PutAnalysisStringsRequest() # PutAnalysisStringsRequest | - - try: - # Add strings to the analysis - api_response = api_instance.put_analysis_strings(analysis_id, put_analysis_strings_request) - print("The response of AnalysesCoreApi->put_analysis_strings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->put_analysis_strings: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - **put_analysis_strings_request** | [**PutAnalysisStringsRequest**](PutAnalysisStringsRequest.md)| | - -### Return type - -[**BaseResponse**](BaseResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **requeue_analysis** > BaseResponseCreated requeue_analysis(analysis_id, re_analysis_form, x_rev_eng_application=x_rev_eng_application) @@ -1627,12 +1541,13 @@ Name | Type | Description | Notes Start function matching for an analysis -Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. +Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -1715,6 +1630,7 @@ Name | Type | Description | Notes **400** | Bad Request | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | @@ -2093,6 +2009,104 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_create_dynamic_execution_run** +> OperationDynamicExecutionMetadataDynamicExecutionResult v3_create_dynamic_execution_run(analysis_id, run_dynamic_execution_input_body=run_dynamic_execution_input_body) + +Start a dynamic execution run. + +Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult +from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + run_dynamic_execution_input_body = revengai.RunDynamicExecutionInputBody() # RunDynamicExecutionInputBody | (optional) + + try: + # Start a dynamic execution run. + api_response = api_instance.v3_create_dynamic_execution_run(analysis_id, run_dynamic_execution_input_body=run_dynamic_execution_input_body) + print("The response of AnalysesCoreApi->v3_create_dynamic_execution_run:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->v3_create_dynamic_execution_run: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **run_dynamic_execution_input_body** | [**RunDynamicExecutionInputBody**](RunDynamicExecutionInputBody.md)| | [optional] + +### Return type + +[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**400** | Bad Request | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_delete_analysis** > v3_delete_analysis(analysis_id) @@ -3223,17 +3237,16 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_artifact** -> v3_get_dynamic_execution_artifact(analysis_id, sha256, filename=filename) +# **v3_get_dynamic_execution_operation** +> OperationDynamicExecutionMetadataDynamicExecutionResult v3_get_dynamic_execution_operation(run_id) -Download an artifact. +Get a dynamic execution operation. -Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). +Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example @@ -3242,6 +3255,100 @@ Streams a file extracted during execution (filesystem, memory, or network), addr ```python import revengai +from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + run_id = 'run_id_example' # str | Dynamic execution run ID + + try: + # Get a dynamic execution operation. + api_response = api_instance.v3_get_dynamic_execution_operation(run_id) + print("The response of AnalysesCoreApi->v3_get_dynamic_execution_operation:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_operation: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **run_id** | **str**| Dynamic execution run ID | + +### Return type + +[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **v3_get_dynamic_execution_run** +> DynamicExecutionRun v3_get_dynamic_execution_run(analysis_id, run_id) + +Get a dynamic execution run. + +Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.dynamic_execution_run import DynamicExecutionRun from revengai.rest import ApiException from pprint import pprint @@ -3272,14 +3379,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID - sha256 = 'sha256_example' # str | SHA-256 hex digest of the artifact - filename = 'filename_example' # str | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Download an artifact. - api_instance.v3_get_dynamic_execution_artifact(analysis_id, sha256, filename=filename) + # Get a dynamic execution run. + api_response = api_instance.v3_get_dynamic_execution_run(analysis_id, run_id) + print("The response of AnalysesCoreApi->v3_get_dynamic_execution_run:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_artifact: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run: %s\n" % e) ``` @@ -3290,12 +3398,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **sha256** | **str**| SHA-256 hex digest of the artifact | - **filename** | **str**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] + **run_id** | **str**| Dynamic execution run ID | ### Return type -void (empty response body) +[**DynamicExecutionRun**](DynamicExecutionRun.md) ### Authorization @@ -3313,18 +3420,17 @@ void (empty response body) **200** | OK | - | **403** | Forbidden | - | **404** | Not Found | - | -**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_logs_download** -> v3_get_dynamic_execution_logs_download(analysis_id) +# **v3_get_dynamic_execution_run_artifact** +> v3_get_dynamic_execution_run_artifact(analysis_id, run_id, sha256, filename=filename) -Download the execution logs archive. +Download a run's artifact. -Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. +Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3368,12 +3474,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID + sha256 = 'sha256_example' # str | SHA-256 hex digest of the artifact + filename = 'filename_example' # str | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) try: - # Download the execution logs archive. - api_instance.v3_get_dynamic_execution_logs_download(analysis_id) + # Download a run's artifact. + api_instance.v3_get_dynamic_execution_run_artifact(analysis_id, run_id, sha256, filename=filename) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_logs_download: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_artifact: %s\n" % e) ``` @@ -3384,6 +3493,9 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | + **sha256** | **str**| SHA-256 hex digest of the artifact | + **filename** | **str**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] ### Return type @@ -3411,12 +3523,12 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_memdump** -> v3_get_dynamic_execution_memdump(analysis_id, sha256, filename=filename) +# **v3_get_dynamic_execution_run_logs_download** +> v3_get_dynamic_execution_run_logs_download(analysis_id, run_id) -Download a memory dump. +Download a run's execution logs archive. -Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). +Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3460,14 +3572,13 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID - sha256 = 'sha256_example' # str | SHA-256 hex digest of the artifact - filename = 'filename_example' # str | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Download a memory dump. - api_instance.v3_get_dynamic_execution_memdump(analysis_id, sha256, filename=filename) + # Download a run's execution logs archive. + api_instance.v3_get_dynamic_execution_run_logs_download(analysis_id, run_id) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_memdump: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_logs_download: %s\n" % e) ``` @@ -3478,8 +3589,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | - **sha256** | **str**| SHA-256 hex digest of the artifact | - **filename** | **str**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -3507,16 +3617,17 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_operation** -> OperationDynamicExecutionMetadataDynamicExecutionResult v3_get_dynamic_execution_operation(analysis_id) +# **v3_get_dynamic_execution_run_memdump** +> v3_get_dynamic_execution_run_memdump(analysis_id, run_id, sha256, filename=filename) -Get a dynamic execution operation. +Download a run's memory dump. -Returns the current state of the most recently triggered dynamic execution run for this analysis. +Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example @@ -3525,7 +3636,6 @@ Returns the current state of the most recently triggered dynamic execution run f ```python import revengai -from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult from revengai.rest import ApiException from pprint import pprint @@ -3556,14 +3666,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID + sha256 = 'sha256_example' # str | SHA-256 hex digest of the artifact + filename = 'filename_example' # str | Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. (optional) try: - # Get a dynamic execution operation. - api_response = api_instance.v3_get_dynamic_execution_operation(analysis_id) - print("The response of AnalysesCoreApi->v3_get_dynamic_execution_operation:\n") - pprint(api_response) + # Download a run's memory dump. + api_instance.v3_get_dynamic_execution_run_memdump(analysis_id, run_id, sha256, filename=filename) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_operation: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_memdump: %s\n" % e) ``` @@ -3574,10 +3685,13 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | + **sha256** | **str**| SHA-256 hex digest of the artifact | + **filename** | **str**| Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. | [optional] ### Return type -[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) +void (empty response body) ### Authorization @@ -3595,17 +3709,18 @@ Name | Type | Description | Notes **200** | OK | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_pcap** -> v3_get_dynamic_execution_pcap(analysis_id) +# **v3_get_dynamic_execution_run_pcap** +> v3_get_dynamic_execution_run_pcap(analysis_id, run_id) -Download the network capture. +Download a run's network capture. -Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. +Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3649,12 +3764,13 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Download the network capture. - api_instance.v3_get_dynamic_execution_pcap(analysis_id) + # Download a run's network capture. + api_instance.v3_get_dynamic_execution_run_pcap(analysis_id, run_id) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_pcap: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_pcap: %s\n" % e) ``` @@ -3665,6 +3781,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -3692,12 +3809,12 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_report** -> AnalysisReport v3_get_dynamic_execution_report(analysis_id) +# **v3_get_dynamic_execution_run_report** +> AnalysisReport v3_get_dynamic_execution_run_report(analysis_id, run_id) -Get the dynamic execution report. +Get a run's dynamic execution report. -Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. +Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3742,14 +3859,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Get the dynamic execution report. - api_response = api_instance.v3_get_dynamic_execution_report(analysis_id) - print("The response of AnalysesCoreApi->v3_get_dynamic_execution_report:\n") + # Get a run's dynamic execution report. + api_response = api_instance.v3_get_dynamic_execution_run_report(analysis_id, run_id) + print("The response of AnalysesCoreApi->v3_get_dynamic_execution_run_report:\n") pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_report: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_report: %s\n" % e) ``` @@ -3760,6 +3878,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -3787,12 +3906,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_screenshot** -> v3_get_dynamic_execution_screenshot(analysis_id, index) +# **v3_get_dynamic_execution_run_screenshot** +> v3_get_dynamic_execution_run_screenshot(analysis_id, run_id, index) -Download a screenshot. +Download a run's screenshot. -Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. +Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -3836,13 +3955,14 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID index = 56 # int | Index of the screenshot, as listed by the screenshots endpoint try: - # Download a screenshot. - api_instance.v3_get_dynamic_execution_screenshot(analysis_id, index) + # Download a run's screenshot. + api_instance.v3_get_dynamic_execution_run_screenshot(analysis_id, run_id, index) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_screenshot: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_screenshot: %s\n" % e) ``` @@ -3853,6 +3973,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | **index** | **int**| Index of the screenshot, as listed by the screenshots endpoint | ### Return type @@ -3881,10 +4002,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_summary** -> DynamicExecutionSummary v3_get_dynamic_execution_summary(analysis_id) +# **v3_get_dynamic_execution_run_summary** +> DynamicExecutionSummary v3_get_dynamic_execution_run_summary(analysis_id, run_id) -Get the dynamic execution summary. +Get a run's dynamic execution summary. Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. @@ -3931,14 +4052,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Get the dynamic execution summary. - api_response = api_instance.v3_get_dynamic_execution_summary(analysis_id) - print("The response of AnalysesCoreApi->v3_get_dynamic_execution_summary:\n") + # Get a run's dynamic execution summary. + api_response = api_instance.v3_get_dynamic_execution_run_summary(analysis_id, run_id) + print("The response of AnalysesCoreApi->v3_get_dynamic_execution_run_summary:\n") pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_summary: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_summary: %s\n" % e) ``` @@ -3949,6 +4071,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -3976,16 +4099,17 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_summary_operation** -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3_get_dynamic_execution_summary_operation(analysis_id) +# **v3_get_dynamic_execution_run_wireshark_keys** +> v3_get_dynamic_execution_run_wireshark_keys(analysis_id, run_id) -Get a dynamic execution summary operation. +Download a run's Wireshark TLS session keys. -Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. +Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied +- `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example @@ -3994,7 +4118,6 @@ Returns the state of the most recent summary attempt for this analysis, whether ```python import revengai -from revengai.models.operation_dynamic_execution_summary_metadata_dynamic_execution_summary_result import OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult from revengai.rest import ApiException from pprint import pprint @@ -4025,14 +4148,13 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Get a dynamic execution summary operation. - api_response = api_instance.v3_get_dynamic_execution_summary_operation(analysis_id) - print("The response of AnalysesCoreApi->v3_get_dynamic_execution_summary_operation:\n") - pprint(api_response) + # Download a run's Wireshark TLS session keys. + api_instance.v3_get_dynamic_execution_run_wireshark_keys(analysis_id, run_id) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_summary_operation: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_run_wireshark_keys: %s\n" % e) ``` @@ -4043,10 +4165,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type -[**OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult**](OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult.md) +void (empty response body) ### Authorization @@ -4064,22 +4187,22 @@ Name | Type | Description | Notes **200** | OK | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_get_dynamic_execution_wireshark_keys** -> v3_get_dynamic_execution_wireshark_keys(analysis_id) +# **v3_get_dynamic_execution_summary_operation** +> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3_get_dynamic_execution_summary_operation(run_id) -Download Wireshark TLS session keys. +Get a dynamic execution summary operation. -Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. +Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete ### Example @@ -4088,6 +4211,7 @@ Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in ```python import revengai +from revengai.models.operation_dynamic_execution_summary_metadata_dynamic_execution_summary_result import OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult from revengai.rest import ApiException from pprint import pprint @@ -4117,13 +4241,15 @@ configuration = revengai.Configuration( with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) - analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Download Wireshark TLS session keys. - api_instance.v3_get_dynamic_execution_wireshark_keys(analysis_id) + # Get a dynamic execution summary operation. + api_response = api_instance.v3_get_dynamic_execution_summary_operation(run_id) + print("The response of AnalysesCoreApi->v3_get_dynamic_execution_summary_operation:\n") + pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_wireshark_keys: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_get_dynamic_execution_summary_operation: %s\n" % e) ``` @@ -4133,11 +4259,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type -void (empty response body) +[**OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult**](OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult.md) ### Authorization @@ -4155,7 +4281,6 @@ void (empty response body) **200** | OK | - | **403** | Forbidden | - | **404** | Not Found | - | -**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | @@ -4580,7 +4705,7 @@ Name | Type | Description | Notes List the operations run on an analysis. -Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. +Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4668,12 +4793,12 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_list_dynamic_execution_screenshots** -> ScreenshotsIndex v3_list_dynamic_execution_screenshots(analysis_id) +# **v3_list_dynamic_execution_run_screenshots** +> ScreenshotsIndex v3_list_dynamic_execution_run_screenshots(analysis_id, run_id) -List the screenshots captured during execution. +List a run's screenshots. -Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. +Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -4718,14 +4843,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # List the screenshots captured during execution. - api_response = api_instance.v3_list_dynamic_execution_screenshots(analysis_id) - print("The response of AnalysesCoreApi->v3_list_dynamic_execution_screenshots:\n") + # List a run's screenshots. + api_response = api_instance.v3_list_dynamic_execution_run_screenshots(analysis_id, run_id) + print("The response of AnalysesCoreApi->v3_list_dynamic_execution_run_screenshots:\n") pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_list_dynamic_execution_screenshots: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_list_dynamic_execution_run_screenshots: %s\n" % e) ``` @@ -4736,6 +4862,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -4763,6 +4890,99 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_list_dynamic_execution_runs** +> ListDynamicExecutionRunsOutputBody v3_list_dynamic_execution_runs(analysis_id) + +List the dynamic execution runs. + +Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.list_dynamic_execution_runs_output_body import ListDynamicExecutionRunsOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesCoreApi(api_client) + analysis_id = 56 # int | Analysis ID + + try: + # List the dynamic execution runs. + api_response = api_instance.v3_list_dynamic_execution_runs(analysis_id) + print("The response of AnalysesCoreApi->v3_list_dynamic_execution_runs:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesCoreApi->v3_list_dynamic_execution_runs: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + +### Return type + +[**ListDynamicExecutionRunsOutputBody**](ListDynamicExecutionRunsOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_list_example_analyses** > ListExampleAnalysesOutputBody v3_list_example_analyses() @@ -5320,117 +5540,16 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **v3_run_dynamic_execution** -> OperationDynamicExecutionMetadataDynamicExecutionResult v3_run_dynamic_execution(analysis_id, run_dynamic_execution_input_body=run_dynamic_execution_input_body) - -Trigger a dynamic execution run. - -Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. - -**Error codes:** -- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found -- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request -- `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult -from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.AnalysesCoreApi(api_client) - analysis_id = 56 # int | Analysis ID - run_dynamic_execution_input_body = revengai.RunDynamicExecutionInputBody() # RunDynamicExecutionInputBody | (optional) - - try: - # Trigger a dynamic execution run. - api_response = api_instance.v3_run_dynamic_execution(analysis_id, run_dynamic_execution_input_body=run_dynamic_execution_input_body) - print("The response of AnalysesCoreApi->v3_run_dynamic_execution:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_run_dynamic_execution: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| Analysis ID | - **run_dynamic_execution_input_body** | [**RunDynamicExecutionInputBody**](RunDynamicExecutionInputBody.md)| | [optional] - -### Return type - -[**OperationDynamicExecutionMetadataDynamicExecutionResult**](OperationDynamicExecutionMetadataDynamicExecutionResult.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | OK | - | -**400** | Bad Request | - | -**403** | Forbidden | - | -**404** | Not Found | - | -**409** | Conflict | - | -**422** | Unprocessable Entity | - | -**500** | Internal Server Error | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **v3_run_dynamic_execution_summary** -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3_run_dynamic_execution_summary(analysis_id) +# **v3_run_dynamic_execution_run_summary** +> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult v3_run_dynamic_execution_run_summary(analysis_id, run_id) -Regenerate the dynamic execution summary. +Regenerate a run's dynamic execution summary. -Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. +Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied -- `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete @@ -5472,14 +5591,15 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesCoreApi(api_client) analysis_id = 56 # int | Analysis ID + run_id = 'run_id_example' # str | Dynamic execution run ID try: - # Regenerate the dynamic execution summary. - api_response = api_instance.v3_run_dynamic_execution_summary(analysis_id) - print("The response of AnalysesCoreApi->v3_run_dynamic_execution_summary:\n") + # Regenerate a run's dynamic execution summary. + api_response = api_instance.v3_run_dynamic_execution_run_summary(analysis_id, run_id) + print("The response of AnalysesCoreApi->v3_run_dynamic_execution_run_summary:\n") pprint(api_response) except Exception as e: - print("Exception when calling AnalysesCoreApi->v3_run_dynamic_execution_summary: %s\n" % e) + print("Exception when calling AnalysesCoreApi->v3_run_dynamic_execution_run_summary: %s\n" % e) ``` @@ -5490,6 +5610,7 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| Analysis ID | + **run_id** | **str**| Dynamic execution run ID | ### Return type @@ -5509,7 +5630,6 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | OK | - | -**400** | Bad Request | - | **403** | Forbidden | - | **404** | Not Found | - | **409** | Conflict | - | @@ -5715,13 +5835,14 @@ Name | Type | Description | Notes Edit a global variable. -Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. +Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 3b2d96bd..a502de8b 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -8,9 +8,11 @@ Method | HTTP request | Description [**get_capabilities**](AnalysesResultsMetadataApi.md#get_capabilities) | **GET** /v2/analyses/{analysis_id}/capabilities | Gets the capabilities from the analysis [**get_functions_list**](AnalysesResultsMetadataApi.md#get_functions_list) | **GET** /v2/analyses/{analysis_id}/functions/list | Gets functions from analysis [**get_tags**](AnalysesResultsMetadataApi.md#get_tags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score +[**v3_get_analysis_feedback**](AnalysesResultsMetadataApi.md#v3_get_analysis_feedback) | **GET** /v3/analyses/{analysis_id}/feedback/{type} | Get the caller's feedback on an analysis. [**v3_get_analysis_xref**](AnalysesResultsMetadataApi.md#v3_get_analysis_xref) | **GET** /v3/analyses/{analysis_id}/xrefs/{vaddr} | Look up xrefs by virtual address. [**v3_list_analysis_capabilities**](AnalysesResultsMetadataApi.md#v3_list_analysis_capabilities) | **GET** /v3/analyses/{analysis_id}/capabilities | List the capabilities found in an analysis. [**v3_list_analysis_tags**](AnalysesResultsMetadataApi.md#v3_list_analysis_tags) | **GET** /v3/analyses/{analysis_id}/tags | List the tags on an analysis. +[**v3_upsert_analysis_feedback**](AnalysesResultsMetadataApi.md#v3_upsert_analysis_feedback) | **PUT** /v3/analyses/{analysis_id}/feedback/{type} | Record feedback on an analysis. # **get_analysis_functions_paginated** @@ -369,6 +371,101 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_get_analysis_feedback** +> RecordedFeedback v3_get_analysis_feedback(analysis_id, type) + +Get the caller's feedback on an analysis. + +Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.recorded_feedback import RecordedFeedback +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | Analysis ID + type = 'type_example' # str | What the feedback is about + + try: + # Get the caller's feedback on an analysis. + api_response = api_instance.v3_get_analysis_feedback(analysis_id, type) + print("The response of AnalysesResultsMetadataApi->v3_get_analysis_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->v3_get_analysis_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **type** | **str**| What the feedback is about | + +### Return type + +[**RecordedFeedback**](RecordedFeedback.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_get_analysis_xref** > AnalysisXrefOutputBody v3_get_analysis_xref(analysis_id, vaddr) @@ -650,3 +747,98 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_upsert_analysis_feedback** +> v3_upsert_analysis_feedback(analysis_id, type, feedback_submission) + +Record feedback on an analysis. + +Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.feedback_submission import FeedbackSubmission +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysesResultsMetadataApi(api_client) + analysis_id = 56 # int | Analysis ID + type = 'type_example' # str | What the feedback is about + feedback_submission = revengai.FeedbackSubmission() # FeedbackSubmission | + + try: + # Record feedback on an analysis. + api_instance.v3_upsert_analysis_feedback(analysis_id, type, feedback_submission) + except Exception as e: + print("Exception when calling AnalysesResultsMetadataApi->v3_upsert_analysis_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| Analysis ID | + **type** | **str**| What the feedback is about | + **feedback_submission** | [**FeedbackSubmission**](FeedbackSubmission.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AnalysisBasicInfoOutputBody.md b/docs/AnalysisBasicInfoOutputBody.md index 0801101d..de5b02ba 100644 --- a/docs/AnalysisBasicInfoOutputBody.md +++ b/docs/AnalysisBasicInfoOutputBody.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **detected_binary_type** | **str** | Detected operating-system platform; empty when unavailable | **detected_language** | **str** | Detected source language; empty when unavailable | **function_count** | **int** | Number of functions in the binary | -**is_advanced** | **bool** | True when the analysis was run in advanced mode | +**is_advanced** | **bool** | Always false; advanced (DFG) analysis has been removed | **is_owner** | **bool** | True when the caller is the analysis owner | **is_system** | **bool** | True when the analysis is owned by a system user | **model_id** | **int** | Model ID | diff --git a/docs/AnalysisConfig.md b/docs/AnalysisConfig.md index 3ebeb06b..9f713f9a 100644 --- a/docs/AnalysisConfig.md +++ b/docs/AnalysisConfig.md @@ -8,7 +8,6 @@ Name | Type | Description | Notes **scrape_third_party_config** | [**ScrapeThirdPartyConfig**](ScrapeThirdPartyConfig.md) | Settings to scrape third party sources | [optional] **generate_capabilities** | **bool** | A configuration option for generating capabilities of a binary | [optional] [default to False] **no_cache** | **bool** | When enabled, skips using cached data within the processing. | [optional] [default to False] -**advanced_analysis** | **bool** | Enables an advanced security analysis. | [optional] [default to False] **sandbox_config** | [**SandboxOptions**](SandboxOptions.md) | Including a sandbox config enables the dynamic execution sandbox | [optional] ## Example diff --git a/docs/AnalysisFunctions.md b/docs/AnalysisFunctions.md index ecf15acf..dae0545c 100644 --- a/docs/AnalysisFunctions.md +++ b/docs/AnalysisFunctions.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**functions** | [**List[AppApiRestV2FunctionsTypesFunction]**](AppApiRestV2FunctionsTypesFunction.md) | The functions associated with the analysis | +**functions** | [**List[Function]**](Function.md) | The functions associated with the analysis | ## Example diff --git a/docs/AnalysisOperationsOutputBody.md b/docs/AnalysisOperationsOutputBody.md index 824486e1..649c8085 100644 --- a/docs/AnalysisOperationsOutputBody.md +++ b/docs/AnalysisOperationsOutputBody.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**operations** | [**List[AnalysisOperationBody]**](AnalysisOperationBody.md) | The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary. Operations that have never run are omitted | +**operations** | [**List[AnalysisOperationBody]**](AnalysisOperationBody.md) | The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary, then one dynamic-execution operation per sandbox run of the analysis, newest first. Operations that have never run are omitted | ## Example diff --git a/docs/AnalysisStringInput.md b/docs/AnalysisStringInput.md deleted file mode 100644 index b46349d7..00000000 --- a/docs/AnalysisStringInput.md +++ /dev/null @@ -1,32 +0,0 @@ -# AnalysisStringInput - -Input model for inserting a string into an analysis. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | The string literal value | -**vaddr** | **int** | The virtual address of the string | -**source** | [**StringSource**](StringSource.md) | The source of the string | - -## Example - -```python -from revengai.models.analysis_string_input import AnalysisStringInput - -# TODO update the JSON string below -json = "{}" -# create an instance of AnalysisStringInput from a JSON string -analysis_string_input_instance = AnalysisStringInput.from_json(json) -# print the JSON string representation of the object -print(AnalysisStringInput.to_json()) - -# convert the object into a dict -analysis_string_input_dict = analysis_string_input_instance.to_dict() -# create an instance of AnalysisStringInput from a dict -analysis_string_input_from_dict = AnalysisStringInput.from_dict(analysis_string_input_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AnalysisStringsResponse.md b/docs/AnalysisStringsResponse.md deleted file mode 100644 index d31d5e02..00000000 --- a/docs/AnalysisStringsResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# AnalysisStringsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**strings** | [**List[StringFunctions]**](StringFunctions.md) | The strings associated with the analysis | -**total_strings** | **int** | The total number of strings associated with this analysis | - -## Example - -```python -from revengai.models.analysis_strings_response import AnalysisStringsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of AnalysisStringsResponse from a JSON string -analysis_strings_response_instance = AnalysisStringsResponse.from_json(json) -# print the JSON string representation of the object -print(AnalysisStringsResponse.to_json()) - -# convert the object into a dict -analysis_strings_response_dict = analysis_strings_response_instance.to_dict() -# create an instance of AnalysisStringsResponse from a dict -analysis_strings_response_from_dict = AnalysisStringsResponse.from_dict(analysis_strings_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AnalysisStringsStatusResponse.md b/docs/AnalysisStringsStatusResponse.md deleted file mode 100644 index 7159e5f9..00000000 --- a/docs/AnalysisStringsStatusResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# AnalysisStringsStatusResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | [**BinariesTaskStatus**](BinariesTaskStatus.md) | The current status of the strings extraction task | - -## Example - -```python -from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of AnalysisStringsStatusResponse from a JSON string -analysis_strings_status_response_instance = AnalysisStringsStatusResponse.from_json(json) -# print the JSON string representation of the object -print(AnalysisStringsStatusResponse.to_json()) - -# convert the object into a dict -analysis_strings_status_response_dict = analysis_strings_status_response_instance.to_dict() -# create an instance of AnalysisStringsStatusResponse from a dict -analysis_strings_status_response_from_dict = AnalysisStringsStatusResponse.from_dict(analysis_strings_status_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/AppApiRestV2FunctionsResponsesFunction.md b/docs/AppApiRestV2FunctionsResponsesFunction.md deleted file mode 100644 index 27827836..00000000 --- a/docs/AppApiRestV2FunctionsResponsesFunction.md +++ /dev/null @@ -1,31 +0,0 @@ -# AppApiRestV2FunctionsResponsesFunction - -Function schema used in function strings response. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_id** | **int** | | [optional] -**function_vaddr** | **int** | Function virtual address | - -## Example - -```python -from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction - -# TODO update the JSON string below -json = "{}" -# create an instance of AppApiRestV2FunctionsResponsesFunction from a JSON string -app_api_rest_v2_functions_responses_function_instance = AppApiRestV2FunctionsResponsesFunction.from_json(json) -# print the JSON string representation of the object -print(AppApiRestV2FunctionsResponsesFunction.to_json()) - -# convert the object into a dict -app_api_rest_v2_functions_responses_function_dict = app_api_rest_v2_functions_responses_function_instance.to_dict() -# create an instance of AppApiRestV2FunctionsResponsesFunction from a dict -app_api_rest_v2_functions_responses_function_from_dict = AppApiRestV2FunctionsResponsesFunction.from_dict(app_api_rest_v2_functions_responses_function_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BaseResponseAnalysisStringsResponse.md b/docs/BaseResponseAnalysisStringsResponse.md deleted file mode 100644 index da37b439..00000000 --- a/docs/BaseResponseAnalysisStringsResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseAnalysisStringsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**AnalysisStringsResponse**](AnalysisStringsResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseAnalysisStringsResponse from a JSON string -base_response_analysis_strings_response_instance = BaseResponseAnalysisStringsResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseAnalysisStringsResponse.to_json()) - -# convert the object into a dict -base_response_analysis_strings_response_dict = base_response_analysis_strings_response_instance.to_dict() -# create an instance of BaseResponseAnalysisStringsResponse from a dict -base_response_analysis_strings_response_from_dict = BaseResponseAnalysisStringsResponse.from_dict(base_response_analysis_strings_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BaseResponseAnalysisStringsStatusResponse.md b/docs/BaseResponseAnalysisStringsStatusResponse.md deleted file mode 100644 index 529a501e..00000000 --- a/docs/BaseResponseAnalysisStringsStatusResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseAnalysisStringsStatusResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**AnalysisStringsStatusResponse**](AnalysisStringsStatusResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseAnalysisStringsStatusResponse from a JSON string -base_response_analysis_strings_status_response_instance = BaseResponseAnalysisStringsStatusResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseAnalysisStringsStatusResponse.to_json()) - -# convert the object into a dict -base_response_analysis_strings_status_response_dict = base_response_analysis_strings_status_response_instance.to_dict() -# create an instance of BaseResponseAnalysisStringsStatusResponse from a dict -base_response_analysis_strings_status_response_from_dict = BaseResponseAnalysisStringsStatusResponse.from_dict(base_response_analysis_strings_status_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/BaseResponseFunctionStringsResponse.md b/docs/BaseResponseFunctionStringsResponse.md deleted file mode 100644 index c1ef50b7..00000000 --- a/docs/BaseResponseFunctionStringsResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseFunctionStringsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**FunctionStringsResponse**](FunctionStringsResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseFunctionStringsResponse from a JSON string -base_response_function_strings_response_instance = BaseResponseFunctionStringsResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseFunctionStringsResponse.to_json()) - -# convert the object into a dict -base_response_function_strings_response_dict = base_response_function_strings_response_instance.to_dict() -# create an instance of BaseResponseFunctionStringsResponse from a dict -base_response_function_strings_response_from_dict = BaseResponseFunctionStringsResponse.from_dict(base_response_function_strings_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/Basic.md b/docs/Basic.md index 56bd0782..0d156f98 100644 --- a/docs/Basic.md +++ b/docs/Basic.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **is_owner** | **bool** | Whether the current user is the owner | **debug** | **bool** | Whether the current analysis was analysed with debug symbols | **function_count** | **int** | The number of functions in the binary | -**is_advanced** | **bool** | Whether the analysis was advanced | +**is_advanced** | **bool** | Always false; advanced (DFG) analysis has been removed | [optional] [default to False] **base_address** | **int** | | **binary_uuid** | **str** | | [optional] **sequencer_version** | **str** | | [optional] diff --git a/docs/BillingApi.md b/docs/BillingApi.md new file mode 100644 index 00000000..1bfe5dd0 --- /dev/null +++ b/docs/BillingApi.md @@ -0,0 +1,91 @@ +# revengai.BillingApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**v3_get_credit_estimates**](BillingApi.md#v3_get_credit_estimates) | **GET** /v3/credit-estimates | Get credit estimates. + + +# **v3_get_credit_estimates** +> GetCreditEstimatesOutputBody v3_get_credit_estimates() + +Get credit estimates. + +Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.get_credit_estimates_output_body import GetCreditEstimatesOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.BillingApi(api_client) + + try: + # Get credit estimates. + api_response = api_instance.v3_get_credit_estimates() + print("The response of BillingApi->v3_get_credit_estimates:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BillingApi->v3_get_credit_estimates: %s\n" % e) +``` + + + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**GetCreditEstimatesOutputBody**](GetCreditEstimatesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**0** | Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/BinariesApi.md b/docs/BinariesApi.md index 7ee6dcca..984fed4b 100644 --- a/docs/BinariesApi.md +++ b/docs/BinariesApi.md @@ -19,6 +19,7 @@ Method | HTTP request | Description [**v3_get_binary_externals**](BinariesApi.md#v3_get_binary_externals) | **GET** /v3/binaries/{binary_id}/externals | Get third-party threat-intel lookups for a binary. [**v3_get_binary_related**](BinariesApi.md#v3_get_binary_related) | **GET** /v3/binaries/{binary_id}/related | Get the binaries related to this one by unpacking. [**v3_get_binary_related_status**](BinariesApi.md#v3_get_binary_related_status) | **GET** /v3/binaries/{binary_id}/related/status | Get the archive-unpacking status for a binary. +[**v3_list_malware_families**](BinariesApi.md#v3_list_malware_families) | **GET** /v3/malware-families | Look up the malware families of binaries in the RevEng.AI malware corpus. [**v3_search_binaries**](BinariesApi.md#v3_search_binaries) | **GET** /v3/binaries | Search binaries [**v3_upload_file**](BinariesApi.md#v3_upload_file) | **POST** /v3/upload | Upload a file. @@ -1343,6 +1344,92 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_list_malware_families** +> ListMalwareFamiliesOutputBody v3_list_malware_families(binary_ids) + +Look up the malware families of binaries in the RevEng.AI malware corpus. + +Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.list_malware_families_output_body import ListMalwareFamiliesOutputBody +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.BinariesApi(api_client) + binary_ids = [56] # List[int] | Binaries to look up, typically those a function-matching run found in the malware corpus. + + try: + # Look up the malware families of binaries in the RevEng.AI malware corpus. + api_response = api_instance.v3_list_malware_families(binary_ids) + print("The response of BinariesApi->v3_list_malware_families:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BinariesApi->v3_list_malware_families: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **binary_ids** | [**List[int]**](int.md)| Binaries to look up, typically those a function-matching run found in the malware corpus. | + +### Return type + +[**ListMalwareFamiliesOutputBody**](ListMalwareFamiliesOutputBody.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**0** | Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_search_binaries** > SearchBinariesOutputBody v3_search_binaries(partial_name=partial_name, partial_sha256=partial_sha256, tags=tags, model_name=model_name, user_files_only=user_files_only, exclude_binary_id=exclude_binary_id, user_ids=user_ids, limit=limit, offset=offset) diff --git a/docs/BinariesTaskStatus.md b/docs/BinariesTaskStatus.md deleted file mode 100644 index eb5364ce..00000000 --- a/docs/BinariesTaskStatus.md +++ /dev/null @@ -1,20 +0,0 @@ -# BinariesTaskStatus - - -## Enum - -* `UNINITIALISED` (value: `'UNINITIALISED'`) - -* `PENDING` (value: `'PENDING'`) - -* `RUNNING` (value: `'RUNNING'`) - -* `COMPLETED` (value: `'COMPLETED'`) - -* `FAILED` (value: `'FAILED'`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CallEdge.md b/docs/CallEdge.md index cda830b4..db1275ec 100644 --- a/docs/CallEdge.md +++ b/docs/CallEdge.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **caller_vaddr** | **int** | Entry vaddr of the caller function (joined from function_t). | **imported_function_id** | **int** | Imported function ID for an external callee, resolved via the thunk/stub address. | [optional] **is_external** | **bool** | | +**source** | **str** | Who found the edge: SYSTEM for the analysis, AI_AGENT for a call AI decompilation recovered that the analysis missed. | **thunked_vaddr** | **int** | | [optional] ## Example diff --git a/docs/CapabilityImplementation.md b/docs/CapabilityImplementation.md new file mode 100644 index 00000000..b3e2af6a --- /dev/null +++ b/docs/CapabilityImplementation.md @@ -0,0 +1,30 @@ +# CapabilityImplementation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capability** | **str** | Capability this summary describes | +**summary** | **str** | How the function implements this capability | + +## Example + +```python +from revengai.models.capability_implementation import CapabilityImplementation + +# TODO update the JSON string below +json = "{}" +# create an instance of CapabilityImplementation from a JSON string +capability_implementation_instance = CapabilityImplementation.from_json(json) +# print the JSON string representation of the object +print(CapabilityImplementation.to_json()) + +# convert the object into a dict +capability_implementation_dict = capability_implementation_instance.to_dict() +# create an instance of CapabilityImplementation from a dict +capability_implementation_from_dict = CapabilityImplementation.from_dict(capability_implementation_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CurrentUser.md b/docs/CurrentUser.md new file mode 100644 index 00000000..4e616632 --- /dev/null +++ b/docs/CurrentUser.md @@ -0,0 +1,36 @@ +# CurrentUser + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**email** | **str** | | +**is_active** | **bool** | Inactive users cannot authenticate | +**profile** | [**UserProfile**](UserProfile.md) | | +**role** | **str** | | +**signs_in_with** | **str** | How the user re-authenticates to delete their account: 'password' sends their current password, 'sso' signs in again at their identity provider. | +**tier** | **str** | | [optional] +**user_id** | **int** | | + +## Example + +```python +from revengai.models.current_user import CurrentUser + +# TODO update the JSON string below +json = "{}" +# create an instance of CurrentUser from a JSON string +current_user_instance = CurrentUser.from_json(json) +# print the JSON string representation of the object +print(CurrentUser.to_json()) + +# convert the object into a dict +current_user_dict = current_user_instance.to_dict() +# create an instance of CurrentUser from a dict +current_user_from_dict = CurrentUser.from_dict(current_user_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DataTypesApi.md b/docs/DataTypesApi.md index 8748bd36..f9c7b4b1 100644 --- a/docs/DataTypesApi.md +++ b/docs/DataTypesApi.md @@ -24,7 +24,7 @@ Copy function signatures Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. -A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. +A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -32,6 +32,7 @@ A `data_type_id` means nothing outside the analysis that issued it, so the types - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -125,7 +126,7 @@ Name | Type | Description | Notes Create an analysis's data types -Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. +Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -133,6 +134,7 @@ Adds user-authored types to an analysis. Many types can be created in one reques - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -918,7 +920,7 @@ Name | Type | Description | Notes Update an analysis's data types -Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. +Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -926,6 +928,7 @@ Replaces stored types in full: a field left out of the request is cleared. Many - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -1019,13 +1022,14 @@ Name | Type | Description | Notes Update a function's signature -Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. +Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed +- `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready ### Example @@ -1110,6 +1114,7 @@ Name | Type | Description | Notes **400** | Bad Request | - | **403** | Forbidden | - | **404** | Not Found | - | +**409** | Conflict | - | **422** | Unprocessable Entity | - | **500** | Internal Server Error | - | diff --git a/docs/DeleteMeBody.md b/docs/DeleteMeBody.md new file mode 100644 index 00000000..30ed7507 --- /dev/null +++ b/docs/DeleteMeBody.md @@ -0,0 +1,29 @@ +# DeleteMeBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**password** | **str** | Current password. Required for users who sign in with a password; ignored for users from an external identity provider. | [optional] + +## Example + +```python +from revengai.models.delete_me_body import DeleteMeBody + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteMeBody from a JSON string +delete_me_body_instance = DeleteMeBody.from_json(json) +# print the JSON string representation of the object +print(DeleteMeBody.to_json()) + +# convert the object into a dict +delete_me_body_dict = delete_me_body_instance.to_dict() +# create an instance of DeleteMeBody from a dict +delete_me_body_from_dict = DeleteMeBody.from_dict(delete_me_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DisassemblyOutputBody.md b/docs/DisassemblyOutputBody.md index 69505b66..79eb69c9 100644 --- a/docs/DisassemblyOutputBody.md +++ b/docs/DisassemblyOutputBody.md @@ -10,8 +10,6 @@ Name | Type | Description | Notes **global_variables** | **object** | | [optional] **local_variables** | **object** | | [optional] **operand_xrefs** | [**List[OperandXref]**](OperandXref.md) | Instruction operands that reference a pointer slot, sorted by instruction_vaddr, target_vaddr, pointed_vaddr. | [optional] -**params** | **object** | | [optional] -**return_type** | **str** | | [optional] **returns** | **bool** | | ## Example diff --git a/docs/DynamicExecutionMetadata.md b/docs/DynamicExecutionMetadata.md index a0066622..b0268ff3 100644 --- a/docs/DynamicExecutionMetadata.md +++ b/docs/DynamicExecutionMetadata.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **logs** | [**AnalysisLogs**](AnalysisLogs.md) | Sandbox status log messages captured during the run. Empty when none have been captured yet. | -**status** | **str** | Run status. UNINITIALISED means this analysis has never had a run triggered. | +**status** | **str** | Run status | ## Example diff --git a/docs/DynamicExecutionRun.md b/docs/DynamicExecutionRun.md new file mode 100644 index 00000000..ed672b9a --- /dev/null +++ b/docs/DynamicExecutionRun.md @@ -0,0 +1,32 @@ +# DynamicExecutionRun + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config** | [**DynamicExecutionRunConfig**](DynamicExecutionRunConfig.md) | Parameters the run was started with | +**created_at** | **datetime** | When the run was started | +**id** | **str** | Run ID | +**status** | **str** | Run status | + +## Example + +```python +from revengai.models.dynamic_execution_run import DynamicExecutionRun + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicExecutionRun from a JSON string +dynamic_execution_run_instance = DynamicExecutionRun.from_json(json) +# print the JSON string representation of the object +print(DynamicExecutionRun.to_json()) + +# convert the object into a dict +dynamic_execution_run_dict = dynamic_execution_run_instance.to_dict() +# create an instance of DynamicExecutionRun from a dict +dynamic_execution_run_from_dict = DynamicExecutionRun.from_dict(dynamic_execution_run_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DynamicExecutionRunConfig.md b/docs/DynamicExecutionRunConfig.md new file mode 100644 index 00000000..d85a6669 --- /dev/null +++ b/docs/DynamicExecutionRunConfig.md @@ -0,0 +1,35 @@ +# DynamicExecutionRunConfig + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**archive_entry_path** | **str** | Relative path of the archive entry executed. Empty when no archive was used. | +**archive_sha_256_hash** | **str** | SHA-256 of the archive sent to the sandbox instead of the analysed binary. Empty when no archive was used. | +**command_line_args** | **str** | Command-line arguments passed to the sample. Empty when none were given. | +**has_archive_password** | **bool** | Whether a password was given for the archive. The password itself is never returned. | +**start_method** | **str** | How the sandbox launched the sample. Null when the sandbox's standard behaviour was used. | +**timeout_seconds** | **int** | Maximum sandbox execution time in seconds | +**url** | **str** | URL opened in the sandbox's browser instead of a sample. Empty for a sample run. | + +## Example + +```python +from revengai.models.dynamic_execution_run_config import DynamicExecutionRunConfig + +# TODO update the JSON string below +json = "{}" +# create an instance of DynamicExecutionRunConfig from a JSON string +dynamic_execution_run_config_instance = DynamicExecutionRunConfig.from_json(json) +# print the JSON string representation of the object +print(DynamicExecutionRunConfig.to_json()) + +# convert the object into a dict +dynamic_execution_run_config_dict = dynamic_execution_run_config_instance.to_dict() +# create an instance of DynamicExecutionRunConfig from a dict +dynamic_execution_run_config_from_dict = DynamicExecutionRunConfig.from_dict(dynamic_execution_run_config_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DynamicExecutionSummaryMetadata.md b/docs/DynamicExecutionSummaryMetadata.md index 8580d0ca..d3f076be 100644 --- a/docs/DynamicExecutionSummaryMetadata.md +++ b/docs/DynamicExecutionSummaryMetadata.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **str** | Status of the most recent summary attempt. UNINITIALISED means no summary has been attempted for this analysis. | +**status** | **str** | Status of the run's most recent summary attempt. UNINITIALISED means no summary has been attempted for the run. | ## Example diff --git a/docs/EventData.md b/docs/EventData.md index 1157ae94..bf76892f 100644 --- a/docs/EventData.md +++ b/docs/EventData.md @@ -19,6 +19,8 @@ Name | Type | Description | Notes **tool_args** | **str** | | [optional] **tool_call_id** | **str** | | [optional] **tool_name** | **str** | | [optional] +**binary_name** | **str** | | +**function_name** | **str** | | [optional] **is_error** | **bool** | | [optional] **result** | **str** | | [optional] **updated** | [**List[EntityUpdate]**](EntityUpdate.md) | | [optional] @@ -30,7 +32,6 @@ Name | Type | Description | Notes **message** | **str** | | [optional] **agent** | [**AgentRunUpdateAgent**](AgentRunUpdateAgent.md) | | **analysis_id** | **int** | The earliest-added analysis of the file in the investigation that the conversation's starter may see. | -**binary_name** | **str** | | **card** | [**AgentRunUpdateCard**](AgentRunUpdateCard.md) | A summary of the agent's result. Absent until the run is done, and when its result cannot be summarised. | [optional] **created_at** | **datetime** | | **investigation_id** | **int** | | diff --git a/docs/FeedbackSubmission.md b/docs/FeedbackSubmission.md new file mode 100644 index 00000000..9a4a7ef0 --- /dev/null +++ b/docs/FeedbackSubmission.md @@ -0,0 +1,30 @@ +# FeedbackSubmission + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **Dict[str, object]** | Context the client captured with the feedback, stored as-is (e.g. the binary hash and the matches the caller was shown) | [optional] +**sentiment** | **str** | How useful the caller found the result | + +## Example + +```python +from revengai.models.feedback_submission import FeedbackSubmission + +# TODO update the JSON string below +json = "{}" +# create an instance of FeedbackSubmission from a JSON string +feedback_submission_instance = FeedbackSubmission.from_json(json) +# print the JSON string representation of the object +print(FeedbackSubmission.to_json()) + +# convert the object into a dict +feedback_submission_dict = feedback_submission_instance.to_dict() +# create an instance of FeedbackSubmission from a dict +feedback_submission_from_dict = FeedbackSubmission.from_dict(feedback_submission_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AppApiRestV2FunctionsTypesFunction.md b/docs/Function.md similarity index 52% rename from docs/AppApiRestV2FunctionsTypesFunction.md rename to docs/Function.md index 7f9b98d4..97335e7a 100644 --- a/docs/AppApiRestV2FunctionsTypesFunction.md +++ b/docs/Function.md @@ -1,4 +1,4 @@ -# AppApiRestV2FunctionsTypesFunction +# Function ## Properties @@ -15,19 +15,19 @@ Name | Type | Description | Notes ## Example ```python -from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction +from revengai.models.function import Function # TODO update the JSON string below json = "{}" -# create an instance of AppApiRestV2FunctionsTypesFunction from a JSON string -app_api_rest_v2_functions_types_function_instance = AppApiRestV2FunctionsTypesFunction.from_json(json) +# create an instance of Function from a JSON string +function_instance = Function.from_json(json) # print the JSON string representation of the object -print(AppApiRestV2FunctionsTypesFunction.to_json()) +print(Function.to_json()) # convert the object into a dict -app_api_rest_v2_functions_types_function_dict = app_api_rest_v2_functions_types_function_instance.to_dict() -# create an instance of AppApiRestV2FunctionsTypesFunction from a dict -app_api_rest_v2_functions_types_function_from_dict = AppApiRestV2FunctionsTypesFunction.from_dict(app_api_rest_v2_functions_types_function_dict) +function_dict = function_instance.to_dict() +# create an instance of Function from a dict +function_from_dict = Function.from_dict(function_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FunctionString.md b/docs/FunctionString.md deleted file mode 100644 index 3c5bb2dd..00000000 --- a/docs/FunctionString.md +++ /dev/null @@ -1,31 +0,0 @@ -# FunctionString - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | The value of the string literal | -**vaddr** | **int** | The vaddr of the string value | -**source** | [**StringSource**](StringSource.md) | The source of the string | [optional] - -## Example - -```python -from revengai.models.function_string import FunctionString - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionString from a JSON string -function_string_instance = FunctionString.from_json(json) -# print the JSON string representation of the object -print(FunctionString.to_json()) - -# convert the object into a dict -function_string_dict = function_string_instance.to_dict() -# create an instance of FunctionString from a dict -function_string_from_dict = FunctionString.from_dict(function_string_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FunctionStringsResponse.md b/docs/FunctionStringsResponse.md deleted file mode 100644 index bf9061c1..00000000 --- a/docs/FunctionStringsResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# FunctionStringsResponse - -Response for listing all the strings of a function. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**strings** | [**List[FunctionString]**](FunctionString.md) | The strings associated with this function | -**total_strings** | **int** | The total number of strings associated with this function | - -## Example - -```python -from revengai.models.function_strings_response import FunctionStringsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionStringsResponse from a JSON string -function_strings_response_instance = FunctionStringsResponse.from_json(json) -# print the JSON string representation of the object -print(FunctionStringsResponse.to_json()) - -# convert the object into a dict -function_strings_response_dict = function_strings_response_instance.to_dict() -# create an instance of FunctionStringsResponse from a dict -function_strings_response_from_dict = FunctionStringsResponse.from_dict(function_strings_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/FunctionsCoreApi.md b/docs/FunctionsCoreApi.md index 199db097..bfda194a 100644 --- a/docs/FunctionsCoreApi.md +++ b/docs/FunctionsCoreApi.md @@ -6,8 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**add_function_callee**](FunctionsCoreApi.md#add_function_callee) | **POST** /v3/functions/{function_id}/callees | Add a callee to a function [**add_user_string_to_function**](FunctionsCoreApi.md#add_user_string_to_function) | **POST** /v3/functions/{function_id}/user-provided-strings | Add a user-provided string to a function. -[**get_analysis_strings**](FunctionsCoreApi.md#get_analysis_strings) | **GET** /v2/analyses/{analysis_id}/functions/strings | Get string information found in the Analysis -[**get_analysis_strings_status**](FunctionsCoreApi.md#get_analysis_strings_status) | **GET** /v2/analyses/{analysis_id}/functions/strings/status | Get string processing state for the Analysis [**get_function_blocks**](FunctionsCoreApi.md#get_function_blocks) | **GET** /v2/functions/{function_id}/blocks | Get disassembly blocks related to the function [**get_function_blocks_0**](FunctionsCoreApi.md#get_function_blocks_0) | **GET** /v3/functions/{function_id}/blocks | Get function disassembly [**get_function_callees_callers**](FunctionsCoreApi.md#get_function_callees_callers) | **GET** /v2/functions/{function_id}/callees_callers | Get list of functions that call or are called by the specified function @@ -18,8 +16,7 @@ Method | HTTP request | Description [**get_function_details**](FunctionsCoreApi.md#get_function_details) | **GET** /v2/functions/{function_id} | Get function details [**get_function_details_0**](FunctionsCoreApi.md#get_function_details_0) | **GET** /v3/functions/{function_id} | Get function details [**get_function_indirect_call_sites**](FunctionsCoreApi.md#get_function_indirect_call_sites) | **GET** /v3/functions/{function_id}/indirect-call-sites | Get indirect call sites for a function -[**get_function_strings**](FunctionsCoreApi.md#get_function_strings) | **GET** /v2/functions/{function_id}/strings | Get string information found in the function -[**get_function_strings_0**](FunctionsCoreApi.md#get_function_strings_0) | **GET** /v3/functions/{function_id}/strings | List strings for a function. +[**get_function_strings**](FunctionsCoreApi.md#get_function_strings) | **GET** /v3/functions/{function_id}/strings | List strings for a function. [**get_functions_callees_callers**](FunctionsCoreApi.md#get_functions_callees_callers) | **GET** /v3/functions/callees-callers | Get callees and callers for many functions [**get_functions_matches**](FunctionsCoreApi.md#get_functions_matches) | **GET** /v3/functions/matches | Get function-matching results for an explicit set of functions [**get_functions_matching_status**](FunctionsCoreApi.md#get_functions_matching_status) | **GET** /v3/functions/matches/status | Get function-matching status for an explicit set of functions @@ -29,8 +26,10 @@ Method | HTTP request | Description [**start_functions_matching**](FunctionsCoreApi.md#start_functions_matching) | **POST** /v3/functions/matches | Start function matching for an explicit set of functions [**v3_canonicalize_function_names**](FunctionsCoreApi.md#v3_canonicalize_function_names) | **POST** /v3/functions/canonical-names | Canonicalize a batch of function names [**v3_get_analysis_func_maps**](FunctionsCoreApi.md#v3_get_analysis_func_maps) | **GET** /v3/analyses/{analysis_id}/func-maps | Get function ID/address maps for an analysis +[**v3_get_function_feedback**](FunctionsCoreApi.md#v3_get_function_feedback) | **GET** /v3/functions/{function_id}/feedback/{type} | Get the caller's feedback on a function. [**v3_list_function_globals**](FunctionsCoreApi.md#v3_list_function_globals) | **GET** /v3/functions/{function_id}/globals | List the global variables a function references. [**v3_search_functions**](FunctionsCoreApi.md#v3_search_functions) | **GET** /v3/functions | Search functions +[**v3_upsert_function_feedback**](FunctionsCoreApi.md#v3_upsert_function_feedback) | **PUT** /v3/functions/{function_id}/feedback/{type} | Record feedback on a function. # **add_function_callee** @@ -225,190 +224,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **get_analysis_strings** -> BaseResponseAnalysisStringsResponse get_analysis_strings(analysis_id, page=page, page_size=page_size, search=search, function_search=function_search, order_by=order_by, sort_order=sort_order) - -Get string information found in the Analysis - -Get string information found in the analysis - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.FunctionsCoreApi(api_client) - analysis_id = 56 # int | - page = 1 # int | The page number to retrieve. (optional) (default to 1) - page_size = 100 # int | Number of items per page. (optional) (default to 100) - search = 'search_example' # str | Search is applied to string value (optional) - function_search = 'function_search_example' # str | Search is applied to function names (optional) - order_by = value # str | Order by field (optional) (default to value) - sort_order = ASC # str | Sort order for the results (optional) (default to ASC) - - try: - # Get string information found in the Analysis - api_response = api_instance.get_analysis_strings(analysis_id, page=page, page_size=page_size, search=search, function_search=function_search, order_by=order_by, sort_order=sort_order) - print("The response of FunctionsCoreApi->get_analysis_strings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsCoreApi->get_analysis_strings: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - **page** | **int**| The page number to retrieve. | [optional] [default to 1] - **page_size** | **int**| Number of items per page. | [optional] [default to 100] - **search** | **str**| Search is applied to string value | [optional] - **function_search** | **str**| Search is applied to function names | [optional] - **order_by** | **str**| Order by field | [optional] [default to value] - **sort_order** | **str**| Sort order for the results | [optional] [default to ASC] - -### Return type - -[**BaseResponseAnalysisStringsResponse**](BaseResponseAnalysisStringsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_analysis_strings_status** -> BaseResponseAnalysisStringsStatusResponse get_analysis_strings_status(analysis_id) - -Get string processing state for the Analysis - -Get string processing state for the Analysis - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.FunctionsCoreApi(api_client) - analysis_id = 56 # int | - - try: - # Get string processing state for the Analysis - api_response = api_instance.get_analysis_strings_status(analysis_id) - print("The response of FunctionsCoreApi->get_analysis_strings_status:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsCoreApi->get_analysis_strings_status: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **analysis_id** | **int**| | - -### Return type - -[**BaseResponseAnalysisStringsStatusResponse**](BaseResponseAnalysisStringsStatusResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **get_function_blocks** > BaseResponseFunctionBlocksResponse get_function_blocks(function_id) @@ -501,7 +316,7 @@ Name | Type | Description | Notes Get function disassembly -Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. +Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied @@ -1301,99 +1116,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_function_strings** -> BaseResponseFunctionStringsResponse get_function_strings(function_id, page=page, page_size=page_size, search=search) - -Get string information found in the function - -Get string information found in the function - -### Example - -* Api Key Authentication (APIKey): -* Bearer Authentication (bearerAuth): - -```python -import revengai -from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse -from revengai.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.reveng.ai -# See configuration.py for a list of all supported configuration parameters. -configuration = revengai.Configuration( - host = "https://api.reveng.ai" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: APIKey -configuration.api_key['APIKey'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['APIKey'] = 'Bearer' - -# Configure Bearer authorization: bearerAuth -configuration = revengai.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with revengai.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = revengai.FunctionsCoreApi(api_client) - function_id = 56 # int | - page = 1 # int | The page number to retrieve. (optional) (default to 1) - page_size = 100 # int | Number of items per page. (optional) (default to 100) - search = 'search_example' # str | Search is applied to string value (optional) - - try: - # Get string information found in the function - api_response = api_instance.get_function_strings(function_id, page=page, page_size=page_size, search=search) - print("The response of FunctionsCoreApi->get_function_strings:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsCoreApi->get_function_strings: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - **page** | **int**| The page number to retrieve. | [optional] [default to 1] - **page_size** | **int**| Number of items per page. | [optional] [default to 100] - **search** | **str**| Search is applied to string value | [optional] - -### Return type - -[**BaseResponseFunctionStringsResponse**](BaseResponseFunctionStringsResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | - | -**422** | Invalid request parameters | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_function_strings_0** -> ListFunctionStringsOutputBody get_function_strings_0(function_id, page=page, page_size=page_size, search=search) +> ListFunctionStringsOutputBody get_function_strings(function_id, page=page, page_size=page_size, search=search) List strings for a function. @@ -1447,11 +1170,11 @@ with revengai.ApiClient(configuration) as api_client: try: # List strings for a function. - api_response = api_instance.get_function_strings_0(function_id, page=page, page_size=page_size, search=search) - print("The response of FunctionsCoreApi->get_function_strings_0:\n") + api_response = api_instance.get_function_strings(function_id, page=page, page_size=page_size, search=search) + print("The response of FunctionsCoreApi->get_function_strings:\n") pprint(api_response) except Exception as e: - print("Exception when calling FunctionsCoreApi->get_function_strings_0: %s\n" % e) + print("Exception when calling FunctionsCoreApi->get_function_strings: %s\n" % e) ``` @@ -2352,6 +2075,101 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_get_function_feedback** +> RecordedFeedback v3_get_function_feedback(function_id, type) + +Get the caller's feedback on a function. + +Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.recorded_feedback import RecordedFeedback +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.FunctionsCoreApi(api_client) + function_id = 56 # int | Function ID + type = 'type_example' # str | What the feedback is about + + try: + # Get the caller's feedback on a function. + api_response = api_instance.v3_get_function_feedback(function_id, type) + print("The response of FunctionsCoreApi->v3_get_function_feedback:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling FunctionsCoreApi->v3_get_function_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **type** | **str**| What the feedback is about | + +### Return type + +[**RecordedFeedback**](RecordedFeedback.md) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **v3_list_function_globals** > ListFunctionGlobalsOutputBody v3_list_function_globals(function_id) @@ -2541,3 +2359,98 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **v3_upsert_function_feedback** +> v3_upsert_function_feedback(function_id, type, feedback_submission) + +Record feedback on a function. + +Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. + +**Error codes:** +- `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +- `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + +### Example + +* Api Key Authentication (APIKey): +* Bearer Authentication (bearerAuth): + +```python +import revengai +from revengai.models.feedback_submission import FeedbackSubmission +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Configure Bearer authorization: bearerAuth +configuration = revengai.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.FunctionsCoreApi(api_client) + function_id = 56 # int | Function ID + type = 'type_example' # str | What the feedback is about + feedback_submission = revengai.FeedbackSubmission() # FeedbackSubmission | + + try: + # Record feedback on a function. + api_instance.v3_upsert_function_feedback(function_id, type, feedback_submission) + except Exception as e: + print("Exception when calling FunctionsCoreApi->v3_upsert_function_feedback: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **function_id** | **int**| Function ID | + **type** | **str**| What the feedback is about | + **feedback_submission** | [**FeedbackSubmission**](FeedbackSubmission.md)| | + +### Return type + +void (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey), [bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | No Content | - | +**403** | Forbidden | - | +**404** | Not Found | - | +**422** | Unprocessable Entity | - | +**500** | Internal Server Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GetCreditEstimatesOutputBody.md b/docs/GetCreditEstimatesOutputBody.md new file mode 100644 index 00000000..fcd69f3e --- /dev/null +++ b/docs/GetCreditEstimatesOutputBody.md @@ -0,0 +1,30 @@ +# GetCreditEstimatesOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operations** | [**List[OperationCostBody]**](OperationCostBody.md) | Estimated cost of each operation | +**size_buckets** | [**List[SizeBucketBody]**](SizeBucketBody.md) | Size buckets in ascending order of size | + +## Example + +```python +from revengai.models.get_credit_estimates_output_body import GetCreditEstimatesOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of GetCreditEstimatesOutputBody from a JSON string +get_credit_estimates_output_body_instance = GetCreditEstimatesOutputBody.from_json(json) +# print the JSON string representation of the object +print(GetCreditEstimatesOutputBody.to_json()) + +# convert the object into a dict +get_credit_estimates_output_body_dict = get_credit_estimates_output_body_instance.to_dict() +# create an instance of GetCreditEstimatesOutputBody from a dict +get_credit_estimates_output_body_from_dict = GetCreditEstimatesOutputBody.from_dict(get_credit_estimates_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IAMUsersApi.md b/docs/IAMUsersApi.md index e5f92203..dcdf0a60 100644 --- a/docs/IAMUsersApi.md +++ b/docs/IAMUsersApi.md @@ -9,11 +9,11 @@ Method | HTTP request | Description # **get_me** -> User get_me() +> CurrentUser get_me() Get current user -Returns the authenticated user's own information. +Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found @@ -25,7 +25,7 @@ Returns the authenticated user's own information. ```python import revengai -from revengai.models.user import User +from revengai.models.current_user import CurrentUser from revengai.rest import ApiException from pprint import pprint @@ -73,7 +73,7 @@ This endpoint does not need any parameter. ### Return type -[**User**](User.md) +[**CurrentUser**](CurrentUser.md) ### Authorization diff --git a/docs/ListDynamicExecutionRunsOutputBody.md b/docs/ListDynamicExecutionRunsOutputBody.md new file mode 100644 index 00000000..799f48e9 --- /dev/null +++ b/docs/ListDynamicExecutionRunsOutputBody.md @@ -0,0 +1,29 @@ +# ListDynamicExecutionRunsOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**runs** | [**List[DynamicExecutionRun]**](DynamicExecutionRun.md) | The analysis's runs, newest first | + +## Example + +```python +from revengai.models.list_dynamic_execution_runs_output_body import ListDynamicExecutionRunsOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDynamicExecutionRunsOutputBody from a JSON string +list_dynamic_execution_runs_output_body_instance = ListDynamicExecutionRunsOutputBody.from_json(json) +# print the JSON string representation of the object +print(ListDynamicExecutionRunsOutputBody.to_json()) + +# convert the object into a dict +list_dynamic_execution_runs_output_body_dict = list_dynamic_execution_runs_output_body_instance.to_dict() +# create an instance of ListDynamicExecutionRunsOutputBody from a dict +list_dynamic_execution_runs_output_body_from_dict = ListDynamicExecutionRunsOutputBody.from_dict(list_dynamic_execution_runs_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ListMalwareFamiliesOutputBody.md b/docs/ListMalwareFamiliesOutputBody.md new file mode 100644 index 00000000..a23f35de --- /dev/null +++ b/docs/ListMalwareFamiliesOutputBody.md @@ -0,0 +1,29 @@ +# ListMalwareFamiliesOutputBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**families** | [**List[MalwareFamily]**](MalwareFamily.md) | Families of the requested binaries, sorted by name | + +## Example + +```python +from revengai.models.list_malware_families_output_body import ListMalwareFamiliesOutputBody + +# TODO update the JSON string below +json = "{}" +# create an instance of ListMalwareFamiliesOutputBody from a JSON string +list_malware_families_output_body_instance = ListMalwareFamiliesOutputBody.from_json(json) +# print the JSON string representation of the object +print(ListMalwareFamiliesOutputBody.to_json()) + +# convert the object into a dict +list_malware_families_output_body_dict = list_malware_families_output_body_instance.to_dict() +# create an instance of ListMalwareFamiliesOutputBody from a dict +list_malware_families_output_body_from_dict = ListMalwareFamiliesOutputBody.from_dict(list_malware_families_output_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MalwareFamily.md b/docs/MalwareFamily.md new file mode 100644 index 00000000..5211ee11 --- /dev/null +++ b/docs/MalwareFamily.md @@ -0,0 +1,31 @@ +# MalwareFamily + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**binary_ids** | **List[int]** | Every binary in the RevEng.AI malware corpus in this family, matched or not | +**matched_binary_ids** | **List[int]** | Requested binaries in this family | +**name** | **str** | Family name, lowercase without punctuation | + +## Example + +```python +from revengai.models.malware_family import MalwareFamily + +# TODO update the JSON string below +json = "{}" +# create an instance of MalwareFamily from a JSON string +malware_family_instance = MalwareFamily.from_json(json) +# print the JSON string representation of the object +print(MalwareFamily.to_json()) + +# convert the object into a dict +malware_family_dict = malware_family_instance.to_dict() +# create an instance of MalwareFamily from a dict +malware_family_from_dict = MalwareFamily.from_dict(malware_family_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OperationCostBody.md b/docs/OperationCostBody.md new file mode 100644 index 00000000..61df16b7 --- /dev/null +++ b/docs/OperationCostBody.md @@ -0,0 +1,31 @@ +# OperationCostBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**base_credits** | **float** | Credits the operation is estimated to use regardless of the binary's size | +**credits_per_function** | **float** | Credits the operation is estimated to use per function in the binary | +**operation** | **str** | The operation, as requested when creating an analysis, or binary-analysis for the analysis itself | + +## Example + +```python +from revengai.models.operation_cost_body import OperationCostBody + +# TODO update the JSON string below +json = "{}" +# create an instance of OperationCostBody from a JSON string +operation_cost_body_instance = OperationCostBody.from_json(json) +# print the JSON string representation of the object +print(OperationCostBody.to_json()) + +# convert the object into a dict +operation_cost_body_dict = operation_cost_body_instance.to_dict() +# create an instance of OperationCostBody from a dict +operation_cost_body_from_dict = OperationCostBody.from_dict(operation_cost_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PutAnalysisStringsRequest.md b/docs/PutAnalysisStringsRequest.md deleted file mode 100644 index 4180aadf..00000000 --- a/docs/PutAnalysisStringsRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# PutAnalysisStringsRequest - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**strings** | [**List[AnalysisStringInput]**](AnalysisStringInput.md) | The strings to add to the analysis | - -## Example - -```python -from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of PutAnalysisStringsRequest from a JSON string -put_analysis_strings_request_instance = PutAnalysisStringsRequest.from_json(json) -# print the JSON string representation of the object -print(PutAnalysisStringsRequest.to_json()) - -# convert the object into a dict -put_analysis_strings_request_dict = put_analysis_strings_request_instance.to_dict() -# create an instance of PutAnalysisStringsRequest from a dict -put_analysis_strings_request_from_dict = PutAnalysisStringsRequest.from_dict(put_analysis_strings_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RecordedFeedback.md b/docs/RecordedFeedback.md new file mode 100644 index 00000000..2ed0772b --- /dev/null +++ b/docs/RecordedFeedback.md @@ -0,0 +1,30 @@ +# RecordedFeedback + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metadata** | **Dict[str, object]** | The context recorded with the feedback, or null when there is none | +**sentiment** | **str** | The sentiment the caller recorded, or null when they have not left any | + +## Example + +```python +from revengai.models.recorded_feedback import RecordedFeedback + +# TODO update the JSON string below +json = "{}" +# create an instance of RecordedFeedback from a JSON string +recorded_feedback_instance = RecordedFeedback.from_json(json) +# print the JSON string representation of the object +print(RecordedFeedback.to_json()) + +# convert the object into a dict +recorded_feedback_dict = recorded_feedback_instance.to_dict() +# create an instance of RecordedFeedback from a dict +recorded_feedback_from_dict = RecordedFeedback.from_dict(recorded_feedback_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RenderedToken.md b/docs/RenderedToken.md index 817ee1d6..08a03bda 100644 --- a/docs/RenderedToken.md +++ b/docs/RenderedToken.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **data_type_id** | **int** | Data type this token names, or for a field the type that declares it. Scoped by the response's analysis_id. | [optional] +**enum_value** | **str** | Integer value of an enum the decompiler recovered a name for. Absent for an unnamed enum, which already renders as its value. | [optional] **function_id** | **int** | Function this token calls or names. Absent when the address reaches no function of this binary. | [optional] **imported_function_id** | **int** | Imported function this token calls. Set instead of function_id for an external call. | [optional] **kind** | **str** | What the token names. | diff --git a/docs/SizeBucketBody.md b/docs/SizeBucketBody.md new file mode 100644 index 00000000..cb8d1f12 --- /dev/null +++ b/docs/SizeBucketBody.md @@ -0,0 +1,31 @@ +# SizeBucketBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**below_bytes** | **int** | Exclusive upper bound of the bucket, in bytes. Null for the last bucket, which has no upper bound. | +**functions** | **int** | Functions a binary this size is estimated to have | +**uncertain** | **bool** | True where too few operations have run on binaries this size for the estimate to be reliable | + +## Example + +```python +from revengai.models.size_bucket_body import SizeBucketBody + +# TODO update the JSON string below +json = "{}" +# create an instance of SizeBucketBody from a JSON string +size_bucket_body_instance = SizeBucketBody.from_json(json) +# print the JSON string representation of the object +print(SizeBucketBody.to_json()) + +# convert the object into a dict +size_bucket_body_dict = size_bucket_body_instance.to_dict() +# create an instance of SizeBucketBody from a dict +size_bucket_body_from_dict = SizeBucketBody.from_dict(size_bucket_body_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StringFunctions.md b/docs/StringFunctions.md deleted file mode 100644 index 975215cf..00000000 --- a/docs/StringFunctions.md +++ /dev/null @@ -1,32 +0,0 @@ -# StringFunctions - -This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | The value of the string literal | -**functions** | [**List[AppApiRestV2FunctionsResponsesFunction]**](AppApiRestV2FunctionsResponsesFunction.md) | The function ids the string literal was found within | -**source** | [**StringSource**](StringSource.md) | The source of the string | [optional] - -## Example - -```python -from revengai.models.string_functions import StringFunctions - -# TODO update the JSON string below -json = "{}" -# create an instance of StringFunctions from a JSON string -string_functions_instance = StringFunctions.from_json(json) -# print the JSON string representation of the object -print(StringFunctions.to_json()) - -# convert the object into a dict -string_functions_dict = string_functions_instance.to_dict() -# create an instance of StringFunctions from a dict -string_functions_from_dict = StringFunctions.from_dict(string_functions_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/StringSource.md b/docs/StringSource.md deleted file mode 100644 index 63dd7bde..00000000 --- a/docs/StringSource.md +++ /dev/null @@ -1,16 +0,0 @@ -# StringSource - - -## Enum - -* `SYSTEM` (value: `'SYSTEM'`) - -* `USER` (value: `'USER'`) - -* `AI_AGENT` (value: `'AI_AGENT'`) - -* `UNKNOWN_DEFAULT_OPEN_API` (value: `'unknown_default_open_api'`) - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ToolCallResultData.md b/docs/ToolCallResultData.md index 7ced8187..930fc20c 100644 --- a/docs/ToolCallResultData.md +++ b/docs/ToolCallResultData.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**binary_name** | **str** | | [optional] +**function_name** | **str** | | [optional] **is_error** | **bool** | | [optional] **result** | **str** | | [optional] **tool_call_id** | **str** | | [optional] diff --git a/docs/TriageFunction.md b/docs/TriageFunction.md index f03cd4e8..f6c04f9c 100644 --- a/docs/TriageFunction.md +++ b/docs/TriageFunction.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **address** | **int** | Virtual address of the function | **capabilities** | **List[str]** | Capability categories the function exhibits | +**capability_implementations** | [**List[CapabilityImplementation]**](CapabilityImplementation.md) | How the function implements each assigned capability. Absent when the run did not record any. | [optional] **id** | **int** | ID of the function | **score** | **float** | Maliciousness score for the function, 0 to 1 | **summary** | **str** | What the function does | diff --git a/docs/UpdateProfileInputBody.md b/docs/UpdateProfileInputBody.md index 9cd46919..709b579d 100644 --- a/docs/UpdateProfileInputBody.md +++ b/docs/UpdateProfileInputBody.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**agent_chat_layout** | **str** | Agent chat layout: floating over the page, or fixed below it | [optional] **default_team_id** | **int** | Default team ID | [optional] **first_name** | **str** | First name | [optional] **hide_ai_decompilation_comments** | **bool** | Hide AI decompilation comments across the platform | [optional] diff --git a/docs/UserProfile.md b/docs/UserProfile.md index 61abc6d9..8608cc69 100644 --- a/docs/UserProfile.md +++ b/docs/UserProfile.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**agent_chat_layout** | **str** | | **default_team_id** | **int** | | [optional] **first_name** | **str** | | **hide_ai_decompilation_comments** | **bool** | | diff --git a/revengai/__init__.py b/revengai/__init__.py index 749632a8..02dfad84 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v4.75.0" +__version__ = "v4.77.1" # Define package exports __all__ = [ @@ -24,6 +24,7 @@ "AnalysesResultsMetadataApi", "AnalysesXRefsApi", "AuthenticationUsersApi", + "BillingApi", "BinariesApi", "CollectionsApi", "ConfigApi", @@ -105,10 +106,7 @@ "AnalysisRequirement", "AnalysisScope", "AnalysisStringFunction", - "AnalysisStringInput", "AnalysisStringItem", - "AnalysisStringsResponse", - "AnalysisStringsStatusResponse", "AnalysisTagBody", "AnalysisTags", "AnalysisTagsOutputBody", @@ -121,8 +119,6 @@ "AppApiRestV2AgentSchemaCapability", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", - "AppApiRestV2FunctionsResponsesFunction", - "AppApiRestV2FunctionsTypesFunction", "AppApiRestV2InfoTypesCapability", "ArchiveContentEntry", "ArrayDataType", @@ -142,8 +138,6 @@ "BaseResponseAnalysisFunctionMapping", "BaseResponseAnalysisFunctions", "BaseResponseAnalysisFunctionsList", - "BaseResponseAnalysisStringsResponse", - "BaseResponseAnalysisStringsStatusResponse", "BaseResponseAnalysisTags", "BaseResponseAnalysisUpdateTagsResponse", "BaseResponseBasic", @@ -168,7 +162,6 @@ "BaseResponseFunctionBlocksResponse", "BaseResponseFunctionCapabilityResponse", "BaseResponseFunctionSearchResponse", - "BaseResponseFunctionStringsResponse", "BaseResponseFunctionsDetailResponse", "BaseResponseGetPublicUserResponse", "BaseResponseListCalleesCallerFunctionsResponse", @@ -201,7 +194,6 @@ "BatchRenameItem", "BatchRenameOutputBody", "BinariesRelatedStatusResponse", - "BinariesTaskStatus", "Binary", "BinaryAdditionalDetailsDataResponse", "BinaryAdditionalResponse", @@ -241,6 +233,7 @@ "CapabilitiesResult", "Capability", "CapabilityEntry", + "CapabilityImplementation", "ChildBinariesResponse", "CodeSignatureModel", "CollectionBinariesUpdateRequest", @@ -317,6 +310,7 @@ "CryptoScanMetadata", "CryptoScanResult", "CryptoVerification", + "CurrentUser", "DailyAnalysesCountOutputBody", "DailyCountBody", "DataTypeEntry", @@ -331,6 +325,7 @@ "DecompilationData", "DecompilerSummary", "DecompilerSummaryEvidence", + "DeleteMeBody", "DieMatch", "DisassemblyOutputBody", "DisassemblySummaryEvidence", @@ -339,6 +334,8 @@ "DrakvufFileMetadata", "DynamicExecutionMetadata", "DynamicExecutionResult", + "DynamicExecutionRun", + "DynamicExecutionRunConfig", "DynamicExecutionStatus", "DynamicExecutionSummary", "DynamicExecutionSummaryMetadata", @@ -408,6 +405,7 @@ "ExtractedURL", "ExtractionFailure", "FeedbackOutputBody", + "FeedbackSubmission", "FileActivityEntry", "FileFormat", "FileHashes", @@ -427,6 +425,7 @@ "FindingCountsBody", "FindingEvidenceInner", "FormFile", + "Function", "FunctionBlockDestinationResponse", "FunctionBlockResponse", "FunctionBlocksResponse", @@ -453,9 +452,7 @@ "FunctionSimilarity", "FunctionSimilarityEvidence", "FunctionSourceType", - "FunctionString", "FunctionStringItem", - "FunctionStringsResponse", "FunctionTypeDefinition", "FunctionUsage", "FunctionsDetailResponse", @@ -471,6 +468,7 @@ "GetBinaryExternalsOutputBody", "GetCollectionOutputBody", "GetConfigOutputBody", + "GetCreditEstimatesOutputBody", "GetDataTypeHistoryBody", "GetDieInfoOutputBody", "GetFindingOutputBody", @@ -530,6 +528,7 @@ "ListCollectionsOutputBody", "ListConversationsOutputBody", "ListDataTypeFunctionsBody", + "ListDynamicExecutionRunsOutputBody", "ListExampleAnalysesOutputBody", "ListFindingsOutputBody", "ListFunctionGlobalsOutputBody", @@ -538,6 +537,7 @@ "ListGlobalFunctionsOutputBody", "ListImportedFunctionsOutputBody", "ListInvestigationsOutputBody", + "ListMalwareFamiliesOutputBody", "ListOperationPrerequisitesOutputBody", "ListPrincipalsOutputBody", "ListPublicUsersOutputBody", @@ -549,6 +549,7 @@ "Logs", "LookupAnalysisByBinaryIDOutputBody", "MITRETechnique", + "MalwareFamily", "MatchFilters", "MatchedFunction", "MemdumpEntry", @@ -578,6 +579,7 @@ "OIDCCallbackInputBody", "OperandXref", "OperationBinaryExportMetadataBinaryExportResult", + "OperationCostBody", "OperationCreateMetadataCreateResult", "OperationCryptoExplainMetadataCryptoExplainResult", "OperationCryptoScanMetadataCryptoScanResult", @@ -636,11 +638,11 @@ "ProtocolsAgentResponse", "PublicTeamBody", "PublicUserBody", - "PutAnalysisStringsRequest", "QueuedWorkflowTaskResponse", "RatingOutputBody", "ReAnalysisForm", "Recent", + "RecordedFeedback", "ReferencedConstant", "ReferencedConstantEvidence", "RefreshBody", @@ -727,6 +729,7 @@ "SingleCodeSignatureModel", "SinglePDBEntryModel", "SingleSectionModel", + "SizeBucketBody", "SoftwareTypeCountsBody", "SourceDeltaEvent", "SourceResetEvent", @@ -763,10 +766,8 @@ "StepStartedData", "StreamAiDecompilation200ResponseInner", "StreamEvents200ResponseInner", - "StringFunctions", "StringMatch", "StringMatchEvidence", - "StringSource", "StructDataType", "StructDefinition", "Subject", @@ -892,6 +893,7 @@ from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi as AnalysesResultsMetadataApi from revengai.api.analyses_x_refs_api import AnalysesXRefsApi as AnalysesXRefsApi from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi +from revengai.api.billing_api import BillingApi as BillingApi from revengai.api.binaries_api import BinariesApi as BinariesApi from revengai.api.collections_api import CollectionsApi as CollectionsApi from revengai.api.config_api import ConfigApi as ConfigApi @@ -977,10 +979,7 @@ from revengai.models.analysis_requirement import AnalysisRequirement as AnalysisRequirement from revengai.models.analysis_scope import AnalysisScope as AnalysisScope from revengai.models.analysis_string_function import AnalysisStringFunction as AnalysisStringFunction -from revengai.models.analysis_string_input import AnalysisStringInput as AnalysisStringInput from revengai.models.analysis_string_item import AnalysisStringItem as AnalysisStringItem -from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse -from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse as AnalysisStringsStatusResponse from revengai.models.analysis_tag_body import AnalysisTagBody as AnalysisTagBody from revengai.models.analysis_tags import AnalysisTags as AnalysisTags from revengai.models.analysis_tags_output_body import AnalysisTagsOutputBody as AnalysisTagsOutputBody @@ -993,8 +992,6 @@ from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability as AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy -from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction -from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability as AppApiRestV2InfoTypesCapability from revengai.models.archive_content_entry import ArchiveContentEntry as ArchiveContentEntry from revengai.models.array_data_type import ArrayDataType as ArrayDataType @@ -1014,8 +1011,6 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping as BaseResponseAnalysisFunctionMapping from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList as BaseResponseAnalysisFunctionsList -from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse -from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse as BaseResponseAnalysisStringsStatusResponse from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse as BaseResponseAnalysisUpdateTagsResponse from revengai.models.base_response_basic import BaseResponseBasic as BaseResponseBasic @@ -1040,7 +1035,6 @@ from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse as BaseResponseFunctionBlocksResponse from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse as BaseResponseFunctionCapabilityResponse from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse as BaseResponseFunctionSearchResponse -from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse as BaseResponseFunctionStringsResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse as BaseResponseFunctionsDetailResponse from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse as BaseResponseGetPublicUserResponse from revengai.models.base_response_list_callees_caller_functions_response import BaseResponseListCalleesCallerFunctionsResponse as BaseResponseListCalleesCallerFunctionsResponse @@ -1073,7 +1067,6 @@ from revengai.models.batch_rename_item import BatchRenameItem as BatchRenameItem from revengai.models.batch_rename_output_body import BatchRenameOutputBody as BatchRenameOutputBody from revengai.models.binaries_related_status_response import BinariesRelatedStatusResponse as BinariesRelatedStatusResponse -from revengai.models.binaries_task_status import BinariesTaskStatus as BinariesTaskStatus from revengai.models.binary import Binary as Binary from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse as BinaryAdditionalDetailsDataResponse from revengai.models.binary_additional_response import BinaryAdditionalResponse as BinaryAdditionalResponse @@ -1113,6 +1106,7 @@ from revengai.models.capabilities_result import CapabilitiesResult as CapabilitiesResult from revengai.models.capability import Capability as Capability from revengai.models.capability_entry import CapabilityEntry as CapabilityEntry +from revengai.models.capability_implementation import CapabilityImplementation as CapabilityImplementation from revengai.models.child_binaries_response import ChildBinariesResponse as ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel as CodeSignatureModel from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest as CollectionBinariesUpdateRequest @@ -1189,6 +1183,7 @@ from revengai.models.crypto_scan_metadata import CryptoScanMetadata as CryptoScanMetadata from revengai.models.crypto_scan_result import CryptoScanResult as CryptoScanResult from revengai.models.crypto_verification import CryptoVerification as CryptoVerification +from revengai.models.current_user import CurrentUser as CurrentUser from revengai.models.daily_analyses_count_output_body import DailyAnalysesCountOutputBody as DailyAnalysesCountOutputBody from revengai.models.daily_count_body import DailyCountBody as DailyCountBody from revengai.models.data_type_entry import DataTypeEntry as DataTypeEntry @@ -1203,6 +1198,7 @@ from revengai.models.decompilation_data import DecompilationData as DecompilationData from revengai.models.decompiler_summary import DecompilerSummary as DecompilerSummary from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence as DecompilerSummaryEvidence +from revengai.models.delete_me_body import DeleteMeBody as DeleteMeBody from revengai.models.die_match import DieMatch as DieMatch from revengai.models.disassembly_output_body import DisassemblyOutputBody as DisassemblyOutputBody from revengai.models.disassembly_summary_evidence import DisassemblySummaryEvidence as DisassemblySummaryEvidence @@ -1211,6 +1207,8 @@ from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata as DrakvufFileMetadata from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata as DynamicExecutionMetadata from revengai.models.dynamic_execution_result import DynamicExecutionResult as DynamicExecutionResult +from revengai.models.dynamic_execution_run import DynamicExecutionRun as DynamicExecutionRun +from revengai.models.dynamic_execution_run_config import DynamicExecutionRunConfig as DynamicExecutionRunConfig from revengai.models.dynamic_execution_status import DynamicExecutionStatus as DynamicExecutionStatus from revengai.models.dynamic_execution_summary import DynamicExecutionSummary as DynamicExecutionSummary from revengai.models.dynamic_execution_summary_metadata import DynamicExecutionSummaryMetadata as DynamicExecutionSummaryMetadata @@ -1280,6 +1278,7 @@ from revengai.models.extracted_url import ExtractedURL as ExtractedURL from revengai.models.extraction_failure import ExtractionFailure as ExtractionFailure from revengai.models.feedback_output_body import FeedbackOutputBody as FeedbackOutputBody +from revengai.models.feedback_submission import FeedbackSubmission as FeedbackSubmission from revengai.models.file_activity_entry import FileActivityEntry as FileActivityEntry from revengai.models.file_format import FileFormat as FileFormat from revengai.models.file_hashes import FileHashes as FileHashes @@ -1299,6 +1298,7 @@ from revengai.models.finding_counts_body import FindingCountsBody as FindingCountsBody from revengai.models.finding_evidence_inner import FindingEvidenceInner as FindingEvidenceInner from revengai.models.form_file import FormFile as FormFile +from revengai.models.function import Function as Function from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse @@ -1325,9 +1325,7 @@ from revengai.models.function_similarity import FunctionSimilarity as FunctionSimilarity from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence as FunctionSimilarityEvidence from revengai.models.function_source_type import FunctionSourceType as FunctionSourceType -from revengai.models.function_string import FunctionString as FunctionString from revengai.models.function_string_item import FunctionStringItem as FunctionStringItem -from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse from revengai.models.function_type_definition import FunctionTypeDefinition as FunctionTypeDefinition from revengai.models.function_usage import FunctionUsage as FunctionUsage from revengai.models.functions_detail_response import FunctionsDetailResponse as FunctionsDetailResponse @@ -1343,6 +1341,7 @@ from revengai.models.get_binary_externals_output_body import GetBinaryExternalsOutputBody as GetBinaryExternalsOutputBody from revengai.models.get_collection_output_body import GetCollectionOutputBody as GetCollectionOutputBody from revengai.models.get_config_output_body import GetConfigOutputBody as GetConfigOutputBody +from revengai.models.get_credit_estimates_output_body import GetCreditEstimatesOutputBody as GetCreditEstimatesOutputBody from revengai.models.get_data_type_history_body import GetDataTypeHistoryBody as GetDataTypeHistoryBody from revengai.models.get_die_info_output_body import GetDieInfoOutputBody as GetDieInfoOutputBody from revengai.models.get_finding_output_body import GetFindingOutputBody as GetFindingOutputBody @@ -1402,6 +1401,7 @@ from revengai.models.list_collections_output_body import ListCollectionsOutputBody as ListCollectionsOutputBody from revengai.models.list_conversations_output_body import ListConversationsOutputBody as ListConversationsOutputBody from revengai.models.list_data_type_functions_body import ListDataTypeFunctionsBody as ListDataTypeFunctionsBody +from revengai.models.list_dynamic_execution_runs_output_body import ListDynamicExecutionRunsOutputBody as ListDynamicExecutionRunsOutputBody from revengai.models.list_example_analyses_output_body import ListExampleAnalysesOutputBody as ListExampleAnalysesOutputBody from revengai.models.list_findings_output_body import ListFindingsOutputBody as ListFindingsOutputBody from revengai.models.list_function_globals_output_body import ListFunctionGlobalsOutputBody as ListFunctionGlobalsOutputBody @@ -1410,6 +1410,7 @@ from revengai.models.list_global_functions_output_body import ListGlobalFunctionsOutputBody as ListGlobalFunctionsOutputBody from revengai.models.list_imported_functions_output_body import ListImportedFunctionsOutputBody as ListImportedFunctionsOutputBody from revengai.models.list_investigations_output_body import ListInvestigationsOutputBody as ListInvestigationsOutputBody +from revengai.models.list_malware_families_output_body import ListMalwareFamiliesOutputBody as ListMalwareFamiliesOutputBody from revengai.models.list_operation_prerequisites_output_body import ListOperationPrerequisitesOutputBody as ListOperationPrerequisitesOutputBody from revengai.models.list_principals_output_body import ListPrincipalsOutputBody as ListPrincipalsOutputBody from revengai.models.list_public_users_output_body import ListPublicUsersOutputBody as ListPublicUsersOutputBody @@ -1421,6 +1422,7 @@ from revengai.models.logs import Logs as Logs from revengai.models.lookup_analysis_by_binary_id_output_body import LookupAnalysisByBinaryIDOutputBody as LookupAnalysisByBinaryIDOutputBody from revengai.models.mitre_technique import MITRETechnique as MITRETechnique +from revengai.models.malware_family import MalwareFamily as MalwareFamily from revengai.models.match_filters import MatchFilters as MatchFilters from revengai.models.matched_function import MatchedFunction as MatchedFunction from revengai.models.memdump_entry import MemdumpEntry as MemdumpEntry @@ -1450,6 +1452,7 @@ from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody as OIDCCallbackInputBody from revengai.models.operand_xref import OperandXref as OperandXref from revengai.models.operation_binary_export_metadata_binary_export_result import OperationBinaryExportMetadataBinaryExportResult as OperationBinaryExportMetadataBinaryExportResult +from revengai.models.operation_cost_body import OperationCostBody as OperationCostBody from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult as OperationCreateMetadataCreateResult from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult as OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult as OperationCryptoScanMetadataCryptoScanResult @@ -1508,11 +1511,11 @@ from revengai.models.protocols_agent_response import ProtocolsAgentResponse as ProtocolsAgentResponse from revengai.models.public_team_body import PublicTeamBody as PublicTeamBody from revengai.models.public_user_body import PublicUserBody as PublicUserBody -from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse as QueuedWorkflowTaskResponse from revengai.models.rating_output_body import RatingOutputBody as RatingOutputBody from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent +from revengai.models.recorded_feedback import RecordedFeedback as RecordedFeedback from revengai.models.referenced_constant import ReferencedConstant as ReferencedConstant from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence as ReferencedConstantEvidence from revengai.models.refresh_body import RefreshBody as RefreshBody @@ -1599,6 +1602,7 @@ from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel from revengai.models.single_section_model import SingleSectionModel as SingleSectionModel +from revengai.models.size_bucket_body import SizeBucketBody as SizeBucketBody from revengai.models.software_type_counts_body import SoftwareTypeCountsBody as SoftwareTypeCountsBody from revengai.models.source_delta_event import SourceDeltaEvent as SourceDeltaEvent from revengai.models.source_reset_event import SourceResetEvent as SourceResetEvent @@ -1635,10 +1639,8 @@ from revengai.models.step_started_data import StepStartedData as StepStartedData from revengai.models.stream_ai_decompilation200_response_inner import StreamAiDecompilation200ResponseInner as StreamAiDecompilation200ResponseInner from revengai.models.stream_events200_response_inner import StreamEvents200ResponseInner as StreamEvents200ResponseInner -from revengai.models.string_functions import StringFunctions as StringFunctions from revengai.models.string_match import StringMatch as StringMatch from revengai.models.string_match_evidence import StringMatchEvidence as StringMatchEvidence -from revengai.models.string_source import StringSource as StringSource from revengai.models.struct_data_type import StructDataType as StructDataType from revengai.models.struct_definition import StructDefinition as StructDefinition from revengai.models.subject import Subject as Subject diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index 55f2ea8e..39a57d14 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -8,6 +8,7 @@ from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi from revengai.api.analyses_x_refs_api import AnalysesXRefsApi from revengai.api.authentication_users_api import AuthenticationUsersApi +from revengai.api.billing_api import BillingApi from revengai.api.binaries_api import BinariesApi from revengai.api.collections_api import CollectionsApi from revengai.api.config_api import ConfigApi diff --git a/revengai/api/agent_api.py b/revengai/api/agent_api.py index 7c6c5e9d..2ea561b3 100644 --- a/revengai/api/agent_api.py +++ b/revengai/api/agent_api.py @@ -11192,7 +11192,7 @@ def v3_run_capabilities( ) -> OperationMetadataCapabilitiesResult: """Run the capabilities agent. - Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -11265,7 +11265,7 @@ def v3_run_capabilities_with_http_info( ) -> ApiResponse[OperationMetadataCapabilitiesResult]: """Run the capabilities agent. - Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -11338,7 +11338,7 @@ def v3_run_capabilities_without_preload_content( ) -> RESTResponseType: """Run the capabilities agent. - Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the capabilities agent, which attributes behavioural capabilities to individual functions, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -11753,7 +11753,7 @@ def v3_run_crypto_scan( ) -> OperationCryptoScanMetadataCryptoScanResult: """Run the crypto-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -11829,7 +11829,7 @@ def v3_run_crypto_scan_with_http_info( ) -> ApiResponse[OperationCryptoScanMetadataCryptoScanResult]: """Run the crypto-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -11905,7 +11905,7 @@ def v3_run_crypto_scan_without_preload_content( ) -> RESTResponseType: """Run the crypto-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known crypto-library APIs, and returns the operation to poll for its outcome. Purely name-based — never triggers AI decompilation, so it costs no credits and runs in seconds. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12057,7 +12057,7 @@ def v3_run_cryptography( ) -> OperationMetadataReportResult: """Run the cryptography agent. - Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12130,7 +12130,7 @@ def v3_run_cryptography_with_http_info( ) -> ApiResponse[OperationMetadataReportResult]: """Run the cryptography agent. - Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12203,7 +12203,7 @@ def v3_run_cryptography_without_preload_content( ) -> RESTResponseType: """Run the cryptography agent. - Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the cryptography agent, which identifies cryptographic operations in the binary and reports its findings, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12646,7 +12646,7 @@ def v3_run_execution_scan( ) -> OperationExecutionScanMetadataExecutionScanResult: """Run the execution-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12722,7 +12722,7 @@ def v3_run_execution_scan_with_http_info( ) -> ApiResponse[OperationExecutionScanMetadataExecutionScanResult]: """Run the execution-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -12798,7 +12798,7 @@ def v3_run_execution_scan_without_preload_content( ) -> RESTResponseType: """Run the execution-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known code-execution APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -13259,7 +13259,7 @@ def v3_run_filesystem_scan( ) -> OperationFilesystemScanMetadataFilesystemScanResult: """Run the filesystem-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -13335,7 +13335,7 @@ def v3_run_filesystem_scan_with_http_info( ) -> ApiResponse[OperationFilesystemScanMetadataFilesystemScanResult]: """Run the filesystem-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -13411,7 +13411,7 @@ def v3_run_filesystem_scan_without_preload_content( ) -> RESTResponseType: """Run the filesystem-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known filesystem/system APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -13872,7 +13872,7 @@ def v3_run_networking_scan( ) -> OperationNetworkingScanMetadataNetworkingScanResult: """Run the networking-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -13948,7 +13948,7 @@ def v3_run_networking_scan_with_http_info( ) -> ApiResponse[OperationNetworkingScanMetadataNetworkingScanResult]: """Run the networking-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14024,7 +14024,7 @@ def v3_run_networking_scan_without_preload_content( ) -> RESTResponseType: """Run the networking-scan agent. - Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts an agent that name-matches the analysis' functions and their callees against known networking APIs, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14176,7 +14176,7 @@ def v3_run_protocols( ) -> OperationMetadataReportResult: """Run the protocols agent. - Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14249,7 +14249,7 @@ def v3_run_protocols_with_http_info( ) -> ApiResponse[OperationMetadataReportResult]: """Run the protocols agent. - Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14322,7 +14322,7 @@ def v3_run_protocols_without_preload_content( ) -> RESTResponseType: """Run the protocols agent. - Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the protocols agent, which identifies the network and data protocols the binary implements, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14456,7 +14456,7 @@ def v3_run_remediation( ) -> OperationMetadataRemediationResult: """Run the remediation agent. - Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14529,7 +14529,7 @@ def v3_run_remediation_with_http_info( ) -> ApiResponse[OperationMetadataRemediationResult]: """Run the remediation agent. - Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14602,7 +14602,7 @@ def v3_run_remediation_without_preload_content( ) -> RESTResponseType: """Run the remediation agent. - Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the remediation agent, which generates YARA, Snort and STIX detection rules for the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14736,7 +14736,7 @@ def v3_run_report_analysis( ) -> OperationMetadataThreatReportResult: """Run the report-analysis agent. - Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14809,7 +14809,7 @@ def v3_run_report_analysis_with_http_info( ) -> ApiResponse[OperationMetadataThreatReportResult]: """Run the report-analysis agent. - Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14882,7 +14882,7 @@ def v3_run_report_analysis_without_preload_content( ) -> RESTResponseType: """Run the report-analysis agent. - Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the report-analysis agent, which produces a combined threat report — summary, software type, attack flow, indicators of compromise, MITRE ATT&CK techniques and a YARA rule — and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15016,7 +15016,7 @@ def v3_run_secrets( ) -> OperationMetadataReportResult: """Run the secrets agent. - Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15089,7 +15089,7 @@ def v3_run_secrets_with_http_info( ) -> ApiResponse[OperationMetadataReportResult]: """Run the secrets agent. - Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15162,7 +15162,7 @@ def v3_run_secrets_without_preload_content( ) -> RESTResponseType: """Run the secrets agent. - Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the secrets agent, which finds credentials and other hardcoded secrets in the binary, and returns the operation to poll for its outcome. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15297,7 +15297,7 @@ def v3_run_security_scan( ) -> OperationSecurityScanMetadataSecurityScanResult: """Run the security-scan agent. - Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15374,7 +15374,7 @@ def v3_run_security_scan_with_http_info( ) -> ApiResponse[OperationSecurityScanMetadataSecurityScanResult]: """Run the security-scan agent. - Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15451,7 +15451,7 @@ def v3_run_security_scan_without_preload_content( ) -> RESTResponseType: """Run the security-scan agent. - Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that decompiles the analysis' functions and runs a security scan over the decompiled source, and returns the operation to poll for its outcome. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `max_functions_to_scan` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15604,7 +15604,7 @@ def v3_run_triage( ) -> OperationMetadataTriageResult: """Run the triage agent. - Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15677,7 +15677,7 @@ def v3_run_triage_with_http_info( ) -> ApiResponse[OperationMetadataTriageResult]: """Run the triage agent. - Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15750,7 +15750,7 @@ def v3_run_triage_without_preload_content( ) -> RESTResponseType: """Run the triage agent. - Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met + Starts the triage agent, which scores the binary and each of its functions for maliciousness, and returns the operation to poll for its outcome. Unlike the other binary agents this one is not gated on subscription tier. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`OPERATION_PREREQUISITE_NOT_MET`](/errors/OPERATION_PREREQUISITE_NOT_MET) — Operation Prerequisite Not Met - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15885,7 +15885,7 @@ def v3_trigger_rename_unnamed_functions( ) -> StatusBody: """Run the rename-unnamed-functions agent. - Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -15962,7 +15962,7 @@ def v3_trigger_rename_unnamed_functions_with_http_info( ) -> ApiResponse[StatusBody]: """Run the rename-unnamed-functions agent. - Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -16039,7 +16039,7 @@ def v3_trigger_rename_unnamed_functions_without_preload_content( ) -> RESTResponseType: """Run the rename-unnamed-functions agent. - Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits + Starts an agent that renames the analysis' unnamed functions from their AI decompilations. Each function costs an AI decompilation, so a whole-analysis run can be expensive — use `limit` to bound it. Returns 409 until the analysis is Complete, or while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int diff --git a/revengai/api/analyses_core_api.py b/revengai/api/analyses_core_api.py index 9538e6a4..8d2fbab9 100644 --- a/revengai/api/analyses_core_api.py +++ b/revengai/api/analyses_core_api.py @@ -43,6 +43,7 @@ from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_upload_response import BaseResponseUploadResponse from revengai.models.create_request import CreateRequest +from revengai.models.dynamic_execution_run import DynamicExecutionRun from revengai.models.dynamic_execution_status import DynamicExecutionStatus from revengai.models.dynamic_execution_summary import DynamicExecutionSummary from revengai.models.functions_progress_output_body import FunctionsProgressOutputBody @@ -58,6 +59,7 @@ from revengai.models.list_analyses_output_body import ListAnalysesOutputBody from revengai.models.list_analysis_globals_output_body import ListAnalysisGlobalsOutputBody from revengai.models.list_analysis_strings_output_body import ListAnalysisStringsOutputBody +from revengai.models.list_dynamic_execution_runs_output_body import ListDynamicExecutionRunsOutputBody from revengai.models.list_example_analyses_output_body import ListExampleAnalysesOutputBody from revengai.models.list_global_functions_output_body import ListGlobalFunctionsOutputBody from revengai.models.lookup_analysis_by_binary_id_output_body import LookupAnalysisByBinaryIDOutputBody @@ -67,7 +69,6 @@ from revengai.models.operation_dynamic_execution_metadata_dynamic_execution_result import OperationDynamicExecutionMetadataDynamicExecutionResult from revengai.models.operation_dynamic_execution_summary_metadata_dynamic_execution_summary_result import OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult from revengai.models.order import Order -from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.requeue_analysis_request import RequeueAnalysisRequest from revengai.models.run_dynamic_execution_input_body import RunDynamicExecutionInputBody @@ -121,7 +122,7 @@ def add_user_string_to_analysis( ) -> object: """Add a user-provided string to an analysis. - Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -162,6 +163,7 @@ def add_user_string_to_analysis( '201': "object", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -196,7 +198,7 @@ def add_user_string_to_analysis_with_http_info( ) -> ApiResponse[object]: """Add a user-provided string to an analysis. - Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -237,6 +239,7 @@ def add_user_string_to_analysis_with_http_info( '201': "object", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -271,7 +274,7 @@ def add_user_string_to_analysis_without_preload_content( ) -> RESTResponseType: """Add a user-provided string to an analysis. - Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Attaches a user-provided string to an analysis at the given virtual address. The string is stored with source `USER` and complements strings discovered automatically during analysis. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -312,6 +315,7 @@ def add_user_string_to_analysis_without_preload_content( '201': "object", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -4481,10 +4485,11 @@ def _lookup_binary_id_serialize( @validate_call - def put_analysis_strings( + def requeue_analysis( self, analysis_id: StrictInt, - put_analysis_strings_request: PutAnalysisStringsRequest, + re_analysis_form: ReAnalysisForm, + x_rev_eng_application: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4497,15 +4502,17 @@ def put_analysis_strings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponse: - """(Deprecated) Add strings to the analysis + ) -> BaseResponseCreated: + """(Deprecated) Requeue Analysis - Add strings to the analysis. Rejects if any string already exists at the given vaddr. + Re-queues an already uploaded analysis :param analysis_id: (required) :type analysis_id: int - :param put_analysis_strings_request: (required) - :type put_analysis_strings_request: PutAnalysisStringsRequest + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param x_rev_eng_application: + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4527,11 +4534,12 @@ def put_analysis_strings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._put_analysis_strings_serialize( + _param = self._requeue_analysis_serialize( analysis_id=analysis_id, - put_analysis_strings_request=put_analysis_strings_request, + re_analysis_form=re_analysis_form, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4539,8 +4547,10 @@ def put_analysis_strings( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponse", + '201': "BaseResponseCreated", '422': "BaseResponse", + '404': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -4554,10 +4564,11 @@ def put_analysis_strings( @validate_call - def put_analysis_strings_with_http_info( + def requeue_analysis_with_http_info( self, analysis_id: StrictInt, - put_analysis_strings_request: PutAnalysisStringsRequest, + re_analysis_form: ReAnalysisForm, + x_rev_eng_application: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4570,15 +4581,17 @@ def put_analysis_strings_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponse]: - """(Deprecated) Add strings to the analysis + ) -> ApiResponse[BaseResponseCreated]: + """(Deprecated) Requeue Analysis - Add strings to the analysis. Rejects if any string already exists at the given vaddr. + Re-queues an already uploaded analysis :param analysis_id: (required) :type analysis_id: int - :param put_analysis_strings_request: (required) - :type put_analysis_strings_request: PutAnalysisStringsRequest + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param x_rev_eng_application: + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4600,11 +4613,12 @@ def put_analysis_strings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._put_analysis_strings_serialize( + _param = self._requeue_analysis_serialize( analysis_id=analysis_id, - put_analysis_strings_request=put_analysis_strings_request, + re_analysis_form=re_analysis_form, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4612,8 +4626,10 @@ def put_analysis_strings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponse", + '201': "BaseResponseCreated", '422': "BaseResponse", + '404': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -4627,10 +4643,11 @@ def put_analysis_strings_with_http_info( @validate_call - def put_analysis_strings_without_preload_content( + def requeue_analysis_without_preload_content( self, analysis_id: StrictInt, - put_analysis_strings_request: PutAnalysisStringsRequest, + re_analysis_form: ReAnalysisForm, + x_rev_eng_application: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4644,14 +4661,16 @@ def put_analysis_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Add strings to the analysis + """(Deprecated) Requeue Analysis - Add strings to the analysis. Rejects if any string already exists at the given vaddr. + Re-queues an already uploaded analysis :param analysis_id: (required) :type analysis_id: int - :param put_analysis_strings_request: (required) - :type put_analysis_strings_request: PutAnalysisStringsRequest + :param re_analysis_form: (required) + :type re_analysis_form: ReAnalysisForm + :param x_rev_eng_application: + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4673,11 +4692,12 @@ def put_analysis_strings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PUT /v2/analyses/{analysis_id}/strings is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._put_analysis_strings_serialize( + _param = self._requeue_analysis_serialize( analysis_id=analysis_id, - put_analysis_strings_request=put_analysis_strings_request, + re_analysis_form=re_analysis_form, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4685,8 +4705,10 @@ def put_analysis_strings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponse", + '201': "BaseResponseCreated", '422': "BaseResponse", + '404': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -4695,10 +4717,11 @@ def put_analysis_strings_without_preload_content( return response_data.response - def _put_analysis_strings_serialize( + def _requeue_analysis_serialize( self, analysis_id, - put_analysis_strings_request, + re_analysis_form, + x_rev_eng_application, _request_auth, _content_type, _headers, @@ -4724,10 +4747,12 @@ def _put_analysis_strings_serialize( _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters + if x_rev_eng_application is not None: + _header_params['X-RevEng-Application'] = x_rev_eng_application # process the form parameters # process the body parameter - if put_analysis_strings_request is not None: - _body_params = put_analysis_strings_request + if re_analysis_form is not None: + _body_params = re_analysis_form # set the HTTP header `Accept` @@ -4759,8 +4784,8 @@ def _put_analysis_strings_serialize( ] return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/analyses/{analysis_id}/strings', + method='POST', + resource_path='/v2/analyses/{analysis_id}/requeue', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4777,11 +4802,10 @@ def _put_analysis_strings_serialize( @validate_call - def requeue_analysis( + def start_analysis_function_matching( self, - analysis_id: StrictInt, - re_analysis_form: ReAnalysisForm, - x_rev_eng_application: Optional[StrictStr] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4794,17 +4818,15 @@ def requeue_analysis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseCreated: - """(Deprecated) Requeue Analysis + ) -> StartMatchingOutputBody: + """Start function matching for an analysis - Re-queues an already uploaded analysis + Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) + :param analysis_id: Analysis ID (required) :type analysis_id: int - :param re_analysis_form: (required) - :type re_analysis_form: ReAnalysisForm - :param x_rev_eng_application: - :type x_rev_eng_application: str + :param start_matching_for_analysis_input_body: (required) + :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4826,12 +4848,10 @@ def requeue_analysis( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._requeue_analysis_serialize( + _param = self._start_analysis_function_matching_serialize( analysis_id=analysis_id, - re_analysis_form=re_analysis_form, - x_rev_eng_application=x_rev_eng_application, + start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4839,10 +4859,13 @@ def requeue_analysis( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCreated", - '422': "BaseResponse", - '404': "BaseResponse", - '400': "BaseResponse", + '202': "StartMatchingOutputBody", + '400': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -4856,11 +4879,10 @@ def requeue_analysis( @validate_call - def requeue_analysis_with_http_info( + def start_analysis_function_matching_with_http_info( self, - analysis_id: StrictInt, - re_analysis_form: ReAnalysisForm, - x_rev_eng_application: Optional[StrictStr] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4873,17 +4895,15 @@ def requeue_analysis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseCreated]: - """(Deprecated) Requeue Analysis + ) -> ApiResponse[StartMatchingOutputBody]: + """Start function matching for an analysis - Re-queues an already uploaded analysis + Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) + :param analysis_id: Analysis ID (required) :type analysis_id: int - :param re_analysis_form: (required) - :type re_analysis_form: ReAnalysisForm - :param x_rev_eng_application: - :type x_rev_eng_application: str + :param start_matching_for_analysis_input_body: (required) + :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4905,12 +4925,10 @@ def requeue_analysis_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._requeue_analysis_serialize( + _param = self._start_analysis_function_matching_serialize( analysis_id=analysis_id, - re_analysis_form=re_analysis_form, - x_rev_eng_application=x_rev_eng_application, + start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4918,10 +4936,13 @@ def requeue_analysis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCreated", - '422': "BaseResponse", - '404': "BaseResponse", - '400': "BaseResponse", + '202': "StartMatchingOutputBody", + '400': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -4935,11 +4956,10 @@ def requeue_analysis_with_http_info( @validate_call - def requeue_analysis_without_preload_content( + def start_analysis_function_matching_without_preload_content( self, - analysis_id: StrictInt, - re_analysis_form: ReAnalysisForm, - x_rev_eng_application: Optional[StrictStr] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4953,16 +4973,14 @@ def requeue_analysis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Requeue Analysis + """Start function matching for an analysis - Re-queues an already uploaded analysis + Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) + :param analysis_id: Analysis ID (required) :type analysis_id: int - :param re_analysis_form: (required) - :type re_analysis_form: ReAnalysisForm - :param x_rev_eng_application: - :type x_rev_eng_application: str + :param start_matching_for_analysis_input_body: (required) + :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4984,12 +5002,10 @@ def requeue_analysis_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/analyses/{analysis_id}/requeue is deprecated.", DeprecationWarning) - _param = self._requeue_analysis_serialize( + _param = self._start_analysis_function_matching_serialize( analysis_id=analysis_id, - re_analysis_form=re_analysis_form, - x_rev_eng_application=x_rev_eng_application, + start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4997,10 +5013,13 @@ def requeue_analysis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCreated", - '422': "BaseResponse", - '404': "BaseResponse", - '400': "BaseResponse", + '202': "StartMatchingOutputBody", + '400': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -5009,11 +5028,10 @@ def requeue_analysis_without_preload_content( return response_data.response - def _requeue_analysis_serialize( + def _start_analysis_function_matching_serialize( self, analysis_id, - re_analysis_form, - x_rev_eng_application, + start_matching_for_analysis_input_body, _request_auth, _content_type, _headers, @@ -5039,12 +5057,10 @@ def _requeue_analysis_serialize( _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters - if x_rev_eng_application is not None: - _header_params['X-RevEng-Application'] = x_rev_eng_application # process the form parameters # process the body parameter - if re_analysis_form is not None: - _body_params = re_analysis_form + if start_matching_for_analysis_input_body is not None: + _body_params = start_matching_for_analysis_input_body # set the HTTP header `Accept` @@ -5077,7 +5093,7 @@ def _requeue_analysis_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/analyses/{analysis_id}/requeue', + resource_path='/v3/analyses/{analysis_id}/functions/matches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5094,10 +5110,10 @@ def _requeue_analysis_serialize( @validate_call - def start_analysis_function_matching( + def update_analysis( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5110,15 +5126,15 @@ def start_analysis_function_matching( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> StartMatchingOutputBody: - """Start function matching for an analysis + ) -> BaseResponseAnalysisDetailResponse: + """(Deprecated) Update Analysis - Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. - :param analysis_id: Analysis ID (required) + :param analysis_id: (required) :type analysis_id: int - :param start_matching_for_analysis_input_body: (required) - :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5140,10 +5156,11 @@ def start_analysis_function_matching( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) - _param = self._start_analysis_function_matching_serialize( + _param = self._update_analysis_serialize( analysis_id=analysis_id, - start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, + analysis_update_request=analysis_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5151,12 +5168,8 @@ def start_analysis_function_matching( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseAnalysisDetailResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -5170,10 +5183,10 @@ def start_analysis_function_matching( @validate_call - def start_analysis_function_matching_with_http_info( + def update_analysis_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5186,15 +5199,15 @@ def start_analysis_function_matching_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[StartMatchingOutputBody]: - """Start function matching for an analysis + ) -> ApiResponse[BaseResponseAnalysisDetailResponse]: + """(Deprecated) Update Analysis - Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. - :param analysis_id: Analysis ID (required) + :param analysis_id: (required) :type analysis_id: int - :param start_matching_for_analysis_input_body: (required) - :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5216,10 +5229,11 @@ def start_analysis_function_matching_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) - _param = self._start_analysis_function_matching_serialize( + _param = self._update_analysis_serialize( analysis_id=analysis_id, - start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, + analysis_update_request=analysis_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5227,12 +5241,8 @@ def start_analysis_function_matching_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseAnalysisDetailResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -5246,10 +5256,10 @@ def start_analysis_function_matching_with_http_info( @validate_call - def start_analysis_function_matching_without_preload_content( + def update_analysis_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody, + analysis_id: StrictInt, + analysis_update_request: AnalysisUpdateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5263,14 +5273,14 @@ def start_analysis_function_matching_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Start function matching for an analysis + """(Deprecated) Update Analysis - Dispatches the function-matching workflow against every function in the analysis. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Updates analysis attributes (binary_name, analysis_scope). User must be the owner. - :param analysis_id: Analysis ID (required) + :param analysis_id: (required) :type analysis_id: int - :param start_matching_for_analysis_input_body: (required) - :type start_matching_for_analysis_input_body: StartMatchingForAnalysisInputBody + :param analysis_update_request: (required) + :type analysis_update_request: AnalysisUpdateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5292,10 +5302,11 @@ def start_analysis_function_matching_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) - _param = self._start_analysis_function_matching_serialize( + _param = self._update_analysis_serialize( analysis_id=analysis_id, - start_matching_for_analysis_input_body=start_matching_for_analysis_input_body, + analysis_update_request=analysis_update_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5303,12 +5314,8 @@ def start_analysis_function_matching_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseAnalysisDetailResponse", + '422': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -5317,10 +5324,10 @@ def start_analysis_function_matching_without_preload_content( return response_data.response - def _start_analysis_function_matching_serialize( + def _update_analysis_serialize( self, analysis_id, - start_matching_for_analysis_input_body, + analysis_update_request, _request_auth, _content_type, _headers, @@ -5348,8 +5355,8 @@ def _start_analysis_function_matching_serialize( # process the header parameters # process the form parameters # process the body parameter - if start_matching_for_analysis_input_body is not None: - _body_params = start_matching_for_analysis_input_body + if analysis_update_request is not None: + _body_params = analysis_update_request # set the HTTP header `Accept` @@ -5381,8 +5388,8 @@ def _start_analysis_function_matching_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/analyses/{analysis_id}/functions/matches', + method='PATCH', + resource_path='/v2/analyses/{analysis_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5399,10 +5406,10 @@ def _start_analysis_function_matching_serialize( @validate_call - def update_analysis( + def update_analysis_tags( self, analysis_id: StrictInt, - analysis_update_request: AnalysisUpdateRequest, + analysis_update_tags_request: AnalysisUpdateTagsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5415,15 +5422,15 @@ def update_analysis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseAnalysisDetailResponse: - """(Deprecated) Update Analysis + ) -> BaseResponseAnalysisUpdateTagsResponse: + """(Deprecated) Update Analysis Tags - Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + Updates analysis tags. User must be the owner. :param analysis_id: (required) :type analysis_id: int - :param analysis_update_request: (required) - :type analysis_update_request: AnalysisUpdateRequest + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5445,11 +5452,11 @@ def update_analysis( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) - _param = self._update_analysis_serialize( + _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, - analysis_update_request=analysis_update_request, + analysis_update_tags_request=analysis_update_tags_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5457,7 +5464,7 @@ def update_analysis( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisDetailResponse", + '200': "BaseResponseAnalysisUpdateTagsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5472,10 +5479,10 @@ def update_analysis( @validate_call - def update_analysis_with_http_info( + def update_analysis_tags_with_http_info( self, analysis_id: StrictInt, - analysis_update_request: AnalysisUpdateRequest, + analysis_update_tags_request: AnalysisUpdateTagsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5488,15 +5495,15 @@ def update_analysis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseAnalysisDetailResponse]: - """(Deprecated) Update Analysis + ) -> ApiResponse[BaseResponseAnalysisUpdateTagsResponse]: + """(Deprecated) Update Analysis Tags - Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + Updates analysis tags. User must be the owner. :param analysis_id: (required) :type analysis_id: int - :param analysis_update_request: (required) - :type analysis_update_request: AnalysisUpdateRequest + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5518,11 +5525,11 @@ def update_analysis_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) - _param = self._update_analysis_serialize( + _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, - analysis_update_request=analysis_update_request, + analysis_update_tags_request=analysis_update_tags_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5530,7 +5537,7 @@ def update_analysis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisDetailResponse", + '200': "BaseResponseAnalysisUpdateTagsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5545,10 +5552,10 @@ def update_analysis_with_http_info( @validate_call - def update_analysis_without_preload_content( + def update_analysis_tags_without_preload_content( self, analysis_id: StrictInt, - analysis_update_request: AnalysisUpdateRequest, + analysis_update_tags_request: AnalysisUpdateTagsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5562,14 +5569,14 @@ def update_analysis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Update Analysis + """(Deprecated) Update Analysis Tags - Updates analysis attributes (binary_name, analysis_scope). User must be the owner. + Updates analysis tags. User must be the owner. :param analysis_id: (required) :type analysis_id: int - :param analysis_update_request: (required) - :type analysis_update_request: AnalysisUpdateRequest + :param analysis_update_tags_request: (required) + :type analysis_update_tags_request: AnalysisUpdateTagsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5591,11 +5598,11 @@ def update_analysis_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id} is deprecated.", DeprecationWarning) + warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) - _param = self._update_analysis_serialize( + _param = self._update_analysis_tags_serialize( analysis_id=analysis_id, - analysis_update_request=analysis_update_request, + analysis_update_tags_request=analysis_update_tags_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5603,7 +5610,7 @@ def update_analysis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisDetailResponse", + '200': "BaseResponseAnalysisUpdateTagsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5613,10 +5620,10 @@ def update_analysis_without_preload_content( return response_data.response - def _update_analysis_serialize( + def _update_analysis_tags_serialize( self, analysis_id, - analysis_update_request, + analysis_update_tags_request, _request_auth, _content_type, _headers, @@ -5644,8 +5651,8 @@ def _update_analysis_serialize( # process the header parameters # process the form parameters # process the body parameter - if analysis_update_request is not None: - _body_params = analysis_update_request + if analysis_update_tags_request is not None: + _body_params = analysis_update_tags_request # set the HTTP header `Accept` @@ -5678,7 +5685,7 @@ def _update_analysis_serialize( return self.api_client.param_serialize( method='PATCH', - resource_path='/v2/analyses/{analysis_id}', + resource_path='/v2/analyses/{analysis_id}/tags', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5695,10 +5702,12 @@ def _update_analysis_serialize( @validate_call - def update_analysis_tags( + def upload_file( self, - analysis_id: StrictInt, - analysis_update_tags_request: AnalysisUpdateTagsRequest, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + force_overwrite: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5711,15 +5720,18 @@ def update_analysis_tags( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseAnalysisUpdateTagsResponse: - """(Deprecated) Update Analysis Tags + ) -> BaseResponseUploadResponse: + """(Deprecated) Upload File - Updates analysis tags. User must be the owner. - :param analysis_id: (required) - :type analysis_id: int - :param analysis_update_tags_request: (required) - :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param force_overwrite: + :type force_overwrite: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5741,11 +5753,13 @@ def update_analysis_tags( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._update_analysis_tags_serialize( - analysis_id=analysis_id, - analysis_update_tags_request=analysis_update_tags_request, + _param = self._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + force_overwrite=force_overwrite, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5753,7 +5767,7 @@ def update_analysis_tags( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisUpdateTagsResponse", + '200': "BaseResponseUploadResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5768,10 +5782,12 @@ def update_analysis_tags( @validate_call - def update_analysis_tags_with_http_info( + def upload_file_with_http_info( self, - analysis_id: StrictInt, - analysis_update_tags_request: AnalysisUpdateTagsRequest, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + force_overwrite: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5784,15 +5800,18 @@ def update_analysis_tags_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseAnalysisUpdateTagsResponse]: - """(Deprecated) Update Analysis Tags + ) -> ApiResponse[BaseResponseUploadResponse]: + """(Deprecated) Upload File - Updates analysis tags. User must be the owner. - :param analysis_id: (required) - :type analysis_id: int - :param analysis_update_tags_request: (required) - :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param force_overwrite: + :type force_overwrite: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5814,11 +5833,13 @@ def update_analysis_tags_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._update_analysis_tags_serialize( - analysis_id=analysis_id, - analysis_update_tags_request=analysis_update_tags_request, + _param = self._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + force_overwrite=force_overwrite, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5826,7 +5847,7 @@ def update_analysis_tags_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisUpdateTagsResponse", + '200': "BaseResponseUploadResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5841,10 +5862,12 @@ def update_analysis_tags_with_http_info( @validate_call - def update_analysis_tags_without_preload_content( + def upload_file_without_preload_content( self, - analysis_id: StrictInt, - analysis_update_tags_request: AnalysisUpdateTagsRequest, + upload_file_type: UploadFileType, + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], + packed_password: Optional[StrictStr] = None, + force_overwrite: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5858,14 +5881,17 @@ def update_analysis_tags_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Update Analysis Tags + """(Deprecated) Upload File - Updates analysis tags. User must be the owner. - :param analysis_id: (required) - :type analysis_id: int - :param analysis_update_tags_request: (required) - :type analysis_update_tags_request: AnalysisUpdateTagsRequest + :param upload_file_type: (required) + :type upload_file_type: UploadFileType + :param file: (required) + :type file: bytearray + :param packed_password: + :type packed_password: str + :param force_overwrite: + :type force_overwrite: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5887,11 +5913,13 @@ def update_analysis_tags_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("PATCH /v2/analyses/{analysis_id}/tags is deprecated.", DeprecationWarning) + warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._update_analysis_tags_serialize( - analysis_id=analysis_id, - analysis_update_tags_request=analysis_update_tags_request, + _param = self._upload_file_serialize( + upload_file_type=upload_file_type, + file=file, + packed_password=packed_password, + force_overwrite=force_overwrite, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5899,7 +5927,7 @@ def update_analysis_tags_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisUpdateTagsResponse", + '200': "BaseResponseUploadResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -5909,10 +5937,12 @@ def update_analysis_tags_without_preload_content( return response_data.response - def _update_analysis_tags_serialize( + def _upload_file_serialize( self, - analysis_id, - analysis_update_tags_request, + upload_file_type, + file, + packed_password, + force_overwrite, _request_auth, _content_type, _headers, @@ -5934,14 +5964,20 @@ def _update_analysis_tags_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id # process the query parameters + if packed_password is not None: + + _query_params.append(('packed_password', packed_password)) + # process the header parameters # process the form parameters + if upload_file_type is not None: + _form_params.append(('upload_file_type', upload_file_type)) + if file is not None: + _files['file'] = file + if force_overwrite is not None: + _form_params.append(('force_overwrite', force_overwrite)) # process the body parameter - if analysis_update_tags_request is not None: - _body_params = analysis_update_tags_request # set the HTTP header `Accept` @@ -5959,7 +5995,7 @@ def _update_analysis_tags_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'application/json' + 'multipart/form-data' ] ) ) @@ -5973,8 +6009,8 @@ def _update_analysis_tags_serialize( ] return self.api_client.param_serialize( - method='PATCH', - resource_path='/v2/analyses/{analysis_id}/tags', + method='POST', + resource_path='/v2/upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5991,12 +6027,10 @@ def _update_analysis_tags_serialize( @validate_call - def upload_file( + def v3_create_analysis( self, - upload_file_type: UploadFileType, - file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - packed_password: Optional[StrictStr] = None, - force_overwrite: Optional[StrictBool] = None, + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6009,18 +6043,15 @@ def upload_file( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseUploadResponse: - """(Deprecated) Upload File + ) -> OperationCreateMetadataCreateResult: + """Create an analysis + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param upload_file_type: (required) - :type upload_file_type: UploadFileType - :param file: (required) - :type file: bytearray - :param packed_password: - :type packed_password: str - :param force_overwrite: - :type force_overwrite: bool + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6042,13 +6073,10 @@ def upload_file( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._upload_file_serialize( - upload_file_type=upload_file_type, - file=file, - packed_password=packed_password, - force_overwrite=force_overwrite, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6056,8 +6084,15 @@ def upload_file( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUploadResponse", - '422': "BaseResponse", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6071,12 +6106,10 @@ def upload_file( @validate_call - def upload_file_with_http_info( + def v3_create_analysis_with_http_info( self, - upload_file_type: UploadFileType, - file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - packed_password: Optional[StrictStr] = None, - force_overwrite: Optional[StrictBool] = None, + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6089,18 +6122,15 @@ def upload_file_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseUploadResponse]: - """(Deprecated) Upload File + ) -> ApiResponse[OperationCreateMetadataCreateResult]: + """Create an analysis + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param upload_file_type: (required) - :type upload_file_type: UploadFileType - :param file: (required) - :type file: bytearray - :param packed_password: - :type packed_password: str - :param force_overwrite: - :type force_overwrite: bool + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6122,13 +6152,10 @@ def upload_file_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._upload_file_serialize( - upload_file_type=upload_file_type, - file=file, - packed_password=packed_password, - force_overwrite=force_overwrite, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6136,8 +6163,15 @@ def upload_file_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUploadResponse", - '422': "BaseResponse", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6151,12 +6185,10 @@ def upload_file_with_http_info( @validate_call - def upload_file_without_preload_content( + def v3_create_analysis_without_preload_content( self, - upload_file_type: UploadFileType, - file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], - packed_password: Optional[StrictStr] = None, - force_overwrite: Optional[StrictBool] = None, + create_request: CreateRequest, + x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6170,17 +6202,14 @@ def upload_file_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Upload File + """Create an analysis + Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large - :param upload_file_type: (required) - :type upload_file_type: UploadFileType - :param file: (required) - :type file: bytearray - :param packed_password: - :type packed_password: str - :param force_overwrite: - :type force_overwrite: bool + :param create_request: (required) + :type create_request: CreateRequest + :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. + :type x_rev_eng_application: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6202,13 +6231,10 @@ def upload_file_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("POST /v2/upload is deprecated.", DeprecationWarning) - _param = self._upload_file_serialize( - upload_file_type=upload_file_type, - file=file, - packed_password=packed_password, - force_overwrite=force_overwrite, + _param = self._v3_create_analysis_serialize( + create_request=create_request, + x_rev_eng_application=x_rev_eng_application, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6216,8 +6242,15 @@ def upload_file_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseUploadResponse", - '422': "BaseResponse", + '201': "OperationCreateMetadataCreateResult", + '400': "APIError", + '402': "APIError", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '413': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6226,12 +6259,10 @@ def upload_file_without_preload_content( return response_data.response - def _upload_file_serialize( + def _v3_create_analysis_serialize( self, - upload_file_type, - file, - packed_password, - force_overwrite, + create_request, + x_rev_eng_application, _request_auth, _content_type, _headers, @@ -6254,19 +6285,13 @@ def _upload_file_serialize( # process the path parameters # process the query parameters - if packed_password is not None: - - _query_params.append(('packed_password', packed_password)) - # process the header parameters + if x_rev_eng_application is not None: + _header_params['X-RevEng-Application'] = x_rev_eng_application # process the form parameters - if upload_file_type is not None: - _form_params.append(('upload_file_type', upload_file_type)) - if file is not None: - _files['file'] = file - if force_overwrite is not None: - _form_params.append(('force_overwrite', force_overwrite)) # process the body parameter + if create_request is not None: + _body_params = create_request # set the HTTP header `Accept` @@ -6284,7 +6309,7 @@ def _upload_file_serialize( _default_content_type = ( self.api_client.select_header_content_type( [ - 'multipart/form-data' + 'application/json' ] ) ) @@ -6299,7 +6324,7 @@ def _upload_file_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/upload', + resource_path='/v3/analyses', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6316,10 +6341,10 @@ def _upload_file_serialize( @validate_call - def v3_create_analysis( + def v3_create_dynamic_execution_run( self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6332,15 +6357,15 @@ def v3_create_analysis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationCreateMetadataCreateResult: - """Create an analysis + ) -> OperationDynamicExecutionMetadataDynamicExecutionResult: + """Start a dynamic execution run. - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param run_dynamic_execution_input_body: + :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6363,9 +6388,9 @@ def v3_create_analysis( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, + _param = self._v3_create_dynamic_execution_run_serialize( + analysis_id=analysis_id, + run_dynamic_execution_input_body=run_dynamic_execution_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6373,13 +6398,10 @@ def v3_create_analysis( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '400': "APIError", - '402': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", - '413': "APIError", '422': "APIError", '500': "APIError", } @@ -6395,10 +6417,10 @@ def v3_create_analysis( @validate_call - def v3_create_analysis_with_http_info( + def v3_create_dynamic_execution_run_with_http_info( self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6411,15 +6433,15 @@ def v3_create_analysis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationCreateMetadataCreateResult]: - """Create an analysis + ) -> ApiResponse[OperationDynamicExecutionMetadataDynamicExecutionResult]: + """Start a dynamic execution run. - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param run_dynamic_execution_input_body: + :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6442,9 +6464,9 @@ def v3_create_analysis_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, + _param = self._v3_create_dynamic_execution_run_serialize( + analysis_id=analysis_id, + run_dynamic_execution_input_body=run_dynamic_execution_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6452,13 +6474,10 @@ def v3_create_analysis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '400': "APIError", - '402': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", - '413': "APIError", '422': "APIError", '500': "APIError", } @@ -6474,10 +6493,10 @@ def v3_create_analysis_with_http_info( @validate_call - def v3_create_analysis_without_preload_content( + def v3_create_dynamic_execution_run_without_preload_content( self, - create_request: CreateRequest, - x_rev_eng_application: Annotated[Optional[StrictStr], Field(description="Identifies the calling RevEng application. Recorded on the Analysis log.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6491,14 +6510,14 @@ def v3_create_analysis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Create an analysis + """Start a dynamic execution run. - Queues a new Analysis for an uploaded Binary and returns the created Operation. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `402` [`INSUFFICIENT_CREDITS`](/errors/INSUFFICIENT_CREDITS) — Insufficient Credits - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `413` [`REQUEST_ENTITY_TOO_LARGE`](/errors/REQUEST_ENTITY_TOO_LARGE) — Request Entity Too Large + Starts a new sandbox run of the analysis's binary, alongside any runs already in progress, and returns the run's operation to poll for its outcome. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param create_request: (required) - :type create_request: CreateRequest - :param x_rev_eng_application: Identifies the calling RevEng application. Recorded on the Analysis log. - :type x_rev_eng_application: str + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param run_dynamic_execution_input_body: + :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6521,9 +6540,9 @@ def v3_create_analysis_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_create_analysis_serialize( - create_request=create_request, - x_rev_eng_application=x_rev_eng_application, + _param = self._v3_create_dynamic_execution_run_serialize( + analysis_id=analysis_id, + run_dynamic_execution_input_body=run_dynamic_execution_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6531,13 +6550,10 @@ def v3_create_analysis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '400': "APIError", - '402': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", - '413': "APIError", '422': "APIError", '500': "APIError", } @@ -6548,10 +6564,10 @@ def v3_create_analysis_without_preload_content( return response_data.response - def _v3_create_analysis_serialize( + def _v3_create_dynamic_execution_run_serialize( self, - create_request, - x_rev_eng_application, + analysis_id, + run_dynamic_execution_input_body, _request_auth, _content_type, _headers, @@ -6573,14 +6589,14 @@ def _v3_create_analysis_serialize( _body_params: Optional[bytes] = None # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters - if x_rev_eng_application is not None: - _header_params['X-RevEng-Application'] = x_rev_eng_application # process the form parameters # process the body parameter - if create_request is not None: - _body_params = create_request + if run_dynamic_execution_input_body is not None: + _body_params = run_dynamic_execution_input_body # set the HTTP header `Accept` @@ -6613,7 +6629,7 @@ def _v3_create_analysis_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10084,11 +10100,9 @@ def _v3_get_binary_export_operation_serialize( @validate_call - def v3_get_dynamic_execution_artifact( + def v3_get_dynamic_execution_operation( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], - filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10101,17 +10115,13 @@ def v3_get_dynamic_execution_artifact( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Download an artifact. + ) -> OperationDynamicExecutionMetadataDynamicExecutionResult: + """Get a dynamic execution operation. - Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param sha256: SHA-256 hex digest of the artifact (required) - :type sha256: str - :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. - :type filename: str + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10134,10 +10144,8 @@ def v3_get_dynamic_execution_artifact( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_artifact_serialize( - analysis_id=analysis_id, - sha256=sha256, - filename=filename, + _param = self._v3_get_dynamic_execution_operation_serialize( + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10145,10 +10153,9 @@ def v3_get_dynamic_execution_artifact( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10164,11 +10171,9 @@ def v3_get_dynamic_execution_artifact( @validate_call - def v3_get_dynamic_execution_artifact_with_http_info( + def v3_get_dynamic_execution_operation_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], - filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10181,17 +10186,13 @@ def v3_get_dynamic_execution_artifact_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Download an artifact. + ) -> ApiResponse[OperationDynamicExecutionMetadataDynamicExecutionResult]: + """Get a dynamic execution operation. - Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param sha256: SHA-256 hex digest of the artifact (required) - :type sha256: str - :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. - :type filename: str + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10214,10 +10215,8 @@ def v3_get_dynamic_execution_artifact_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_artifact_serialize( - analysis_id=analysis_id, - sha256=sha256, - filename=filename, + _param = self._v3_get_dynamic_execution_operation_serialize( + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10225,10 +10224,9 @@ def v3_get_dynamic_execution_artifact_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10244,11 +10242,9 @@ def v3_get_dynamic_execution_artifact_with_http_info( @validate_call - def v3_get_dynamic_execution_artifact_without_preload_content( + def v3_get_dynamic_execution_operation_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], - filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10262,16 +10258,12 @@ def v3_get_dynamic_execution_artifact_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download an artifact. + """Get a dynamic execution operation. - Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the current state of a dynamic execution run. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param sha256: SHA-256 hex digest of the artifact (required) - :type sha256: str - :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. - :type filename: str + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10294,10 +10286,8 @@ def v3_get_dynamic_execution_artifact_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_artifact_serialize( - analysis_id=analysis_id, - sha256=sha256, - filename=filename, + _param = self._v3_get_dynamic_execution_operation_serialize( + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10305,10 +10295,9 @@ def v3_get_dynamic_execution_artifact_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10319,11 +10308,9 @@ def v3_get_dynamic_execution_artifact_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_artifact_serialize( + def _v3_get_dynamic_execution_operation_serialize( self, - analysis_id, - sha256, - filename, + run_id, _request_auth, _content_type, _headers, @@ -10345,15 +10332,9 @@ def _v3_get_dynamic_execution_artifact_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - if sha256 is not None: - _path_params['sha256'] = sha256 + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters - if filename is not None: - - _query_params.append(('filename', filename)) - # process the header parameters # process the form parameters # process the body parameter @@ -10376,7 +10357,7 @@ def _v3_get_dynamic_execution_artifact_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/artifacts/{sha256}', + resource_path='/v3/operations/dynamic-execution/{run_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10393,9 +10374,10 @@ def _v3_get_dynamic_execution_artifact_serialize( @validate_call - def v3_get_dynamic_execution_logs_download( + def v3_get_dynamic_execution_run( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10408,13 +10390,15 @@ def v3_get_dynamic_execution_logs_download( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Download the execution logs archive. + ) -> DynamicExecutionRun: + """Get a dynamic execution run. - Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10437,8 +10421,9 @@ def v3_get_dynamic_execution_logs_download( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_logs_download_serialize( + _param = self._v3_get_dynamic_execution_run_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10446,10 +10431,9 @@ def v3_get_dynamic_execution_logs_download( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "DynamicExecutionRun", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10465,9 +10449,10 @@ def v3_get_dynamic_execution_logs_download( @validate_call - def v3_get_dynamic_execution_logs_download_with_http_info( + def v3_get_dynamic_execution_run_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10480,13 +10465,15 @@ def v3_get_dynamic_execution_logs_download_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Download the execution logs archive. + ) -> ApiResponse[DynamicExecutionRun]: + """Get a dynamic execution run. - Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10509,8 +10496,9 @@ def v3_get_dynamic_execution_logs_download_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_logs_download_serialize( + _param = self._v3_get_dynamic_execution_run_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10518,10 +10506,9 @@ def v3_get_dynamic_execution_logs_download_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "DynamicExecutionRun", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10537,9 +10524,10 @@ def v3_get_dynamic_execution_logs_download_with_http_info( @validate_call - def v3_get_dynamic_execution_logs_download_without_preload_content( + def v3_get_dynamic_execution_run_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10553,12 +10541,14 @@ def v3_get_dynamic_execution_logs_download_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download the execution logs archive. + """Get a dynamic execution run. - Streams a ZIP archive of the sandbox logs collected during execution. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -10581,8 +10571,9 @@ def v3_get_dynamic_execution_logs_download_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_logs_download_serialize( + _param = self._v3_get_dynamic_execution_run_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -10590,10 +10581,9 @@ def v3_get_dynamic_execution_logs_download_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "DynamicExecutionRun", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -10604,9 +10594,10 @@ def v3_get_dynamic_execution_logs_download_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_logs_download_serialize( + def _v3_get_dynamic_execution_run_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -10630,6 +10621,8 @@ def _v3_get_dynamic_execution_logs_download_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -10653,7 +10646,7 @@ def _v3_get_dynamic_execution_logs_download_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/logs/download', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10670,9 +10663,10 @@ def _v3_get_dynamic_execution_logs_download_serialize( @validate_call - def v3_get_dynamic_execution_memdump( + def v3_get_dynamic_execution_run_artifact( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ @@ -10688,12 +10682,14 @@ def v3_get_dynamic_execution_memdump( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Download a memory dump. + """Download a run's artifact. - Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param sha256: SHA-256 hex digest of the artifact (required) :type sha256: str :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. @@ -10720,8 +10716,9 @@ def v3_get_dynamic_execution_memdump( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_memdump_serialize( + _param = self._v3_get_dynamic_execution_run_artifact_serialize( analysis_id=analysis_id, + run_id=run_id, sha256=sha256, filename=filename, _request_auth=_request_auth, @@ -10750,9 +10747,10 @@ def v3_get_dynamic_execution_memdump( @validate_call - def v3_get_dynamic_execution_memdump_with_http_info( + def v3_get_dynamic_execution_run_artifact_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ @@ -10768,12 +10766,14 @@ def v3_get_dynamic_execution_memdump_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Download a memory dump. + """Download a run's artifact. - Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param sha256: SHA-256 hex digest of the artifact (required) :type sha256: str :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. @@ -10800,8 +10800,9 @@ def v3_get_dynamic_execution_memdump_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_memdump_serialize( + _param = self._v3_get_dynamic_execution_run_artifact_serialize( analysis_id=analysis_id, + run_id=run_id, sha256=sha256, filename=filename, _request_auth=_request_auth, @@ -10830,9 +10831,10 @@ def v3_get_dynamic_execution_memdump_with_http_info( @validate_call - def v3_get_dynamic_execution_memdump_without_preload_content( + def v3_get_dynamic_execution_run_artifact_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ @@ -10848,12 +10850,14 @@ def v3_get_dynamic_execution_memdump_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download a memory dump. + """Download a run's artifact. - Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the dynamic execution report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams a file extracted during execution (filesystem, memory, or network), addressed by the SHA-256 referenced by `artifacts[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param sha256: SHA-256 hex digest of the artifact (required) :type sha256: str :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. @@ -10880,8 +10884,9 @@ def v3_get_dynamic_execution_memdump_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_memdump_serialize( + _param = self._v3_get_dynamic_execution_run_artifact_serialize( analysis_id=analysis_id, + run_id=run_id, sha256=sha256, filename=filename, _request_auth=_request_auth, @@ -10905,9 +10910,10 @@ def v3_get_dynamic_execution_memdump_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_memdump_serialize( + def _v3_get_dynamic_execution_run_artifact_serialize( self, analysis_id, + run_id, sha256, filename, _request_auth, @@ -10933,6 +10939,8 @@ def _v3_get_dynamic_execution_memdump_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id if sha256 is not None: _path_params['sha256'] = sha256 # process the query parameters @@ -10962,7 +10970,7 @@ def _v3_get_dynamic_execution_memdump_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/memdumps/{sha256}', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/artifacts/{sha256}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10979,9 +10987,10 @@ def _v3_get_dynamic_execution_memdump_serialize( @validate_call - def v3_get_dynamic_execution_operation( + def v3_get_dynamic_execution_run_logs_download( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10994,13 +11003,15 @@ def v3_get_dynamic_execution_operation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationDynamicExecutionMetadataDynamicExecutionResult: - """Get a dynamic execution operation. + ) -> None: + """Download a run's execution logs archive. - Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11023,8 +11034,9 @@ def v3_get_dynamic_execution_operation( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_operation_serialize( + _param = self._v3_get_dynamic_execution_run_logs_download_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11032,9 +11044,10 @@ def v3_get_dynamic_execution_operation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '200': None, '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -11050,9 +11063,10 @@ def v3_get_dynamic_execution_operation( @validate_call - def v3_get_dynamic_execution_operation_with_http_info( + def v3_get_dynamic_execution_run_logs_download_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11065,13 +11079,15 @@ def v3_get_dynamic_execution_operation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationDynamicExecutionMetadataDynamicExecutionResult]: - """Get a dynamic execution operation. + ) -> ApiResponse[None]: + """Download a run's execution logs archive. - Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11094,8 +11110,9 @@ def v3_get_dynamic_execution_operation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_operation_serialize( + _param = self._v3_get_dynamic_execution_run_logs_download_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11103,9 +11120,10 @@ def v3_get_dynamic_execution_operation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '200': None, '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -11121,9 +11139,10 @@ def v3_get_dynamic_execution_operation_with_http_info( @validate_call - def v3_get_dynamic_execution_operation_without_preload_content( + def v3_get_dynamic_execution_run_logs_download_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11137,12 +11156,14 @@ def v3_get_dynamic_execution_operation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a dynamic execution operation. + """Download a run's execution logs archive. - Returns the current state of the most recently triggered dynamic execution run for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Streams a ZIP archive of the sandbox logs collected during the run. Requires the run to be COMPLETED. Returns 404 if no logs were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11165,8 +11186,9 @@ def v3_get_dynamic_execution_operation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_operation_serialize( + _param = self._v3_get_dynamic_execution_run_logs_download_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11174,9 +11196,10 @@ def v3_get_dynamic_execution_operation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '200': None, '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -11187,9 +11210,10 @@ def v3_get_dynamic_execution_operation_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_operation_serialize( + def _v3_get_dynamic_execution_run_logs_download_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -11213,6 +11237,8 @@ def _v3_get_dynamic_execution_operation_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -11236,7 +11262,7 @@ def _v3_get_dynamic_execution_operation_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/operations/dynamic-execution/{analysis_id}', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/logs/download', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11253,9 +11279,12 @@ def _v3_get_dynamic_execution_operation_serialize( @validate_call - def v3_get_dynamic_execution_pcap( + def v3_get_dynamic_execution_run_memdump( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], + filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11269,12 +11298,18 @@ def v3_get_dynamic_execution_pcap( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Download the network capture. + """Download a run's memory dump. - Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param sha256: SHA-256 hex digest of the artifact (required) + :type sha256: str + :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. + :type filename: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11297,8 +11332,11 @@ def v3_get_dynamic_execution_pcap( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_pcap_serialize( + _param = self._v3_get_dynamic_execution_run_memdump_serialize( analysis_id=analysis_id, + run_id=run_id, + sha256=sha256, + filename=filename, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11325,9 +11363,12 @@ def v3_get_dynamic_execution_pcap( @validate_call - def v3_get_dynamic_execution_pcap_with_http_info( + def v3_get_dynamic_execution_run_memdump_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], + filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11341,12 +11382,18 @@ def v3_get_dynamic_execution_pcap_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Download the network capture. + """Download a run's memory dump. - Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param sha256: SHA-256 hex digest of the artifact (required) + :type sha256: str + :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. + :type filename: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11369,8 +11416,11 @@ def v3_get_dynamic_execution_pcap_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_pcap_serialize( + _param = self._v3_get_dynamic_execution_run_memdump_serialize( analysis_id=analysis_id, + run_id=run_id, + sha256=sha256, + filename=filename, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11397,9 +11447,12 @@ def v3_get_dynamic_execution_pcap_with_http_info( @validate_call - def v3_get_dynamic_execution_pcap_without_preload_content( + def v3_get_dynamic_execution_run_memdump_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + sha256: Annotated[str, Field(strict=True, description="SHA-256 hex digest of the artifact")], + filename: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11413,12 +11466,18 @@ def v3_get_dynamic_execution_pcap_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download the network capture. + """Download a run's memory dump. - Streams the pcap of the analysis VM's traffic. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the memory dump for a SHA-256 referenced by `memdumps[].dumps[].sha256` in the run's report. The response is a password-protected zip (password: `infected`). **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param sha256: SHA-256 hex digest of the artifact (required) + :type sha256: str + :param filename: Optional name for the downloaded file (inside the zip and as the download filename). Defaults to the SHA-256 when omitted. + :type filename: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11441,8 +11500,11 @@ def v3_get_dynamic_execution_pcap_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_pcap_serialize( + _param = self._v3_get_dynamic_execution_run_memdump_serialize( analysis_id=analysis_id, + run_id=run_id, + sha256=sha256, + filename=filename, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11464,9 +11526,12 @@ def v3_get_dynamic_execution_pcap_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_pcap_serialize( + def _v3_get_dynamic_execution_run_memdump_serialize( self, analysis_id, + run_id, + sha256, + filename, _request_auth, _content_type, _headers, @@ -11490,7 +11555,15 @@ def _v3_get_dynamic_execution_pcap_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id + if sha256 is not None: + _path_params['sha256'] = sha256 # process the query parameters + if filename is not None: + + _query_params.append(('filename', filename)) + # process the header parameters # process the form parameters # process the body parameter @@ -11513,7 +11586,7 @@ def _v3_get_dynamic_execution_pcap_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/pcap', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/memdumps/{sha256}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11530,9 +11603,10 @@ def _v3_get_dynamic_execution_pcap_serialize( @validate_call - def v3_get_dynamic_execution_report( + def v3_get_dynamic_execution_run_pcap( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11545,13 +11619,15 @@ def v3_get_dynamic_execution_report( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AnalysisReport: - """Get the dynamic execution report. + ) -> None: + """Download a run's network capture. - Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11574,8 +11650,9 @@ def v3_get_dynamic_execution_report( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_report_serialize( + _param = self._v3_get_dynamic_execution_run_pcap_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11583,7 +11660,7 @@ def v3_get_dynamic_execution_report( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AnalysisReport", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -11602,9 +11679,10 @@ def v3_get_dynamic_execution_report( @validate_call - def v3_get_dynamic_execution_report_with_http_info( + def v3_get_dynamic_execution_run_pcap_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11617,13 +11695,15 @@ def v3_get_dynamic_execution_report_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AnalysisReport]: - """Get the dynamic execution report. + ) -> ApiResponse[None]: + """Download a run's network capture. - Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11646,8 +11726,9 @@ def v3_get_dynamic_execution_report_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_report_serialize( + _param = self._v3_get_dynamic_execution_run_pcap_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11655,7 +11736,7 @@ def v3_get_dynamic_execution_report_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AnalysisReport", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -11674,9 +11755,10 @@ def v3_get_dynamic_execution_report_with_http_info( @validate_call - def v3_get_dynamic_execution_report_without_preload_content( + def v3_get_dynamic_execution_run_pcap_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11690,12 +11772,14 @@ def v3_get_dynamic_execution_report_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the dynamic execution report. + """Download a run's network capture. - Returns the dynamic execution report JSON for the analysis. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams the pcap of the analysis VM's traffic during the run. Returns 404 if no pcap was captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11718,8 +11802,9 @@ def v3_get_dynamic_execution_report_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_report_serialize( + _param = self._v3_get_dynamic_execution_run_pcap_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11727,7 +11812,7 @@ def v3_get_dynamic_execution_report_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AnalysisReport", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -11741,9 +11826,10 @@ def v3_get_dynamic_execution_report_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_report_serialize( + def _v3_get_dynamic_execution_run_pcap_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -11767,6 +11853,8 @@ def _v3_get_dynamic_execution_report_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -11790,7 +11878,7 @@ def _v3_get_dynamic_execution_report_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/report', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/pcap', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11807,10 +11895,10 @@ def _v3_get_dynamic_execution_report_serialize( @validate_call - def v3_get_dynamic_execution_screenshot( + def v3_get_dynamic_execution_run_report( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11823,15 +11911,15 @@ def v3_get_dynamic_execution_screenshot( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Download a screenshot. + ) -> AnalysisReport: + """Get a run's dynamic execution report. - Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int - :param index: Index of the screenshot, as listed by the screenshots endpoint (required) - :type index: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11854,9 +11942,9 @@ def v3_get_dynamic_execution_screenshot( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_screenshot_serialize( + _param = self._v3_get_dynamic_execution_run_report_serialize( analysis_id=analysis_id, - index=index, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11864,7 +11952,7 @@ def v3_get_dynamic_execution_screenshot( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "AnalysisReport", '403': "APIError", '404': "APIError", '409': "APIError", @@ -11883,10 +11971,10 @@ def v3_get_dynamic_execution_screenshot( @validate_call - def v3_get_dynamic_execution_screenshot_with_http_info( + def v3_get_dynamic_execution_run_report_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11899,15 +11987,15 @@ def v3_get_dynamic_execution_screenshot_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Download a screenshot. + ) -> ApiResponse[AnalysisReport]: + """Get a run's dynamic execution report. - Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int - :param index: Index of the screenshot, as listed by the screenshots endpoint (required) - :type index: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -11930,9 +12018,9 @@ def v3_get_dynamic_execution_screenshot_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_screenshot_serialize( + _param = self._v3_get_dynamic_execution_run_report_serialize( analysis_id=analysis_id, - index=index, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11940,7 +12028,7 @@ def v3_get_dynamic_execution_screenshot_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "AnalysisReport", '403': "APIError", '404': "APIError", '409': "APIError", @@ -11959,10 +12047,10 @@ def v3_get_dynamic_execution_screenshot_with_http_info( @validate_call - def v3_get_dynamic_execution_screenshot_without_preload_content( + def v3_get_dynamic_execution_run_report_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11976,14 +12064,14 @@ def v3_get_dynamic_execution_screenshot_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download a screenshot. + """Get a run's dynamic execution report. - Streams one screenshot, 1-indexed as listed by the screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the run's dynamic execution report JSON. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int - :param index: Index of the screenshot, as listed by the screenshots endpoint (required) - :type index: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12006,9 +12094,9 @@ def v3_get_dynamic_execution_screenshot_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_screenshot_serialize( + _param = self._v3_get_dynamic_execution_run_report_serialize( analysis_id=analysis_id, - index=index, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12016,7 +12104,7 @@ def v3_get_dynamic_execution_screenshot_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "AnalysisReport", '403': "APIError", '404': "APIError", '409': "APIError", @@ -12030,10 +12118,10 @@ def v3_get_dynamic_execution_screenshot_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_screenshot_serialize( + def _v3_get_dynamic_execution_run_report_serialize( self, analysis_id, - index, + run_id, _request_auth, _content_type, _headers, @@ -12057,8 +12145,8 @@ def _v3_get_dynamic_execution_screenshot_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id - if index is not None: - _path_params['index'] = index + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -12082,7 +12170,7 @@ def _v3_get_dynamic_execution_screenshot_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/screenshots/{index}', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/report', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12099,9 +12187,11 @@ def _v3_get_dynamic_execution_screenshot_serialize( @validate_call - def v3_get_dynamic_execution_summary( + def v3_get_dynamic_execution_run_screenshot( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12114,13 +12204,17 @@ def v3_get_dynamic_execution_summary( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DynamicExecutionSummary: - """Get the dynamic execution summary. + ) -> None: + """Download a run's screenshot. - Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param index: Index of the screenshot, as listed by the screenshots endpoint (required) + :type index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12143,8 +12237,10 @@ def v3_get_dynamic_execution_summary( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_serialize( + _param = self._v3_get_dynamic_execution_run_screenshot_serialize( analysis_id=analysis_id, + run_id=run_id, + index=index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12152,7 +12248,7 @@ def v3_get_dynamic_execution_summary( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DynamicExecutionSummary", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -12171,9 +12267,11 @@ def v3_get_dynamic_execution_summary( @validate_call - def v3_get_dynamic_execution_summary_with_http_info( + def v3_get_dynamic_execution_run_screenshot_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12186,13 +12284,17 @@ def v3_get_dynamic_execution_summary_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DynamicExecutionSummary]: - """Get the dynamic execution summary. + ) -> ApiResponse[None]: + """Download a run's screenshot. - Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param index: Index of the screenshot, as listed by the screenshots endpoint (required) + :type index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12215,8 +12317,10 @@ def v3_get_dynamic_execution_summary_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_serialize( + _param = self._v3_get_dynamic_execution_run_screenshot_serialize( analysis_id=analysis_id, + run_id=run_id, + index=index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12224,7 +12328,7 @@ def v3_get_dynamic_execution_summary_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DynamicExecutionSummary", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -12243,9 +12347,11 @@ def v3_get_dynamic_execution_summary_with_http_info( @validate_call - def v3_get_dynamic_execution_summary_without_preload_content( + def v3_get_dynamic_execution_run_screenshot_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], + index: Annotated[int, Field(strict=True, ge=1, description="Index of the screenshot, as listed by the screenshots endpoint")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12259,12 +12365,16 @@ def v3_get_dynamic_execution_summary_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get the dynamic execution summary. + """Download a run's screenshot. - Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Streams one screenshot, 1-indexed as listed by the run's screenshots endpoint. Requires the run to be COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param index: Index of the screenshot, as listed by the screenshots endpoint (required) + :type index: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12287,8 +12397,10 @@ def v3_get_dynamic_execution_summary_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_serialize( + _param = self._v3_get_dynamic_execution_run_screenshot_serialize( analysis_id=analysis_id, + run_id=run_id, + index=index, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12296,7 +12408,7 @@ def v3_get_dynamic_execution_summary_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DynamicExecutionSummary", + '200': None, '403': "APIError", '404': "APIError", '409': "APIError", @@ -12310,9 +12422,11 @@ def v3_get_dynamic_execution_summary_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_summary_serialize( + def _v3_get_dynamic_execution_run_screenshot_serialize( self, analysis_id, + run_id, + index, _request_auth, _content_type, _headers, @@ -12336,6 +12450,10 @@ def _v3_get_dynamic_execution_summary_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id + if index is not None: + _path_params['index'] = index # process the query parameters # process the header parameters # process the form parameters @@ -12359,7 +12477,7 @@ def _v3_get_dynamic_execution_summary_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/summary', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots/{index}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12376,9 +12494,10 @@ def _v3_get_dynamic_execution_summary_serialize( @validate_call - def v3_get_dynamic_execution_summary_operation( + def v3_get_dynamic_execution_run_summary( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12391,13 +12510,15 @@ def v3_get_dynamic_execution_summary_operation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult: - """Get a dynamic execution summary operation. + ) -> DynamicExecutionSummary: + """Get a run's dynamic execution summary. - Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12420,8 +12541,9 @@ def v3_get_dynamic_execution_summary_operation( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_operation_serialize( + _param = self._v3_get_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12429,9 +12551,10 @@ def v3_get_dynamic_execution_summary_operation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", + '200': "DynamicExecutionSummary", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -12447,9 +12570,10 @@ def v3_get_dynamic_execution_summary_operation( @validate_call - def v3_get_dynamic_execution_summary_operation_with_http_info( + def v3_get_dynamic_execution_run_summary_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12462,13 +12586,15 @@ def v3_get_dynamic_execution_summary_operation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult]: - """Get a dynamic execution summary operation. + ) -> ApiResponse[DynamicExecutionSummary]: + """Get a run's dynamic execution summary. - Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12491,8 +12617,9 @@ def v3_get_dynamic_execution_summary_operation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_operation_serialize( + _param = self._v3_get_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12500,9 +12627,10 @@ def v3_get_dynamic_execution_summary_operation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", + '200': "DynamicExecutionSummary", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -12518,9 +12646,10 @@ def v3_get_dynamic_execution_summary_operation_with_http_info( @validate_call - def v3_get_dynamic_execution_summary_operation_without_preload_content( + def v3_get_dynamic_execution_run_summary_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12534,12 +12663,14 @@ def v3_get_dynamic_execution_summary_operation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get a dynamic execution summary operation. + """Get a run's dynamic execution summary. - Returns the state of the most recent summary attempt for this analysis, whether made by its run or by a regenerate. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the LLM-generated Markdown summary of the run. Requires the run to be COMPLETED. Returns 404 if no summary has been generated. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12562,8 +12693,9 @@ def v3_get_dynamic_execution_summary_operation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_summary_operation_serialize( + _param = self._v3_get_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12571,9 +12703,10 @@ def v3_get_dynamic_execution_summary_operation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", + '200': "DynamicExecutionSummary", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -12584,9 +12717,10 @@ def v3_get_dynamic_execution_summary_operation_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_summary_operation_serialize( + def _v3_get_dynamic_execution_run_summary_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -12610,6 +12744,8 @@ def _v3_get_dynamic_execution_summary_operation_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -12633,7 +12769,7 @@ def _v3_get_dynamic_execution_summary_operation_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/operations/dynamic-execution-summary/{analysis_id}', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12650,9 +12786,10 @@ def _v3_get_dynamic_execution_summary_operation_serialize( @validate_call - def v3_get_dynamic_execution_wireshark_keys( + def v3_get_dynamic_execution_run_wireshark_keys( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12666,12 +12803,14 @@ def v3_get_dynamic_execution_wireshark_keys( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """Download Wireshark TLS session keys. + """Download a run's Wireshark TLS session keys. - Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12694,8 +12833,9 @@ def v3_get_dynamic_execution_wireshark_keys( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_wireshark_keys_serialize( + _param = self._v3_get_dynamic_execution_run_wireshark_keys_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12722,9 +12862,10 @@ def v3_get_dynamic_execution_wireshark_keys( @validate_call - def v3_get_dynamic_execution_wireshark_keys_with_http_info( + def v3_get_dynamic_execution_run_wireshark_keys_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12738,12 +12879,14 @@ def v3_get_dynamic_execution_wireshark_keys_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """Download Wireshark TLS session keys. + """Download a run's Wireshark TLS session keys. - Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12766,8 +12909,9 @@ def v3_get_dynamic_execution_wireshark_keys_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_wireshark_keys_serialize( + _param = self._v3_get_dynamic_execution_run_wireshark_keys_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12794,9 +12938,10 @@ def v3_get_dynamic_execution_wireshark_keys_with_http_info( @validate_call - def v3_get_dynamic_execution_wireshark_keys_without_preload_content( + def v3_get_dynamic_execution_run_wireshark_keys_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12810,12 +12955,14 @@ def v3_get_dynamic_execution_wireshark_keys_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Download Wireshark TLS session keys. + """Download a run's Wireshark TLS session keys. - Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the Wireshark-format TLS session key log for decrypting HTTPS traffic in the run's pcap. Returns 404 if no keys were captured. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12838,8 +12985,9 @@ def v3_get_dynamic_execution_wireshark_keys_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_dynamic_execution_wireshark_keys_serialize( + _param = self._v3_get_dynamic_execution_run_wireshark_keys_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12861,9 +13009,10 @@ def v3_get_dynamic_execution_wireshark_keys_without_preload_content( return response_data.response - def _v3_get_dynamic_execution_wireshark_keys_serialize( + def _v3_get_dynamic_execution_run_wireshark_keys_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -12887,6 +13036,8 @@ def _v3_get_dynamic_execution_wireshark_keys_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -12910,7 +13061,7 @@ def _v3_get_dynamic_execution_wireshark_keys_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/wireshark-keys', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/wireshark-keys', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12927,10 +13078,9 @@ def _v3_get_dynamic_execution_wireshark_keys_serialize( @validate_call - def v3_grant_analysis_access( + def v3_get_dynamic_execution_summary_operation( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - grant_access_input_body: GrantAccessInputBody, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12943,15 +13093,13 @@ def v3_grant_analysis_access( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Share an analysis with a user or team + ) -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult: + """Get a dynamic execution summary operation. - Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param grant_access_input_body: (required) - :type grant_access_input_body: GrantAccessInputBody + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -12974,9 +13122,8 @@ def v3_grant_analysis_access( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_grant_analysis_access_serialize( - analysis_id=analysis_id, - grant_access_input_body=grant_access_input_body, + _param = self._v3_get_dynamic_execution_summary_operation_serialize( + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12984,8 +13131,7 @@ def v3_grant_analysis_access( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "APIError", + '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -13003,10 +13149,9 @@ def v3_grant_analysis_access( @validate_call - def v3_grant_analysis_access_with_http_info( + def v3_get_dynamic_execution_summary_operation_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - grant_access_input_body: GrantAccessInputBody, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13019,15 +13164,13 @@ def v3_grant_analysis_access_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Share an analysis with a user or team + ) -> ApiResponse[OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult]: + """Get a dynamic execution summary operation. - Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param grant_access_input_body: (required) - :type grant_access_input_body: GrantAccessInputBody + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -13050,9 +13193,8 @@ def v3_grant_analysis_access_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_grant_analysis_access_serialize( - analysis_id=analysis_id, - grant_access_input_body=grant_access_input_body, + _param = self._v3_get_dynamic_execution_summary_operation_serialize( + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -13060,8 +13202,7 @@ def v3_grant_analysis_access_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "APIError", + '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -13079,10 +13220,9 @@ def v3_grant_analysis_access_with_http_info( @validate_call - def v3_grant_analysis_access_without_preload_content( + def v3_get_dynamic_execution_summary_operation_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - grant_access_input_body: GrantAccessInputBody, + run_id: Annotated[str, Field(strict=True, max_length=64, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -13096,13 +13236,298 @@ def v3_grant_analysis_access_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Share an analysis with a user or team + """Get a dynamic execution summary operation. - Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the state of a run's most recent summary attempt, whether made by the run itself or by a regenerate. Returns 404 for an unknown run. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param grant_access_input_body: (required) + :param run_id: Dynamic execution run ID (required) + :type run_id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_dynamic_execution_summary_operation_serialize( + run_id=run_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_dynamic_execution_summary_operation_serialize( + self, + run_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if run_id is not None: + _path_params['run_id'] = run_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/operations/dynamic-execution-summary/{run_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def v3_grant_analysis_access( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + grant_access_input_body: GrantAccessInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Share an analysis with a user or team + + Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param grant_access_input_body: (required) + :type grant_access_input_body: GrantAccessInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_grant_analysis_access_serialize( + analysis_id=analysis_id, + grant_access_input_body=grant_access_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "APIError", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_grant_analysis_access_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + grant_access_input_body: GrantAccessInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Share an analysis with a user or team + + Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param grant_access_input_body: (required) + :type grant_access_input_body: GrantAccessInputBody + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_grant_analysis_access_serialize( + analysis_id=analysis_id, + grant_access_input_body=grant_access_input_body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '400': "APIError", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_grant_analysis_access_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + grant_access_input_body: GrantAccessInputBody, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Share an analysis with a user or team + + Grants a user or a team access to the analysis. Sharing with a principal that already has a rule replaces its permission. The user or team must be one the caller can find through `GET /v3/principals`. The analysis owner cannot be the target of a rule. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param grant_access_input_body: (required) :type grant_access_input_body: GrantAccessInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -14435,7 +14860,7 @@ def v3_list_analysis_operations( ) -> AnalysisOperationsOutputBody: """List the operations run on an analysis. - Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14506,7 +14931,7 @@ def v3_list_analysis_operations_with_http_info( ) -> ApiResponse[AnalysisOperationsOutputBody]: """List the operations run on an analysis. - Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14577,7 +15002,7 @@ def v3_list_analysis_operations_without_preload_content( ) -> RESTResponseType: """List the operations run on an analysis. - Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary: the binary agents, the script-agent scans and dynamic execution. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the analysis' `static-analysis` operation, followed by the latest run of each other operation started on its binary (the binary agents and the script-agent scans), then one `dynamic-execution` operation per sandbox run of the analysis, newest first. The `static-analysis` operation is always included, even when no other operations have run. Each entry's `name` is the operation's resource name, polled at `/v3/{name}`. Other operations that have never run are omitted. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -14691,9 +15116,10 @@ def _v3_list_analysis_operations_serialize( @validate_call - def v3_list_dynamic_execution_screenshots( + def v3_list_dynamic_execution_run_screenshots( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14707,12 +15133,14 @@ def v3_list_dynamic_execution_screenshots( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ScreenshotsIndex: - """List the screenshots captured during execution. + """List a run's screenshots. - Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14735,8 +15163,9 @@ def v3_list_dynamic_execution_screenshots( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_dynamic_execution_screenshots_serialize( + _param = self._v3_list_dynamic_execution_run_screenshots_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14763,9 +15192,10 @@ def v3_list_dynamic_execution_screenshots( @validate_call - def v3_list_dynamic_execution_screenshots_with_http_info( + def v3_list_dynamic_execution_run_screenshots_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14779,12 +15209,14 @@ def v3_list_dynamic_execution_screenshots_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[ScreenshotsIndex]: - """List the screenshots captured during execution. + """List a run's screenshots. - Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14807,8 +15239,9 @@ def v3_list_dynamic_execution_screenshots_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_dynamic_execution_screenshots_serialize( + _param = self._v3_list_dynamic_execution_run_screenshots_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14835,9 +15268,10 @@ def v3_list_dynamic_execution_screenshots_with_http_info( @validate_call - def v3_list_dynamic_execution_screenshots_without_preload_content( + def v3_list_dynamic_execution_run_screenshots_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14851,12 +15285,14 @@ def v3_list_dynamic_execution_screenshots_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the screenshots captured during execution. + """List a run's screenshots. - Returns the screenshots captured from the analysis VM, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Returns the screenshots captured from the analysis VM during the run, in capture order. Requires the run to be COMPLETED. Returns an empty list when the run captured none. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -14879,8 +15315,9 @@ def v3_list_dynamic_execution_screenshots_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_dynamic_execution_screenshots_serialize( + _param = self._v3_list_dynamic_execution_run_screenshots_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -14902,9 +15339,10 @@ def v3_list_dynamic_execution_screenshots_without_preload_content( return response_data.response - def _v3_list_dynamic_execution_screenshots_serialize( + def _v3_list_dynamic_execution_run_screenshots_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -14928,6 +15366,8 @@ def _v3_list_dynamic_execution_screenshots_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -14951,7 +15391,7 @@ def _v3_list_dynamic_execution_screenshots_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/screenshots', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/screenshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -14968,8 +15408,9 @@ def _v3_list_dynamic_execution_screenshots_serialize( @validate_call - def v3_list_example_analyses( + def v3_list_dynamic_execution_runs( self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -14982,11 +15423,13 @@ def v3_list_example_analyses( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListExampleAnalysesOutputBody: - """List example analyses + ) -> ListDynamicExecutionRunsOutputBody: + """List the dynamic execution runs. - Returns the curated example Analyses. + Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15009,7 +15452,8 @@ def v3_list_example_analyses( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_example_analyses_serialize( + _param = self._v3_list_dynamic_execution_runs_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15017,7 +15461,11 @@ def v3_list_example_analyses( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListExampleAnalysesOutputBody", + '200': "ListDynamicExecutionRunsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -15031,8 +15479,9 @@ def v3_list_example_analyses( @validate_call - def v3_list_example_analyses_with_http_info( + def v3_list_dynamic_execution_runs_with_http_info( self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15045,11 +15494,13 @@ def v3_list_example_analyses_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListExampleAnalysesOutputBody]: - """List example analyses + ) -> ApiResponse[ListDynamicExecutionRunsOutputBody]: + """List the dynamic execution runs. - Returns the curated example Analyses. + Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15072,7 +15523,8 @@ def v3_list_example_analyses_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_example_analyses_serialize( + _param = self._v3_list_dynamic_execution_runs_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15080,7 +15532,11 @@ def v3_list_example_analyses_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListExampleAnalysesOutputBody", + '200': "ListDynamicExecutionRunsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -15094,8 +15550,9 @@ def v3_list_example_analyses_with_http_info( @validate_call - def v3_list_example_analyses_without_preload_content( + def v3_list_dynamic_execution_runs_without_preload_content( self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15109,10 +15566,12 @@ def v3_list_example_analyses_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List example analyses + """List the dynamic execution runs. - Returns the curated example Analyses. + Returns every dynamic execution run of the analysis, newest first, with its status and the parameters it was started with. An archive password is never returned, only whether one was given. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15135,7 +15594,8 @@ def v3_list_example_analyses_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_example_analyses_serialize( + _param = self._v3_list_dynamic_execution_runs_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15143,7 +15603,11 @@ def v3_list_example_analyses_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListExampleAnalysesOutputBody", + '200': "ListDynamicExecutionRunsOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -15152,8 +15616,9 @@ def v3_list_example_analyses_without_preload_content( return response_data.response - def _v3_list_example_analyses_serialize( + def _v3_list_dynamic_execution_runs_serialize( self, + analysis_id, _request_auth, _content_type, _headers, @@ -15175,6 +15640,8 @@ def _v3_list_example_analyses_serialize( _body_params: Optional[bytes] = None # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters # process the form parameters @@ -15198,7 +15665,7 @@ def _v3_list_example_analyses_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/examples', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15215,12 +15682,8 @@ def _v3_list_example_analyses_serialize( @validate_call - def v3_list_global_functions( + def v3_list_example_analyses( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15233,19 +15696,11 @@ def v3_list_global_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListGlobalFunctionsOutputBody: - """List the functions referencing a global variable. + ) -> ListExampleAnalysesOutputBody: + """List example analyses - Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the curated example Analyses. - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param vaddr: Virtual address of the global variable. (required) - :type vaddr: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15268,11 +15723,7 @@ def v3_list_global_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_global_functions_serialize( - analysis_id=analysis_id, - vaddr=vaddr, - page=page, - page_size=page_size, + _param = self._v3_list_example_analyses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15280,11 +15731,7 @@ def v3_list_global_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGlobalFunctionsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "ListExampleAnalysesOutputBody", } response_data = self.api_client.call_api( *_param, @@ -15298,12 +15745,8 @@ def v3_list_global_functions( @validate_call - def v3_list_global_functions_with_http_info( + def v3_list_example_analyses_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15316,19 +15759,11 @@ def v3_list_global_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListGlobalFunctionsOutputBody]: - """List the functions referencing a global variable. + ) -> ApiResponse[ListExampleAnalysesOutputBody]: + """List example analyses - Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the curated example Analyses. - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param vaddr: Virtual address of the global variable. (required) - :type vaddr: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15351,23 +15786,15 @@ def v3_list_global_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_global_functions_serialize( - analysis_id=analysis_id, - vaddr=vaddr, - page=page, - page_size=page_size, + _param = self._v3_list_example_analyses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGlobalFunctionsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListExampleAnalysesOutputBody", } response_data = self.api_client.call_api( *_param, @@ -15381,12 +15808,8 @@ def v3_list_global_functions_with_http_info( @validate_call - def v3_list_global_functions_without_preload_content( + def v3_list_example_analyses_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15400,18 +15823,10 @@ def v3_list_global_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the functions referencing a global variable. + """List example analyses - Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the curated example Analyses. - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param vaddr: Virtual address of the global variable. (required) - :type vaddr: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15434,11 +15849,7 @@ def v3_list_global_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_global_functions_serialize( - analysis_id=analysis_id, - vaddr=vaddr, - page=page, - page_size=page_size, + _param = self._v3_list_example_analyses_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15446,11 +15857,7 @@ def v3_list_global_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListGlobalFunctionsOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "ListExampleAnalysesOutputBody", } response_data = self.api_client.call_api( *_param, @@ -15459,12 +15866,8 @@ def v3_list_global_functions_without_preload_content( return response_data.response - def _v3_list_global_functions_serialize( + def _v3_list_example_analyses_serialize( self, - analysis_id, - vaddr, - page, - page_size, _request_auth, _content_type, _headers, @@ -15486,19 +15889,7 @@ def _v3_list_global_functions_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id - if vaddr is not None: - _path_params['vaddr'] = vaddr # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - # process the header parameters # process the form parameters # process the body parameter @@ -15521,7 +15912,7 @@ def _v3_list_global_functions_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/globals/{vaddr}/functions', + resource_path='/v3/analyses/examples', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15538,9 +15929,12 @@ def _v3_list_global_functions_serialize( @validate_call - def v3_lookup_analysis_by_binary_id( + def v3_list_global_functions( self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15553,13 +15947,19 @@ def v3_lookup_analysis_by_binary_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LookupAnalysisByBinaryIDOutputBody: - """Look up the most recent analysis for a binary. + ) -> ListGlobalFunctionsOutputBody: + """List the functions referencing a global variable. - Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param binary_id: Binary ID (required) - :type binary_id: int + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param vaddr: Virtual address of the global variable. (required) + :type vaddr: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15582,8 +15982,11 @@ def v3_lookup_analysis_by_binary_id( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_lookup_analysis_by_binary_id_serialize( - binary_id=binary_id, + _param = self._v3_list_global_functions_serialize( + analysis_id=analysis_id, + vaddr=vaddr, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15591,7 +15994,8 @@ def v3_lookup_analysis_by_binary_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupAnalysisByBinaryIDOutputBody", + '200': "ListGlobalFunctionsOutputBody", + '403': "APIError", '404': "APIError", '422': "APIError", '500': "APIError", @@ -15608,9 +16012,12 @@ def v3_lookup_analysis_by_binary_id( @validate_call - def v3_lookup_analysis_by_binary_id_with_http_info( + def v3_list_global_functions_with_http_info( self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15623,13 +16030,19 @@ def v3_lookup_analysis_by_binary_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LookupAnalysisByBinaryIDOutputBody]: - """Look up the most recent analysis for a binary. + ) -> ApiResponse[ListGlobalFunctionsOutputBody]: + """List the functions referencing a global variable. - Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param binary_id: Binary ID (required) - :type binary_id: int + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param vaddr: Virtual address of the global variable. (required) + :type vaddr: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15652,8 +16065,11 @@ def v3_lookup_analysis_by_binary_id_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_lookup_analysis_by_binary_id_serialize( - binary_id=binary_id, + _param = self._v3_list_global_functions_serialize( + analysis_id=analysis_id, + vaddr=vaddr, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15661,7 +16077,8 @@ def v3_lookup_analysis_by_binary_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupAnalysisByBinaryIDOutputBody", + '200': "ListGlobalFunctionsOutputBody", + '403': "APIError", '404': "APIError", '422': "APIError", '500': "APIError", @@ -15678,9 +16095,12 @@ def v3_lookup_analysis_by_binary_id_with_http_info( @validate_call - def v3_lookup_analysis_by_binary_id_without_preload_content( + def v3_list_global_functions_without_preload_content( self, - binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + vaddr: Annotated[int, Field(strict=True, ge=0, description="Virtual address of the global variable.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15694,12 +16114,18 @@ def v3_lookup_analysis_by_binary_id_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Look up the most recent analysis for a binary. + """List the functions referencing a global variable. - Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the functions that reference the global at the given virtual address, each with the number of times it is referenced. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param binary_id: Binary ID (required) - :type binary_id: int + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param vaddr: Virtual address of the global variable. (required) + :type vaddr: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15722,8 +16148,11 @@ def v3_lookup_analysis_by_binary_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_lookup_analysis_by_binary_id_serialize( - binary_id=binary_id, + _param = self._v3_list_global_functions_serialize( + analysis_id=analysis_id, + vaddr=vaddr, + page=page, + page_size=page_size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15731,7 +16160,8 @@ def v3_lookup_analysis_by_binary_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupAnalysisByBinaryIDOutputBody", + '200': "ListGlobalFunctionsOutputBody", + '403': "APIError", '404': "APIError", '422': "APIError", '500': "APIError", @@ -15743,9 +16173,12 @@ def v3_lookup_analysis_by_binary_id_without_preload_content( return response_data.response - def _v3_lookup_analysis_by_binary_id_serialize( + def _v3_list_global_functions_serialize( self, - binary_id, + analysis_id, + vaddr, + page, + page_size, _request_auth, _content_type, _headers, @@ -15767,9 +16200,19 @@ def _v3_lookup_analysis_by_binary_id_serialize( _body_params: Optional[bytes] = None # process the path parameters - if binary_id is not None: - _path_params['binary_id'] = binary_id + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + if vaddr is not None: + _path_params['vaddr'] = vaddr # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + # process the header parameters # process the form parameters # process the body parameter @@ -15792,7 +16235,7 @@ def _v3_lookup_analysis_by_binary_id_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/lookup/{binary_id}', + resource_path='/v3/analyses/{analysis_id}/globals/{vaddr}/functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -15809,9 +16252,9 @@ def _v3_lookup_analysis_by_binary_id_serialize( @validate_call - def v3_queue_binary_export( + def v3_lookup_analysis_by_binary_id( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15824,13 +16267,13 @@ def v3_queue_binary_export( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationBinaryExportMetadataBinaryExportResult: - """Queue a binary export + ) -> LookupAnalysisByBinaryIDOutputBody: + """Look up the most recent analysis for a binary. - Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param binary_id: Binary ID (required) + :type binary_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15853,8 +16296,8 @@ def v3_queue_binary_export( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_queue_binary_export_serialize( - analysis_id=analysis_id, + _param = self._v3_lookup_analysis_by_binary_id_serialize( + binary_id=binary_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15862,8 +16305,7 @@ def v3_queue_binary_export( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "OperationBinaryExportMetadataBinaryExportResult", - '403': "APIError", + '200': "LookupAnalysisByBinaryIDOutputBody", '404': "APIError", '422': "APIError", '500': "APIError", @@ -15880,9 +16322,9 @@ def v3_queue_binary_export( @validate_call - def v3_queue_binary_export_with_http_info( + def v3_lookup_analysis_by_binary_id_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15895,13 +16337,13 @@ def v3_queue_binary_export_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationBinaryExportMetadataBinaryExportResult]: - """Queue a binary export + ) -> ApiResponse[LookupAnalysisByBinaryIDOutputBody]: + """Look up the most recent analysis for a binary. - Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param binary_id: Binary ID (required) + :type binary_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15924,8 +16366,8 @@ def v3_queue_binary_export_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_queue_binary_export_serialize( - analysis_id=analysis_id, + _param = self._v3_lookup_analysis_by_binary_id_serialize( + binary_id=binary_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -15933,8 +16375,7 @@ def v3_queue_binary_export_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "OperationBinaryExportMetadataBinaryExportResult", - '403': "APIError", + '200': "LookupAnalysisByBinaryIDOutputBody", '404': "APIError", '422': "APIError", '500': "APIError", @@ -15951,9 +16392,9 @@ def v3_queue_binary_export_with_http_info( @validate_call - def v3_queue_binary_export_without_preload_content( + def v3_lookup_analysis_by_binary_id_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + binary_id: Annotated[int, Field(strict=True, ge=1, description="Binary ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -15967,12 +16408,12 @@ def v3_queue_binary_export_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Queue a binary export + """Look up the most recent analysis for a binary. - Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the ID of the most recent analysis of this binary that the caller may see (their own, their team's, or public). Returns 404 if the binary has none, whether because it has never been analysed or because every analysis of it is private to someone else. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param binary_id: Binary ID (required) + :type binary_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -15995,8 +16436,8 @@ def v3_queue_binary_export_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_queue_binary_export_serialize( - analysis_id=analysis_id, + _param = self._v3_lookup_analysis_by_binary_id_serialize( + binary_id=binary_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16004,8 +16445,7 @@ def v3_queue_binary_export_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "OperationBinaryExportMetadataBinaryExportResult", - '403': "APIError", + '200': "LookupAnalysisByBinaryIDOutputBody", '404': "APIError", '422': "APIError", '500': "APIError", @@ -16017,9 +16457,9 @@ def v3_queue_binary_export_without_preload_content( return response_data.response - def _v3_queue_binary_export_serialize( + def _v3_lookup_analysis_by_binary_id_serialize( self, - analysis_id, + binary_id, _request_auth, _content_type, _headers, @@ -16041,8 +16481,8 @@ def _v3_queue_binary_export_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id + if binary_id is not None: + _path_params['binary_id'] = binary_id # process the query parameters # process the header parameters # process the form parameters @@ -16065,8 +16505,8 @@ def _v3_queue_binary_export_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/analyses/{analysis_id}/binary-export', + method='GET', + resource_path='/v3/analyses/lookup/{binary_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16083,10 +16523,9 @@ def _v3_queue_binary_export_serialize( @validate_call - def v3_requeue_analysis( + def v3_queue_binary_export( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16099,15 +16538,13 @@ def v3_requeue_analysis( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationCreateMetadataCreateResult: - """Requeue an analysis + ) -> OperationBinaryExportMetadataBinaryExportResult: + """Queue a binary export - Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param requeue_analysis_request: (required) - :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16130,9 +16567,8 @@ def v3_requeue_analysis( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_requeue_analysis_serialize( + _param = self._v3_queue_binary_export_serialize( analysis_id=analysis_id, - requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16140,7 +16576,7 @@ def v3_requeue_analysis( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '202': "OperationBinaryExportMetadataBinaryExportResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16158,10 +16594,9 @@ def v3_requeue_analysis( @validate_call - def v3_requeue_analysis_with_http_info( + def v3_queue_binary_export_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16174,15 +16609,13 @@ def v3_requeue_analysis_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationCreateMetadataCreateResult]: - """Requeue an analysis + ) -> ApiResponse[OperationBinaryExportMetadataBinaryExportResult]: + """Queue a binary export - Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param requeue_analysis_request: (required) - :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16205,9 +16638,8 @@ def v3_requeue_analysis_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_requeue_analysis_serialize( + _param = self._v3_queue_binary_export_serialize( analysis_id=analysis_id, - requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16215,7 +16647,7 @@ def v3_requeue_analysis_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '202': "OperationBinaryExportMetadataBinaryExportResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16233,10 +16665,9 @@ def v3_requeue_analysis_with_http_info( @validate_call - def v3_requeue_analysis_without_preload_content( + def v3_queue_binary_export_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16250,14 +16681,12 @@ def v3_requeue_analysis_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Requeue an analysis + """Queue a binary export - Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Starts an asynchronous export of the binary with its current symbols rewritten in, and returns the operation to poll for its outcome. Only the owner may call it, and it requires a subscription tier that supports symbol export. Download the result once the operation reports done. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param requeue_analysis_request: (required) - :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16280,9 +16709,8 @@ def v3_requeue_analysis_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_requeue_analysis_serialize( + _param = self._v3_queue_binary_export_serialize( analysis_id=analysis_id, - requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16290,7 +16718,7 @@ def v3_requeue_analysis_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "OperationCreateMetadataCreateResult", + '202': "OperationBinaryExportMetadataBinaryExportResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16303,10 +16731,9 @@ def v3_requeue_analysis_without_preload_content( return response_data.response - def _v3_requeue_analysis_serialize( + def _v3_queue_binary_export_serialize( self, analysis_id, - requeue_analysis_request, _request_auth, _content_type, _headers, @@ -16334,8 +16761,6 @@ def _v3_requeue_analysis_serialize( # process the header parameters # process the form parameters # process the body parameter - if requeue_analysis_request is not None: - _body_params = requeue_analysis_request # set the HTTP header `Accept` @@ -16346,19 +16771,6 @@ def _v3_requeue_analysis_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -16368,7 +16780,7 @@ def _v3_requeue_analysis_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses/{analysis_id}/requeue', + resource_path='/v3/analyses/{analysis_id}/binary-export', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16385,11 +16797,10 @@ def _v3_requeue_analysis_serialize( @validate_call - def v3_revoke_analysis_access( + def v3_requeue_analysis( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, - team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, + requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16402,17 +16813,15 @@ def v3_revoke_analysis_access( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Stop sharing an analysis with a user or team + ) -> OperationCreateMetadataCreateResult: + """Requeue an analysis - Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required - :type user_id: int - :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required - :type team_id: int + :param requeue_analysis_request: (required) + :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16435,10 +16844,9 @@ def v3_revoke_analysis_access( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_revoke_analysis_access_serialize( + _param = self._v3_requeue_analysis_serialize( analysis_id=analysis_id, - user_id=user_id, - team_id=team_id, + requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16446,8 +16854,7 @@ def v3_revoke_analysis_access( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "APIError", + '201': "OperationCreateMetadataCreateResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16465,11 +16872,10 @@ def v3_revoke_analysis_access( @validate_call - def v3_revoke_analysis_access_with_http_info( + def v3_requeue_analysis_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, - team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, + requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16482,17 +16888,15 @@ def v3_revoke_analysis_access_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Stop sharing an analysis with a user or team + ) -> ApiResponse[OperationCreateMetadataCreateResult]: + """Requeue an analysis - Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required - :type user_id: int - :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required - :type team_id: int + :param requeue_analysis_request: (required) + :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16515,10 +16919,9 @@ def v3_revoke_analysis_access_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_revoke_analysis_access_serialize( + _param = self._v3_requeue_analysis_serialize( analysis_id=analysis_id, - user_id=user_id, - team_id=team_id, + requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16526,8 +16929,7 @@ def v3_revoke_analysis_access_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "APIError", + '201': "OperationCreateMetadataCreateResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16545,11 +16947,10 @@ def v3_revoke_analysis_access_with_http_info( @validate_call - def v3_revoke_analysis_access_without_preload_content( + def v3_requeue_analysis_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, - team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, + requeue_analysis_request: RequeueAnalysisRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16563,16 +16964,14 @@ def v3_revoke_analysis_access_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Stop sharing an analysis with a user or team + """Requeue an analysis - Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Creates a new Analysis and a new Binary sharing this Analysis's SHA-256, and runs the pipeline against them, leaving this Analysis and its Binary unchanged. Only the owner may call it. Poll the returned Operation for status, same as a normal create. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required - :type user_id: int - :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required - :type team_id: int + :param requeue_analysis_request: (required) + :type requeue_analysis_request: RequeueAnalysisRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16595,10 +16994,9 @@ def v3_revoke_analysis_access_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_revoke_analysis_access_serialize( + _param = self._v3_requeue_analysis_serialize( analysis_id=analysis_id, - user_id=user_id, - team_id=team_id, + requeue_analysis_request=requeue_analysis_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16606,8 +17004,7 @@ def v3_revoke_analysis_access_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': "APIError", + '201': "OperationCreateMetadataCreateResult", '403': "APIError", '404': "APIError", '422': "APIError", @@ -16620,11 +17017,10 @@ def v3_revoke_analysis_access_without_preload_content( return response_data.response - def _v3_revoke_analysis_access_serialize( + def _v3_requeue_analysis_serialize( self, analysis_id, - user_id, - team_id, + requeue_analysis_request, _request_auth, _content_type, _headers, @@ -16649,17 +17045,11 @@ def _v3_revoke_analysis_access_serialize( if analysis_id is not None: _path_params['analysis_id'] = analysis_id # process the query parameters - if user_id is not None: - - _query_params.append(('user_id', user_id)) - - if team_id is not None: - - _query_params.append(('team_id', team_id)) - # process the header parameters # process the form parameters # process the body parameter + if requeue_analysis_request is not None: + _body_params = requeue_analysis_request # set the HTTP header `Accept` @@ -16670,6 +17060,19 @@ def _v3_revoke_analysis_access_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -16678,8 +17081,8 @@ def _v3_revoke_analysis_access_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v3/analyses/{analysis_id}/access-rules', + method='POST', + resource_path='/v3/analyses/{analysis_id}/requeue', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -16696,10 +17099,11 @@ def _v3_revoke_analysis_access_serialize( @validate_call - def v3_run_dynamic_execution( + def v3_revoke_analysis_access( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, + user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, + team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16712,15 +17116,17 @@ def v3_run_dynamic_execution( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> OperationDynamicExecutionMetadataDynamicExecutionResult: - """Trigger a dynamic execution run. + ) -> None: + """Stop sharing an analysis with a user or team - Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param run_dynamic_execution_input_body: - :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody + :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required + :type user_id: int + :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required + :type team_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16743,9 +17149,10 @@ def v3_run_dynamic_execution( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_serialize( + _param = self._v3_revoke_analysis_access_serialize( analysis_id=analysis_id, - run_dynamic_execution_input_body=run_dynamic_execution_input_body, + user_id=user_id, + team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16753,11 +17160,10 @@ def v3_run_dynamic_execution( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '204': None, '400': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -16773,10 +17179,11 @@ def v3_run_dynamic_execution( @validate_call - def v3_run_dynamic_execution_with_http_info( + def v3_revoke_analysis_access_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, + user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, + team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16789,15 +17196,17 @@ def v3_run_dynamic_execution_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OperationDynamicExecutionMetadataDynamicExecutionResult]: - """Trigger a dynamic execution run. + ) -> ApiResponse[None]: + """Stop sharing an analysis with a user or team - Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param run_dynamic_execution_input_body: - :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody + :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required + :type user_id: int + :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required + :type team_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16820,9 +17229,10 @@ def v3_run_dynamic_execution_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_serialize( + _param = self._v3_revoke_analysis_access_serialize( analysis_id=analysis_id, - run_dynamic_execution_input_body=run_dynamic_execution_input_body, + user_id=user_id, + team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16830,11 +17240,10 @@ def v3_run_dynamic_execution_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '204': None, '400': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -16850,10 +17259,11 @@ def v3_run_dynamic_execution_with_http_info( @validate_call - def v3_run_dynamic_execution_without_preload_content( + def v3_revoke_analysis_access_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - run_dynamic_execution_input_body: Optional[RunDynamicExecutionInputBody] = None, + user_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The user to stop sharing with. Exactly one of user_id and team_id is required")] = None, + team_id: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The team to stop sharing with. Exactly one of user_id and team_id is required")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -16867,14 +17277,16 @@ def v3_run_dynamic_execution_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Trigger a dynamic execution run. + """Stop sharing an analysis with a user or team - Submits the analysis's binary to the sandbox and returns the operation to poll for its outcome. Returns 409 while a run is already in progress for this analysis. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict + Removes the access rule of one user or one team, identified by the `user_id` or `team_id` query parameter. Removing a rule that does not exist succeeds. Requires edit access to the analysis. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param analysis_id: Analysis ID (required) :type analysis_id: int - :param run_dynamic_execution_input_body: - :type run_dynamic_execution_input_body: RunDynamicExecutionInputBody + :param user_id: The user to stop sharing with. Exactly one of user_id and team_id is required + :type user_id: int + :param team_id: The team to stop sharing with. Exactly one of user_id and team_id is required + :type team_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -16897,9 +17309,10 @@ def v3_run_dynamic_execution_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_serialize( + _param = self._v3_revoke_analysis_access_serialize( analysis_id=analysis_id, - run_dynamic_execution_input_body=run_dynamic_execution_input_body, + user_id=user_id, + team_id=team_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -16907,11 +17320,10 @@ def v3_run_dynamic_execution_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OperationDynamicExecutionMetadataDynamicExecutionResult", + '204': None, '400': "APIError", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -16922,10 +17334,11 @@ def v3_run_dynamic_execution_without_preload_content( return response_data.response - def _v3_run_dynamic_execution_serialize( + def _v3_revoke_analysis_access_serialize( self, analysis_id, - run_dynamic_execution_input_body, + user_id, + team_id, _request_auth, _content_type, _headers, @@ -16950,11 +17363,17 @@ def _v3_run_dynamic_execution_serialize( if analysis_id is not None: _path_params['analysis_id'] = analysis_id # process the query parameters + if user_id is not None: + + _query_params.append(('user_id', user_id)) + + if team_id is not None: + + _query_params.append(('team_id', team_id)) + # process the header parameters # process the form parameters # process the body parameter - if run_dynamic_execution_input_body is not None: - _body_params = run_dynamic_execution_input_body # set the HTTP header `Accept` @@ -16965,19 +17384,6 @@ def _v3_run_dynamic_execution_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -16986,8 +17392,8 @@ def _v3_run_dynamic_execution_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution:run', + method='DELETE', + resource_path='/v3/analyses/{analysis_id}/access-rules', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17004,9 +17410,10 @@ def _v3_run_dynamic_execution_serialize( @validate_call - def v3_run_dynamic_execution_summary( + def v3_run_dynamic_execution_run_summary( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17020,12 +17427,14 @@ def v3_run_dynamic_execution_summary( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult: - """Regenerate the dynamic execution summary. + """Regenerate a run's dynamic execution summary. - Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17048,8 +17457,9 @@ def v3_run_dynamic_execution_summary( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_summary_serialize( + _param = self._v3_run_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17058,7 +17468,6 @@ def v3_run_dynamic_execution_summary( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", - '400': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -17077,9 +17486,10 @@ def v3_run_dynamic_execution_summary( @validate_call - def v3_run_dynamic_execution_summary_with_http_info( + def v3_run_dynamic_execution_run_summary_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17093,12 +17503,14 @@ def v3_run_dynamic_execution_summary_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult]: - """Regenerate the dynamic execution summary. + """Regenerate a run's dynamic execution summary. - Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17121,8 +17533,9 @@ def v3_run_dynamic_execution_summary_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_summary_serialize( + _param = self._v3_run_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17131,7 +17544,6 @@ def v3_run_dynamic_execution_summary_with_http_info( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", - '400': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -17150,9 +17562,10 @@ def v3_run_dynamic_execution_summary_with_http_info( @validate_call - def v3_run_dynamic_execution_summary_without_preload_content( + def v3_run_dynamic_execution_run_summary_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + run_id: Annotated[str, Field(strict=True, description="Dynamic execution run ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -17166,12 +17579,14 @@ def v3_run_dynamic_execution_summary_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Regenerate the dynamic execution summary. + """Regenerate a run's dynamic execution summary. - Starts a new LLM summary of the analysis's completed run and returns the operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete + Starts a new LLM summary of the completed run and returns the run's summary operation to poll. The new summary replaces the stored one once it succeeds. Only the analysis owner may regenerate. Returns 409 while the run is incomplete or a summary is already in progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `409` [`DYNAMIC_EXECUTION_INCOMPLETE`](/errors/DYNAMIC_EXECUTION_INCOMPLETE) — Dynamic Execution Incomplete :param analysis_id: Analysis ID (required) :type analysis_id: int + :param run_id: Dynamic execution run ID (required) + :type run_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -17194,8 +17609,9 @@ def v3_run_dynamic_execution_summary_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_run_dynamic_execution_summary_serialize( + _param = self._v3_run_dynamic_execution_run_summary_serialize( analysis_id=analysis_id, + run_id=run_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -17204,7 +17620,6 @@ def v3_run_dynamic_execution_summary_without_preload_content( _response_types_map: Dict[str, Optional[str]] = { '200': "OperationDynamicExecutionSummaryMetadataDynamicExecutionSummaryResult", - '400': "APIError", '403': "APIError", '404': "APIError", '409': "APIError", @@ -17218,9 +17633,10 @@ def v3_run_dynamic_execution_summary_without_preload_content( return response_data.response - def _v3_run_dynamic_execution_summary_serialize( + def _v3_run_dynamic_execution_run_summary_serialize( self, analysis_id, + run_id, _request_auth, _content_type, _headers, @@ -17244,6 +17660,8 @@ def _v3_run_dynamic_execution_summary_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id + if run_id is not None: + _path_params['run_id'] = run_id # process the query parameters # process the header parameters # process the form parameters @@ -17267,7 +17685,7 @@ def _v3_run_dynamic_execution_summary_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v3/analyses/{analysis_id}/dynamic-execution/summary:run', + resource_path='/v3/analyses/{analysis_id}/dynamic-execution/runs/{run_id}/summary:run', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -17913,7 +18331,7 @@ def v3_update_analysis_global( ) -> GlobalVariable: """Edit a global variable. - Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -17994,7 +18412,7 @@ def v3_update_analysis_global_with_http_info( ) -> ApiResponse[GlobalVariable]: """Edit a global variable. - Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -18075,7 +18493,7 @@ def v3_update_analysis_global_without_preload_content( ) -> RESTResponseType: """Edit a global variable. - Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists + Renames a global, assigns it an analysis data type, or both. Each field the request sets stamps its own provenance `USER`, which a later re-extraction carries forward instead of overwriting. A name another global in the analysis already holds is rejected. Returns 409 until the analysis is Complete. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`ALREADY_EXISTS`](/errors/ALREADY_EXISTS) — Already Exists - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int diff --git a/revengai/api/analyses_results_metadata_api.py b/revengai/api/analyses_results_metadata_api.py index d91757a7..7c0aee16 100644 --- a/revengai/api/analyses_results_metadata_api.py +++ b/revengai/api/analyses_results_metadata_api.py @@ -15,7 +15,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated -from pydantic import Field, StrictBool, StrictInt, StrictStr +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Optional from typing_extensions import Annotated from revengai.models.analysis_capabilities_output_body import AnalysisCapabilitiesOutputBody @@ -25,6 +25,8 @@ from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags from revengai.models.base_response_capabilities import BaseResponseCapabilities +from revengai.models.feedback_submission import FeedbackSubmission +from revengai.models.recorded_feedback import RecordedFeedback from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -1246,6 +1248,295 @@ def _get_tags_serialize( + @validate_call + def v3_get_analysis_feedback( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RecordedFeedback: + """Get the caller's feedback on an analysis. + + Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_analysis_feedback_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[RecordedFeedback]: + """Get the caller's feedback on an analysis. + + Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_analysis_feedback_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get the caller's feedback on an analysis. + + Returns the feedback the caller recorded for one kind of result on this analysis, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_analysis_feedback_serialize( + self, + analysis_id, + type, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + if type is not None: + _path_params['type'] = type + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/analyses/{analysis_id}/feedback/{type}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def v3_get_analysis_xref( self, @@ -2081,3 +2372,320 @@ def _v3_list_analysis_tags_serialize( ) + + + @validate_call + def v3_upsert_analysis_feedback( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> None: + """Record feedback on an analysis. + + Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upsert_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + feedback_submission=feedback_submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_upsert_analysis_feedback_with_http_info( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[None]: + """Record feedback on an analysis. + + Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upsert_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + feedback_submission=feedback_submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_upsert_analysis_feedback_without_preload_content( + self, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Record feedback on an analysis. + + Records how useful the caller found one kind of result for this analysis, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_upsert_analysis_feedback_serialize( + analysis_id=analysis_id, + type=type, + feedback_submission=feedback_submission, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '204': None, + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_upsert_analysis_feedback_serialize( + self, + analysis_id, + type, + feedback_submission, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + if type is not None: + _path_params['type'] = type + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if feedback_submission is not None: + _body_params = feedback_submission + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v3/analyses/{analysis_id}/feedback/{type}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/billing_api.py b/revengai/api/billing_api.py new file mode 100644 index 00000000..2c332025 --- /dev/null +++ b/revengai/api/billing_api.py @@ -0,0 +1,282 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from revengai.models.get_credit_estimates_output_body import GetCreditEstimatesOutputBody + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class BillingApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def v3_get_credit_estimates( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GetCreditEstimatesOutputBody: + """Get credit estimates. + + Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_credit_estimates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCreditEstimatesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_get_credit_estimates_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GetCreditEstimatesOutputBody]: + """Get credit estimates. + + Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_credit_estimates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCreditEstimatesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_get_credit_estimates_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get credit estimates. + + Returns the table for estimating, before a binary is analysed, the credits creating an analysis of it will use. Find the size bucket the binary's size in bytes falls in; each requested operation, plus `binary-analysis`, is estimated to cost `base_credits + credits_per_function × functions`. The estimate is calibrated to come in at or above most real runs, but it is not a quote: what is charged depends on the binary. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_get_credit_estimates_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GetCreditEstimatesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_get_credit_estimates_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/credit-estimates', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api/binaries_api.py b/revengai/api/binaries_api.py index 6c530c0b..aa201755 100644 --- a/revengai/api/binaries_api.py +++ b/revengai/api/binaries_api.py @@ -31,6 +31,7 @@ from revengai.models.get_die_info_output_body import GetDieInfoOutputBody from revengai.models.get_related_binaries_output_body import GetRelatedBinariesOutputBody from revengai.models.get_related_status_output_body import GetRelatedStatusOutputBody +from revengai.models.list_malware_families_output_body import ListMalwareFamiliesOutputBody from revengai.models.search_binaries_output_body import SearchBinariesOutputBody from revengai.models.upload_output_body import UploadOutputBody @@ -4094,6 +4095,271 @@ def _v3_get_binary_related_status_serialize( + @validate_call + def v3_list_malware_families( + self, + binary_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=500)]], Field(description="Binaries to look up, typically those a function-matching run found in the malware corpus.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ListMalwareFamiliesOutputBody: + """Look up the malware families of binaries in the RevEng.AI malware corpus. + + Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + + :param binary_ids: Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + :type binary_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_list_malware_families_serialize( + binary_ids=binary_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMalwareFamiliesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def v3_list_malware_families_with_http_info( + self, + binary_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=500)]], Field(description="Binaries to look up, typically those a function-matching run found in the malware corpus.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ListMalwareFamiliesOutputBody]: + """Look up the malware families of binaries in the RevEng.AI malware corpus. + + Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + + :param binary_ids: Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + :type binary_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_list_malware_families_serialize( + binary_ids=binary_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMalwareFamiliesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def v3_list_malware_families_without_preload_content( + self, + binary_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=500)]], Field(description="Binaries to look up, typically those a function-matching run found in the malware corpus.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Look up the malware families of binaries in the RevEng.AI malware corpus. + + Returns the malware family of each given binary that belongs to the RevEng.AI malware corpus, with every corpus binary in that family. Family names are lowercase without punctuation, with known aliases merged. Binaries outside the corpus or without a family are ignored. + + :param binary_ids: Binaries to look up, typically those a function-matching run found in the malware corpus. (required) + :type binary_ids: List[int] + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._v3_list_malware_families_serialize( + binary_ids=binary_ids, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListMalwareFamiliesOutputBody", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _v3_list_malware_families_serialize( + self, + binary_ids, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'binary_ids': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if binary_ids is not None: + + _query_params.append(('binary_ids', binary_ids)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey', + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v3/malware-families', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def v3_search_binaries( self, diff --git a/revengai/api/data_types_api.py b/revengai/api/data_types_api.py index 6281aed1..f474d755 100644 --- a/revengai/api/data_types_api.py +++ b/revengai/api/data_types_api.py @@ -71,7 +71,7 @@ def v3_copy_function_signatures( ) -> CopyFunctionSignaturesOutputBody: """Copy function signatures - Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -148,7 +148,7 @@ def v3_copy_function_signatures_with_http_info( ) -> ApiResponse[CopyFunctionSignaturesOutputBody]: """Copy function signatures - Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -225,7 +225,7 @@ def v3_copy_function_signatures_without_preload_content( ) -> RESTResponseType: """Copy function signatures - Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces each target function's signature with a copy of its source's parameters, return type and calling convention. Every target must belong to this analysis; a source may belong to any analysis the caller can read. The whole request is rejected if any pair is invalid. A `data_type_id` means nothing outside the analysis that issued it, so the types a copied signature needs are resolved against this analysis by namespace, name and kind. A type this analysis already has under that key has its definition replaced by the source's; a type it lacks is created. Copied signatures get a `source_type` of `USER` and a `source_function_id`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -379,7 +379,7 @@ def v3_create_analysis_data_types( ) -> AnalysisDataTypesOutputBody: """Create an analysis's data types - Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -456,7 +456,7 @@ def v3_create_analysis_data_types_with_http_info( ) -> ApiResponse[AnalysisDataTypesOutputBody]: """Create an analysis's data types - Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -533,7 +533,7 @@ def v3_create_analysis_data_types_without_preload_content( ) -> RESTResponseType: """Create an analysis's data types - Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Adds user-authored types to an analysis. Many types can be created in one request; the whole request is rejected if any of them is invalid. Ids are assigned by the server and returned here. Stored types get a `source_type` of `USER`. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -2890,7 +2890,7 @@ def v3_update_analysis_data_types( ) -> AnalysisDataTypesOutputBody: """Update an analysis's data types - Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -2967,7 +2967,7 @@ def v3_update_analysis_data_types_with_http_info( ) -> ApiResponse[AnalysisDataTypesOutputBody]: """Update an analysis's data types - Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3044,7 +3044,7 @@ def v3_update_analysis_data_types_without_preload_content( ) -> RESTResponseType: """Update an analysis's data types - Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces stored types in full: a field left out of the request is cleared. Many types can be updated in one request; the whole request is rejected if any of them is invalid. `kind` may be changed, and the definition must then match the new kind. Updated types get a `source_type` of `USER`, and their previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `409` [`CONFLICT`](/errors/CONFLICT) — Conflict - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3199,7 +3199,7 @@ def v3_update_function_signature( ) -> FunctionSignatureEntry: """Update a function's signature - Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3244,6 +3244,7 @@ def v3_update_function_signature( '400': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3279,7 +3280,7 @@ def v3_update_function_signature_with_http_info( ) -> ApiResponse[FunctionSignatureEntry]: """Update a function's signature - Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3324,6 +3325,7 @@ def v3_update_function_signature_with_http_info( '400': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } @@ -3359,7 +3361,7 @@ def v3_update_function_signature_without_preload_content( ) -> RESTResponseType: """Update a function's signature - Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Replaces a function's parameters, return type and calling convention in full — anything left out of the request is cleared. Parameter and return types are `data_type_id`s belonging to this analysis. Edits an extracted signature only: a function with `has_signature` false is rejected with 404. The stored signature gets a `source_type` of `USER`, and its previous value is retained. Returns 409 until the analysis is Complete. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready :param analysis_id: Analysis ID (required) :type analysis_id: int @@ -3404,6 +3406,7 @@ def v3_update_function_signature_without_preload_content( '400': "APIError", '403': "APIError", '404': "APIError", + '409': "APIError", '422': "APIError", '500': "APIError", } diff --git a/revengai/api/functions_core_api.py b/revengai/api/functions_core_api.py index 79ea7ce7..7c5d11d6 100644 --- a/revengai/api/functions_core_api.py +++ b/revengai/api/functions_core_api.py @@ -20,12 +20,9 @@ from typing_extensions import Annotated from revengai.models.add_callee_input_body import AddCalleeInputBody from revengai.models.add_user_string_to_function_input_body import AddUserStringToFunctionInputBody -from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse -from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse -from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse from revengai.models.base_response_list_callees_caller_functions_response import BaseResponseListCalleesCallerFunctionsResponse from revengai.models.call_edges_output_body import CallEdgesOutputBody @@ -33,6 +30,7 @@ from revengai.models.canonicalize_names_output_body import CanonicalizeNamesOutputBody from revengai.models.capabilities_output_body import CapabilitiesOutputBody from revengai.models.disassembly_output_body import DisassemblyOutputBody +from revengai.models.feedback_submission import FeedbackSubmission from revengai.models.function_details_output_body import FunctionDetailsOutputBody from revengai.models.get_function_maps_output_body import GetFunctionMapsOutputBody from revengai.models.get_matches_output_body import GetMatchesOutputBody @@ -43,6 +41,7 @@ from revengai.models.list_function_globals_output_body import ListFunctionGlobalsOutputBody from revengai.models.list_function_strings_output_body import ListFunctionStringsOutputBody from revengai.models.list_imported_functions_output_body import ListImportedFunctionsOutputBody +from revengai.models.recorded_feedback import RecordedFeedback from revengai.models.search_functions_output_body import SearchFunctionsOutputBody from revengai.models.start_matching_for_functions_input_body import StartMatchingForFunctionsInputBody from revengai.models.start_matching_output_body import StartMatchingOutputBody @@ -673,15 +672,9 @@ def _add_user_string_to_function_serialize( @validate_call - def get_analysis_strings( + def get_function_blocks( self, - analysis_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, - function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Order by field")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort order for the results")] = None, + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -694,25 +687,13 @@ def get_analysis_strings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseAnalysisStringsResponse: - """(Deprecated) Get string information found in the Analysis + ) -> BaseResponseFunctionBlocksResponse: + """(Deprecated) Get disassembly blocks related to the function - Get string information found in the analysis + Get disassembly blocks related to the function - :param analysis_id: (required) - :type analysis_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param function_search: Search is applied to function names - :type function_search: str - :param order_by: Order by field - :type order_by: str - :param sort_order: Sort order for the results - :type sort_order: str + :param function_id: (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -734,16 +715,10 @@ def get_analysis_strings( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_serialize( - analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, + _param = self._get_function_blocks_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -751,8 +726,9 @@ def get_analysis_strings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsResponse", + '200': "BaseResponseFunctionBlocksResponse", '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -766,15 +742,9 @@ def get_analysis_strings( @validate_call - def get_analysis_strings_with_http_info( + def get_function_blocks_with_http_info( self, - analysis_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, - function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Order by field")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort order for the results")] = None, + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -787,25 +757,13 @@ def get_analysis_strings_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseAnalysisStringsResponse]: - """(Deprecated) Get string information found in the Analysis + ) -> ApiResponse[BaseResponseFunctionBlocksResponse]: + """(Deprecated) Get disassembly blocks related to the function - Get string information found in the analysis + Get disassembly blocks related to the function - :param analysis_id: (required) - :type analysis_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param function_search: Search is applied to function names - :type function_search: str - :param order_by: Order by field - :type order_by: str - :param sort_order: Sort order for the results - :type sort_order: str + :param function_id: (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -827,16 +785,10 @@ def get_analysis_strings_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_serialize( - analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, + _param = self._get_function_blocks_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -844,8 +796,9 @@ def get_analysis_strings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsResponse", + '200': "BaseResponseFunctionBlocksResponse", '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -859,15 +812,9 @@ def get_analysis_strings_with_http_info( @validate_call - def get_analysis_strings_without_preload_content( + def get_function_blocks_without_preload_content( self, - analysis_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, - function_search: Annotated[Optional[StrictStr], Field(description="Search is applied to function names")] = None, - order_by: Annotated[Optional[StrictStr], Field(description="Order by field")] = None, - sort_order: Annotated[Optional[StrictStr], Field(description="Sort order for the results")] = None, + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -881,24 +828,12 @@ def get_analysis_strings_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get string information found in the Analysis + """(Deprecated) Get disassembly blocks related to the function - Get string information found in the analysis + Get disassembly blocks related to the function - :param analysis_id: (required) - :type analysis_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param function_search: Search is applied to function names - :type function_search: str - :param order_by: Order by field - :type order_by: str - :param sort_order: Sort order for the results - :type sort_order: str + :param function_id: (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -920,16 +855,10 @@ def get_analysis_strings_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_serialize( - analysis_id=analysis_id, - page=page, - page_size=page_size, - search=search, - function_search=function_search, - order_by=order_by, - sort_order=sort_order, + _param = self._get_function_blocks_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -937,8 +866,9 @@ def get_analysis_strings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsResponse", + '200': "BaseResponseFunctionBlocksResponse", '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -947,15 +877,9 @@ def get_analysis_strings_without_preload_content( return response_data.response - def _get_analysis_strings_serialize( + def _get_function_blocks_serialize( self, - analysis_id, - page, - page_size, - search, - function_search, - order_by, - sort_order, + function_id, _request_auth, _content_type, _headers, @@ -977,33 +901,9 @@ def _get_analysis_strings_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id + if function_id is not None: + _path_params['function_id'] = function_id # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - - if search is not None: - - _query_params.append(('search', search)) - - if function_search is not None: - - _query_params.append(('function_search', function_search)) - - if order_by is not None: - - _query_params.append(('order_by', order_by)) - - if sort_order is not None: - - _query_params.append(('sort_order', sort_order)) - # process the header parameters # process the form parameters # process the body parameter @@ -1026,7 +926,7 @@ def _get_analysis_strings_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/analyses/{analysis_id}/functions/strings', + resource_path='/v2/functions/{function_id}/blocks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1043,9 +943,9 @@ def _get_analysis_strings_serialize( @validate_call - def get_analysis_strings_status( + def get_function_blocks_0( self, - analysis_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1058,13 +958,13 @@ def get_analysis_strings_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseAnalysisStringsStatusResponse: - """(Deprecated) Get string processing state for the Analysis + ) -> DisassemblyOutputBody: + """Get function disassembly - Get string processing state for the Analysis + Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1086,10 +986,9 @@ def get_analysis_strings_status( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_status_serialize( - analysis_id=analysis_id, + _param = self._get_function_blocks_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1097,8 +996,12 @@ def get_analysis_strings_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsStatusResponse", - '422': "BaseResponse", + '200': "DisassemblyOutputBody", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1112,9 +1015,9 @@ def get_analysis_strings_status( @validate_call - def get_analysis_strings_status_with_http_info( + def get_function_blocks_0_with_http_info( self, - analysis_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1127,13 +1030,13 @@ def get_analysis_strings_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseAnalysisStringsStatusResponse]: - """(Deprecated) Get string processing state for the Analysis + ) -> ApiResponse[DisassemblyOutputBody]: + """Get function disassembly - Get string processing state for the Analysis + Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1155,10 +1058,9 @@ def get_analysis_strings_status_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_status_serialize( - analysis_id=analysis_id, + _param = self._get_function_blocks_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1166,8 +1068,12 @@ def get_analysis_strings_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsStatusResponse", - '422': "BaseResponse", + '200': "DisassemblyOutputBody", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1181,9 +1087,9 @@ def get_analysis_strings_status_with_http_info( @validate_call - def get_analysis_strings_status_without_preload_content( + def get_function_blocks_0_without_preload_content( self, - analysis_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1197,12 +1103,12 @@ def get_analysis_strings_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get string processing state for the Analysis + """Get function disassembly - Get string processing state for the Analysis + Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables). Parameters and return type are not part of the disassembly; read them from GET /v3/analyses/{analysis_id}/functions/{function_id}/signature. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - :param analysis_id: (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1224,10 +1130,9 @@ def get_analysis_strings_status_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/analyses/{analysis_id}/functions/strings/status is deprecated.", DeprecationWarning) - _param = self._get_analysis_strings_status_serialize( - analysis_id=analysis_id, + _param = self._get_function_blocks_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1235,8 +1140,12 @@ def get_analysis_strings_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseAnalysisStringsStatusResponse", - '422': "BaseResponse", + '200': "DisassemblyOutputBody", + '403': "APIError", + '404': "APIError", + '409': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -1245,9 +1154,9 @@ def get_analysis_strings_status_without_preload_content( return response_data.response - def _get_analysis_strings_status_serialize( + def _get_function_blocks_0_serialize( self, - analysis_id, + function_id, _request_auth, _content_type, _headers, @@ -1269,8 +1178,8 @@ def _get_analysis_strings_status_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id + if function_id is not None: + _path_params['function_id'] = function_id # process the query parameters # process the header parameters # process the form parameters @@ -1294,7 +1203,7 @@ def _get_analysis_strings_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/analyses/{analysis_id}/functions/strings/status', + resource_path='/v3/functions/{function_id}/blocks', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1311,7 +1220,7 @@ def _get_analysis_strings_status_serialize( @validate_call - def get_function_blocks( + def get_function_callees_callers( self, function_id: StrictInt, _request_timeout: Union[ @@ -1326,10 +1235,9 @@ def get_function_blocks( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseFunctionBlocksResponse: - """(Deprecated) Get disassembly blocks related to the function + ) -> BaseResponseCalleesCallerFunctionsResponse: + """(Deprecated) Get list of functions that call or are called by the specified function - Get disassembly blocks related to the function :param function_id: (required) :type function_id: int @@ -1354,9 +1262,9 @@ def get_function_blocks( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_blocks_serialize( + _param = self._get_function_callees_callers_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1365,9 +1273,8 @@ def get_function_blocks( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionBlocksResponse", + '200': "BaseResponseCalleesCallerFunctionsResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1381,7 +1288,7 @@ def get_function_blocks( @validate_call - def get_function_blocks_with_http_info( + def get_function_callees_callers_with_http_info( self, function_id: StrictInt, _request_timeout: Union[ @@ -1396,10 +1303,9 @@ def get_function_blocks_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseFunctionBlocksResponse]: - """(Deprecated) Get disassembly blocks related to the function + ) -> ApiResponse[BaseResponseCalleesCallerFunctionsResponse]: + """(Deprecated) Get list of functions that call or are called by the specified function - Get disassembly blocks related to the function :param function_id: (required) :type function_id: int @@ -1424,9 +1330,9 @@ def get_function_blocks_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_blocks_serialize( + _param = self._get_function_callees_callers_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1435,9 +1341,8 @@ def get_function_blocks_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionBlocksResponse", + '200': "BaseResponseCalleesCallerFunctionsResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1451,7 +1356,7 @@ def get_function_blocks_with_http_info( @validate_call - def get_function_blocks_without_preload_content( + def get_function_callees_callers_without_preload_content( self, function_id: StrictInt, _request_timeout: Union[ @@ -1467,9 +1372,8 @@ def get_function_blocks_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get disassembly blocks related to the function + """(Deprecated) Get list of functions that call or are called by the specified function - Get disassembly blocks related to the function :param function_id: (required) :type function_id: int @@ -1494,9 +1398,9 @@ def get_function_blocks_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/blocks is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_blocks_serialize( + _param = self._get_function_callees_callers_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1505,9 +1409,8 @@ def get_function_blocks_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionBlocksResponse", + '200': "BaseResponseCalleesCallerFunctionsResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1516,7 +1419,7 @@ def get_function_blocks_without_preload_content( return response_data.response - def _get_function_blocks_serialize( + def _get_function_callees_callers_serialize( self, function_id, _request_auth, @@ -1565,7 +1468,7 @@ def _get_function_blocks_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/blocks', + resource_path='/v2/functions/{function_id}/callees_callers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1582,7 +1485,7 @@ def _get_function_blocks_serialize( @validate_call - def get_function_blocks_0( + def get_function_callees_callers_0( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -1597,10 +1500,10 @@ def get_function_blocks_0( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DisassemblyOutputBody: - """Get function disassembly + ) -> CallEdgesOutputBody: + """Get callees and callers for a function - Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -1626,7 +1529,7 @@ def get_function_blocks_0( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_blocks_0_serialize( + _param = self._get_function_callees_callers_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1635,10 +1538,9 @@ def get_function_blocks_0( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DisassemblyOutputBody", + '200': "CallEdgesOutputBody", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -1654,7 +1556,7 @@ def get_function_blocks_0( @validate_call - def get_function_blocks_0_with_http_info( + def get_function_callees_callers_0_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -1669,10 +1571,10 @@ def get_function_blocks_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DisassemblyOutputBody]: - """Get function disassembly + ) -> ApiResponse[CallEdgesOutputBody]: + """Get callees and callers for a function - Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -1698,7 +1600,7 @@ def get_function_blocks_0_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_blocks_0_serialize( + _param = self._get_function_callees_callers_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1707,10 +1609,9 @@ def get_function_blocks_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DisassemblyOutputBody", + '200': "CallEdgesOutputBody", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -1726,7 +1627,7 @@ def get_function_blocks_0_with_http_info( @validate_call - def get_function_blocks_0_without_preload_content( + def get_function_callees_callers_0_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -1742,9 +1643,9 @@ def get_function_blocks_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function disassembly + """Get callees and callers for a function - Returns the function's disassembly metadata (JSON blob containing basic blocks + local variables) along with parameter and return-type info. A function that carries no disassembly (externals, thunks) returns 200 with the block fields omitted; disassembly that exists but cannot be read yet returns 409 ANALYSIS_NOT_READY. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready + Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -1770,7 +1671,7 @@ def get_function_blocks_0_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_blocks_0_serialize( + _param = self._get_function_callees_callers_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1779,10 +1680,9 @@ def get_function_blocks_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DisassemblyOutputBody", + '200': "CallEdgesOutputBody", '403': "APIError", '404': "APIError", - '409': "APIError", '422': "APIError", '500': "APIError", } @@ -1793,7 +1693,7 @@ def get_function_blocks_0_without_preload_content( return response_data.response - def _get_function_blocks_0_serialize( + def _get_function_callees_callers_0_serialize( self, function_id, _request_auth, @@ -1842,7 +1742,7 @@ def _get_function_blocks_0_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/blocks', + resource_path='/v3/functions/{function_id}/callees-callers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1859,9 +1759,9 @@ def _get_function_blocks_0_serialize( @validate_call - def get_function_callees_callers( + def get_function_callees_callers_bulk( self, - function_id: StrictInt, + function_ids: List[Optional[StrictInt]], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1874,12 +1774,12 @@ def get_function_callees_callers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseCalleesCallerFunctionsResponse: - """(Deprecated) Get list of functions that call or are called by the specified function + ) -> BaseResponseListCalleesCallerFunctionsResponse: + """(Deprecated) Get list of functions that call or are called for a list of functions - :param function_id: (required) - :type function_id: int + :param function_ids: (required) + :type function_ids: List[Optional[int]] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1901,10 +1801,10 @@ def get_function_callees_callers( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_serialize( - function_id=function_id, + _param = self._get_function_callees_callers_bulk_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1912,7 +1812,7 @@ def get_function_callees_callers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCalleesCallerFunctionsResponse", + '200': "BaseResponseListCalleesCallerFunctionsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1927,9 +1827,9 @@ def get_function_callees_callers( @validate_call - def get_function_callees_callers_with_http_info( + def get_function_callees_callers_bulk_with_http_info( self, - function_id: StrictInt, + function_ids: List[Optional[StrictInt]], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1942,12 +1842,12 @@ def get_function_callees_callers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseCalleesCallerFunctionsResponse]: - """(Deprecated) Get list of functions that call or are called by the specified function + ) -> ApiResponse[BaseResponseListCalleesCallerFunctionsResponse]: + """(Deprecated) Get list of functions that call or are called for a list of functions - :param function_id: (required) - :type function_id: int + :param function_ids: (required) + :type function_ids: List[Optional[int]] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1969,10 +1869,10 @@ def get_function_callees_callers_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_serialize( - function_id=function_id, + _param = self._get_function_callees_callers_bulk_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1980,7 +1880,7 @@ def get_function_callees_callers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCalleesCallerFunctionsResponse", + '200': "BaseResponseListCalleesCallerFunctionsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -1995,9 +1895,9 @@ def get_function_callees_callers_with_http_info( @validate_call - def get_function_callees_callers_without_preload_content( + def get_function_callees_callers_bulk_without_preload_content( self, - function_id: StrictInt, + function_ids: List[Optional[StrictInt]], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2011,11 +1911,11 @@ def get_function_callees_callers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get list of functions that call or are called by the specified function + """(Deprecated) Get list of functions that call or are called for a list of functions - :param function_id: (required) - :type function_id: int + :param function_ids: (required) + :type function_ids: List[Optional[int]] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2037,10 +1937,10 @@ def get_function_callees_callers_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/callees_callers is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_serialize( - function_id=function_id, + _param = self._get_function_callees_callers_bulk_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2048,7 +1948,7 @@ def get_function_callees_callers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseCalleesCallerFunctionsResponse", + '200': "BaseResponseListCalleesCallerFunctionsResponse", '422': "BaseResponse", } response_data = self.api_client.call_api( @@ -2058,9 +1958,9 @@ def get_function_callees_callers_without_preload_content( return response_data.response - def _get_function_callees_callers_serialize( + def _get_function_callees_callers_bulk_serialize( self, - function_id, + function_ids, _request_auth, _content_type, _headers, @@ -2070,6 +1970,7 @@ def _get_function_callees_callers_serialize( _host = None _collection_formats: Dict[str, str] = { + 'function_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -2082,9 +1983,11 @@ def _get_function_callees_callers_serialize( _body_params: Optional[bytes] = None # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id # process the query parameters + if function_ids is not None: + + _query_params.append(('function_ids', function_ids)) + # process the header parameters # process the form parameters # process the body parameter @@ -2107,7 +2010,7 @@ def _get_function_callees_callers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/callees_callers', + resource_path='/v2/functions/callees_callers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2124,9 +2027,9 @@ def _get_function_callees_callers_serialize( @validate_call - def get_function_callees_callers_0( + def get_function_capabilities( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2139,12 +2042,11 @@ def get_function_callees_callers_0( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CallEdgesOutputBody: - """Get callees and callers for a function + ) -> BaseResponseFunctionCapabilityResponse: + """(Deprecated) Retrieve a functions capabilities - Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2167,8 +2069,9 @@ def get_function_callees_callers_0( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_0_serialize( + _param = self._get_function_capabilities_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2177,11 +2080,9 @@ def get_function_callees_callers_0( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2195,9 +2096,9 @@ def get_function_callees_callers_0( @validate_call - def get_function_callees_callers_0_with_http_info( + def get_function_capabilities_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2210,12 +2111,11 @@ def get_function_callees_callers_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CallEdgesOutputBody]: - """Get callees and callers for a function + ) -> ApiResponse[BaseResponseFunctionCapabilityResponse]: + """(Deprecated) Retrieve a functions capabilities - Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2238,8 +2138,9 @@ def get_function_callees_callers_0_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_0_serialize( + _param = self._get_function_capabilities_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2248,11 +2149,9 @@ def get_function_callees_callers_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2266,9 +2165,9 @@ def get_function_callees_callers_0_with_http_info( @validate_call - def get_function_callees_callers_0_without_preload_content( + def get_function_capabilities_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_id: StrictInt, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2282,11 +2181,10 @@ def get_function_callees_callers_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get callees and callers for a function + """(Deprecated) Retrieve a functions capabilities - Returns both the outgoing call edges (callees) and incoming call edges (callers) for a single function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: Function ID (required) + :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -2309,8 +2207,9 @@ def get_function_callees_callers_0_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_0_serialize( + _param = self._get_function_capabilities_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2319,11 +2218,9 @@ def get_function_callees_callers_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", - '403': "APIError", - '404': "APIError", - '422': "APIError", - '500': "APIError", + '200': "BaseResponseFunctionCapabilityResponse", + '422': "BaseResponse", + '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2332,7 +2229,7 @@ def get_function_callees_callers_0_without_preload_content( return response_data.response - def _get_function_callees_callers_0_serialize( + def _get_function_capabilities_serialize( self, function_id, _request_auth, @@ -2381,7 +2278,7 @@ def _get_function_callees_callers_0_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/callees-callers', + resource_path='/v2/functions/{function_id}/capabilities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2398,9 +2295,9 @@ def _get_function_callees_callers_0_serialize( @validate_call - def get_function_callees_callers_bulk( + def get_function_capabilities_0( self, - function_ids: List[Optional[StrictInt]], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2413,12 +2310,13 @@ def get_function_callees_callers_bulk( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListCalleesCallerFunctionsResponse: - """(Deprecated) Get list of functions that call or are called for a list of functions + ) -> CapabilitiesOutputBody: + """Get capabilities for a function + Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_ids: (required) - :type function_ids: List[Optional[int]] + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2440,10 +2338,9 @@ def get_function_callees_callers_bulk( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_bulk_serialize( - function_ids=function_ids, + _param = self._get_function_capabilities_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2451,8 +2348,11 @@ def get_function_callees_callers_bulk( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCalleesCallerFunctionsResponse", - '422': "BaseResponse", + '200': "CapabilitiesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2466,9 +2366,9 @@ def get_function_callees_callers_bulk( @validate_call - def get_function_callees_callers_bulk_with_http_info( + def get_function_capabilities_0_with_http_info( self, - function_ids: List[Optional[StrictInt]], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2481,12 +2381,13 @@ def get_function_callees_callers_bulk_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListCalleesCallerFunctionsResponse]: - """(Deprecated) Get list of functions that call or are called for a list of functions + ) -> ApiResponse[CapabilitiesOutputBody]: + """Get capabilities for a function + Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_ids: (required) - :type function_ids: List[Optional[int]] + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2508,10 +2409,9 @@ def get_function_callees_callers_bulk_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_bulk_serialize( - function_ids=function_ids, + _param = self._get_function_capabilities_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2519,8 +2419,11 @@ def get_function_callees_callers_bulk_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCalleesCallerFunctionsResponse", - '422': "BaseResponse", + '200': "CapabilitiesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2534,9 +2437,9 @@ def get_function_callees_callers_bulk_with_http_info( @validate_call - def get_function_callees_callers_bulk_without_preload_content( + def get_function_capabilities_0_without_preload_content( self, - function_ids: List[Optional[StrictInt]], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2550,11 +2453,12 @@ def get_function_callees_callers_bulk_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get list of functions that call or are called for a list of functions + """Get capabilities for a function + Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_ids: (required) - :type function_ids: List[Optional[int]] + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2576,10 +2480,9 @@ def get_function_callees_callers_bulk_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/callees_callers is deprecated.", DeprecationWarning) - _param = self._get_function_callees_callers_bulk_serialize( - function_ids=function_ids, + _param = self._get_function_capabilities_0_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2587,8 +2490,11 @@ def get_function_callees_callers_bulk_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCalleesCallerFunctionsResponse", - '422': "BaseResponse", + '200': "CapabilitiesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -2597,9 +2503,9 @@ def get_function_callees_callers_bulk_without_preload_content( return response_data.response - def _get_function_callees_callers_bulk_serialize( + def _get_function_capabilities_0_serialize( self, - function_ids, + function_id, _request_auth, _content_type, _headers, @@ -2609,7 +2515,6 @@ def _get_function_callees_callers_bulk_serialize( _host = None _collection_formats: Dict[str, str] = { - 'function_ids': 'multi', } _path_params: Dict[str, str] = {} @@ -2622,11 +2527,9 @@ def _get_function_callees_callers_bulk_serialize( _body_params: Optional[bytes] = None # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id # process the query parameters - if function_ids is not None: - - _query_params.append(('function_ids', function_ids)) - # process the header parameters # process the form parameters # process the body parameter @@ -2649,7 +2552,7 @@ def _get_function_callees_callers_bulk_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/callees_callers', + resource_path='/v3/functions/{function_id}/capabilities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2666,7 +2569,7 @@ def _get_function_callees_callers_bulk_serialize( @validate_call - def get_function_capabilities( + def get_function_details( self, function_id: StrictInt, _request_timeout: Union[ @@ -2681,8 +2584,8 @@ def get_function_capabilities( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseFunctionCapabilityResponse: - """(Deprecated) Retrieve a functions capabilities + ) -> BaseResponseFunctionsDetailResponse: + """(Deprecated) Get function details :param function_id: (required) @@ -2708,9 +2611,9 @@ def get_function_capabilities( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_capabilities_serialize( + _param = self._get_function_details_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2719,9 +2622,8 @@ def get_function_capabilities( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionCapabilityResponse", + '200': "BaseResponseFunctionsDetailResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2735,7 +2637,7 @@ def get_function_capabilities( @validate_call - def get_function_capabilities_with_http_info( + def get_function_details_with_http_info( self, function_id: StrictInt, _request_timeout: Union[ @@ -2750,8 +2652,8 @@ def get_function_capabilities_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseFunctionCapabilityResponse]: - """(Deprecated) Retrieve a functions capabilities + ) -> ApiResponse[BaseResponseFunctionsDetailResponse]: + """(Deprecated) Get function details :param function_id: (required) @@ -2777,9 +2679,9 @@ def get_function_capabilities_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_capabilities_serialize( + _param = self._get_function_details_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2788,9 +2690,8 @@ def get_function_capabilities_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionCapabilityResponse", + '200': "BaseResponseFunctionsDetailResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2804,7 +2705,7 @@ def get_function_capabilities_with_http_info( @validate_call - def get_function_capabilities_without_preload_content( + def get_function_details_without_preload_content( self, function_id: StrictInt, _request_timeout: Union[ @@ -2820,7 +2721,7 @@ def get_function_capabilities_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Retrieve a functions capabilities + """(Deprecated) Get function details :param function_id: (required) @@ -2846,9 +2747,9 @@ def get_function_capabilities_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/capabilities is deprecated.", DeprecationWarning) + warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_capabilities_serialize( + _param = self._get_function_details_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2857,9 +2758,8 @@ def get_function_capabilities_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionCapabilityResponse", + '200': "BaseResponseFunctionsDetailResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -2868,7 +2768,7 @@ def get_function_capabilities_without_preload_content( return response_data.response - def _get_function_capabilities_serialize( + def _get_function_details_serialize( self, function_id, _request_auth, @@ -2917,7 +2817,7 @@ def _get_function_capabilities_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/capabilities', + resource_path='/v2/functions/{function_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2934,7 +2834,7 @@ def _get_function_capabilities_serialize( @validate_call - def get_function_capabilities_0( + def get_function_details_0( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -2949,10 +2849,10 @@ def get_function_capabilities_0( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CapabilitiesOutputBody: - """Get capabilities for a function + ) -> FunctionDetailsOutputBody: + """Get function details - Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -2978,7 +2878,7 @@ def get_function_capabilities_0( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_capabilities_0_serialize( + _param = self._get_function_details_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2987,7 +2887,7 @@ def get_function_capabilities_0( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CapabilitiesOutputBody", + '200': "FunctionDetailsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3005,7 +2905,7 @@ def get_function_capabilities_0( @validate_call - def get_function_capabilities_0_with_http_info( + def get_function_details_0_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3020,10 +2920,10 @@ def get_function_capabilities_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CapabilitiesOutputBody]: - """Get capabilities for a function + ) -> ApiResponse[FunctionDetailsOutputBody]: + """Get function details - Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3049,7 +2949,7 @@ def get_function_capabilities_0_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_capabilities_0_serialize( + _param = self._get_function_details_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3058,7 +2958,7 @@ def get_function_capabilities_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CapabilitiesOutputBody", + '200': "FunctionDetailsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3076,7 +2976,7 @@ def get_function_capabilities_0_with_http_info( @validate_call - def get_function_capabilities_0_without_preload_content( + def get_function_details_0_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ @@ -3092,9 +2992,9 @@ def get_function_capabilities_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get capabilities for a function + """Get function details - Returns the capability findings (CAPA-style behaviour matches) associated with the given function. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param function_id: Function ID (required) :type function_id: int @@ -3120,7 +3020,7 @@ def get_function_capabilities_0_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_capabilities_0_serialize( + _param = self._get_function_details_0_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3129,7 +3029,7 @@ def get_function_capabilities_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CapabilitiesOutputBody", + '200': "FunctionDetailsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3142,7 +3042,7 @@ def get_function_capabilities_0_without_preload_content( return response_data.response - def _get_function_capabilities_0_serialize( + def _get_function_details_0_serialize( self, function_id, _request_auth, @@ -3191,7 +3091,7 @@ def _get_function_capabilities_0_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/capabilities', + resource_path='/v3/functions/{function_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3208,9 +3108,9 @@ def _get_function_capabilities_0_serialize( @validate_call - def get_function_details( + def get_function_indirect_call_sites( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3223,11 +3123,12 @@ def get_function_details( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseFunctionsDetailResponse: - """(Deprecated) Get function details + ) -> IndirectCallSitesOutputBody: + """Get indirect call sites for a function + Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3250,9 +3151,8 @@ def get_function_details( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_details_serialize( + _param = self._get_function_indirect_call_sites_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3261,8 +3161,11 @@ def get_function_details( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionsDetailResponse", - '422': "BaseResponse", + '200': "IndirectCallSitesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3276,9 +3179,9 @@ def get_function_details( @validate_call - def get_function_details_with_http_info( + def get_function_indirect_call_sites_with_http_info( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3291,11 +3194,12 @@ def get_function_details_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseFunctionsDetailResponse]: - """(Deprecated) Get function details + ) -> ApiResponse[IndirectCallSitesOutputBody]: + """Get indirect call sites for a function + Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3318,9 +3222,8 @@ def get_function_details_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_details_serialize( + _param = self._get_function_indirect_call_sites_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3329,8 +3232,11 @@ def get_function_details_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionsDetailResponse", - '422': "BaseResponse", + '200': "IndirectCallSitesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3344,9 +3250,9 @@ def get_function_details_with_http_info( @validate_call - def get_function_details_without_preload_content( + def get_function_indirect_call_sites_without_preload_content( self, - function_id: StrictInt, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3360,10 +3266,11 @@ def get_function_details_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """(Deprecated) Get function details + """Get indirect call sites for a function + Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param function_id: (required) + :param function_id: Function ID (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -3386,9 +3293,8 @@ def get_function_details_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id} is deprecated.", DeprecationWarning) - _param = self._get_function_details_serialize( + _param = self._get_function_indirect_call_sites_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3397,8 +3303,11 @@ def get_function_details_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionsDetailResponse", - '422': "BaseResponse", + '200': "IndirectCallSitesOutputBody", + '403': "APIError", + '404': "APIError", + '422': "APIError", + '500': "APIError", } response_data = self.api_client.call_api( *_param, @@ -3407,7 +3316,7 @@ def get_function_details_without_preload_content( return response_data.response - def _get_function_details_serialize( + def _get_function_indirect_call_sites_serialize( self, function_id, _request_auth, @@ -3456,7 +3365,7 @@ def _get_function_details_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}', + resource_path='/v3/functions/{function_id}/indirect-call-sites', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3473,9 +3382,12 @@ def _get_function_details_serialize( @validate_call - def get_function_details_0( + def get_function_strings( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3488,13 +3400,19 @@ def get_function_details_0( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FunctionDetailsOutputBody: - """Get function details + ) -> ListFunctionStringsOutputBody: + """List strings for a function. - Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param function_id: Function ID (required) :type function_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3517,8 +3435,11 @@ def get_function_details_0( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_details_0_serialize( + _param = self._get_function_strings_serialize( function_id=function_id, + page=page, + page_size=page_size, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3526,7 +3447,7 @@ def get_function_details_0( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FunctionDetailsOutputBody", + '200': "ListFunctionStringsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3544,9 +3465,12 @@ def get_function_details_0( @validate_call - def get_function_details_0_with_http_info( + def get_function_strings_with_http_info( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3559,13 +3483,19 @@ def get_function_details_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FunctionDetailsOutputBody]: - """Get function details + ) -> ApiResponse[ListFunctionStringsOutputBody]: + """List strings for a function. - Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param function_id: Function ID (required) :type function_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3588,8 +3518,11 @@ def get_function_details_0_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_details_0_serialize( + _param = self._get_function_strings_serialize( function_id=function_id, + page=page, + page_size=page_size, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3597,7 +3530,7 @@ def get_function_details_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FunctionDetailsOutputBody", + '200': "ListFunctionStringsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3615,9 +3548,12 @@ def get_function_details_0_with_http_info( @validate_call - def get_function_details_0_without_preload_content( + def get_function_strings_without_preload_content( self, function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, + page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, + search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3631,12 +3567,18 @@ def get_function_details_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function details + """List strings for a function. - Returns metadata for a single function — name, virtual address, size, debug status, binary it belongs to. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied :param function_id: Function ID (required) :type function_id: int + :param page: Page number (1-indexed). + :type page: int + :param page_size: Number of results per page. + :type page_size: int + :param search: Filter by string value (case-insensitive substring match). + :type search: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3659,8 +3601,11 @@ def get_function_details_0_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_details_0_serialize( + _param = self._get_function_strings_serialize( function_id=function_id, + page=page, + page_size=page_size, + search=search, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3668,7 +3613,7 @@ def get_function_details_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FunctionDetailsOutputBody", + '200': "ListFunctionStringsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3681,9 +3626,12 @@ def get_function_details_0_without_preload_content( return response_data.response - def _get_function_details_0_serialize( + def _get_function_strings_serialize( self, function_id, + page, + page_size, + search, _request_auth, _content_type, _headers, @@ -3708,6 +3656,18 @@ def _get_function_details_0_serialize( if function_id is not None: _path_params['function_id'] = function_id # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if page_size is not None: + + _query_params.append(('page_size', page_size)) + + if search is not None: + + _query_params.append(('search', search)) + # process the header parameters # process the form parameters # process the body parameter @@ -3730,7 +3690,7 @@ def _get_function_details_0_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}', + resource_path='/v3/functions/{function_id}/strings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3747,9 +3707,9 @@ def _get_function_details_0_serialize( @validate_call - def get_function_indirect_call_sites( + def get_functions_callees_callers( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3762,13 +3722,13 @@ def get_function_indirect_call_sites( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndirectCallSitesOutputBody: - """Get indirect call sites for a function + ) -> CallEdgesOutputBody: + """Get callees and callers for many functions - Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: Function ID (required) - :type function_id: int + :param function_ids: Function IDs to fetch edges for. (required) + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3791,8 +3751,8 @@ def get_function_indirect_call_sites( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_indirect_call_sites_serialize( - function_id=function_id, + _param = self._get_functions_callees_callers_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3800,7 +3760,8 @@ def get_function_indirect_call_sites( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndirectCallSitesOutputBody", + '200': "CallEdgesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3818,9 +3779,9 @@ def get_function_indirect_call_sites( @validate_call - def get_function_indirect_call_sites_with_http_info( + def get_functions_callees_callers_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3833,13 +3794,13 @@ def get_function_indirect_call_sites_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndirectCallSitesOutputBody]: - """Get indirect call sites for a function + ) -> ApiResponse[CallEdgesOutputBody]: + """Get callees and callers for many functions - Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: Function ID (required) - :type function_id: int + :param function_ids: Function IDs to fetch edges for. (required) + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3862,8 +3823,8 @@ def get_function_indirect_call_sites_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_indirect_call_sites_serialize( - function_id=function_id, + _param = self._get_functions_callees_callers_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3871,7 +3832,8 @@ def get_function_indirect_call_sites_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndirectCallSitesOutputBody", + '200': "CallEdgesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3889,9 +3851,9 @@ def get_function_indirect_call_sites_with_http_info( @validate_call - def get_function_indirect_call_sites_without_preload_content( + def get_functions_callees_callers_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3905,12 +3867,12 @@ def get_function_indirect_call_sites_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get indirect call sites for a function + """Get callees and callers for many functions - Returns the function's indirect call instructions with their resolved call target. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: Function ID (required) - :type function_id: int + :param function_ids: Function IDs to fetch edges for. (required) + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3933,8 +3895,8 @@ def get_function_indirect_call_sites_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_indirect_call_sites_serialize( - function_id=function_id, + _param = self._get_functions_callees_callers_serialize( + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3942,7 +3904,8 @@ def get_function_indirect_call_sites_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndirectCallSitesOutputBody", + '200': "CallEdgesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -3955,9 +3918,9 @@ def get_function_indirect_call_sites_without_preload_content( return response_data.response - def _get_function_indirect_call_sites_serialize( + def _get_functions_callees_callers_serialize( self, - function_id, + function_ids, _request_auth, _content_type, _headers, @@ -3967,6 +3930,7 @@ def _get_function_indirect_call_sites_serialize( _host = None _collection_formats: Dict[str, str] = { + 'function_ids': 'csv', } _path_params: Dict[str, str] = {} @@ -3979,9 +3943,11 @@ def _get_function_indirect_call_sites_serialize( _body_params: Optional[bytes] = None # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id # process the query parameters + if function_ids is not None: + + _query_params.append(('function_ids', function_ids)) + # process the header parameters # process the form parameters # process the body parameter @@ -4004,7 +3970,7 @@ def _get_function_indirect_call_sites_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/indirect-call-sites', + resource_path='/v3/functions/callees-callers', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4021,12 +3987,10 @@ def _get_function_indirect_call_sites_serialize( @validate_call - def get_function_strings( + def get_functions_matches( self, - function_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4039,338 +4003,15 @@ def get_function_strings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseFunctionStringsResponse: - """(Deprecated) Get string information found in the function + ) -> GetMatchesOutputBody: + """Get function-matching results for an explicit set of functions - Get string information found in the function + Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: (required) - :type function_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) - - _param = self._get_function_strings_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionStringsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_function_strings_with_http_info( - self, - function_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseFunctionStringsResponse]: - """(Deprecated) Get string information found in the function - - Get string information found in the function - - :param function_id: (required) - :type function_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) - - _param = self._get_function_strings_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionStringsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_function_strings_without_preload_content( - self, - function_id: StrictInt, - page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None, - page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None, - search: Annotated[Optional[StrictStr], Field(description="Search is applied to string value")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """(Deprecated) Get string information found in the function - - Get string information found in the function - - :param function_id: (required) - :type function_id: int - :param page: The page number to retrieve. - :type page: int - :param page_size: Number of items per page. - :type page_size: int - :param search: Search is applied to string value - :type search: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - warnings.warn("GET /v2/functions/{function_id}/strings is deprecated.", DeprecationWarning) - - _param = self._get_function_strings_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionStringsResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_function_strings_serialize( - self, - function_id, - page, - page_size, - search, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: - - _query_params.append(('page_size', page_size)) - - if search is not None: - - _query_params.append(('search', search)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey', - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/functions/{function_id}/strings', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_function_strings_0( - self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListFunctionStringsOutputBody: - """List strings for a function. - - Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - - :param function_id: Function ID (required) - :type function_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4393,11 +4034,9 @@ def get_function_strings_0( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_strings_0_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, + _param = self._get_functions_matches_serialize( + match_id=match_id, + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4405,7 +4044,8 @@ def get_function_strings_0( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionStringsOutputBody", + '200': "GetMatchesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4423,12 +4063,10 @@ def get_function_strings_0( @validate_call - def get_function_strings_0_with_http_info( + def get_functions_matches_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4441,19 +4079,15 @@ def get_function_strings_0_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListFunctionStringsOutputBody]: - """List strings for a function. + ) -> ApiResponse[GetMatchesOutputBody]: + """Get function-matching results for an explicit set of functions - Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: Function ID (required) - :type function_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4476,11 +4110,9 @@ def get_function_strings_0_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_strings_0_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, + _param = self._get_functions_matches_serialize( + match_id=match_id, + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4488,7 +4120,8 @@ def get_function_strings_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionStringsOutputBody", + '200': "GetMatchesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4506,12 +4139,10 @@ def get_function_strings_0_with_http_info( @validate_call - def get_function_strings_0_without_preload_content( + def get_functions_matches_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Page number (1-indexed).")] = None, - page_size: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Number of results per page.")] = None, - search: Annotated[Optional[Annotated[str, Field(strict=True, max_length=255)]], Field(description="Filter by string value (case-insensitive substring match).")] = None, + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4525,18 +4156,14 @@ def get_function_strings_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List strings for a function. + """Get function-matching results for an explicit set of functions - Returns the strings discovered in a function. Supports value search and pagination. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_id: Function ID (required) - :type function_id: int - :param page: Page number (1-indexed). - :type page: int - :param page_size: Number of results per page. - :type page_size: int - :param search: Filter by string value (case-insensitive substring match). - :type search: str + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. + :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4559,11 +4186,9 @@ def get_function_strings_0_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_strings_0_serialize( - function_id=function_id, - page=page, - page_size=page_size, - search=search, + _param = self._get_functions_matches_serialize( + match_id=match_id, + function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -4571,7 +4196,8 @@ def get_function_strings_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionStringsOutputBody", + '200': "GetMatchesOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -4584,12 +4210,10 @@ def get_function_strings_0_without_preload_content( return response_data.response - def _get_function_strings_0_serialize( + def _get_functions_matches_serialize( self, - function_id, - page, - page_size, - search, + match_id, + function_ids, _request_auth, _content_type, _headers, @@ -4599,6 +4223,7 @@ def _get_function_strings_0_serialize( _host = None _collection_formats: Dict[str, str] = { + 'function_ids': 'csv', } _path_params: Dict[str, str] = {} @@ -4611,20 +4236,14 @@ def _get_function_strings_0_serialize( _body_params: Optional[bytes] = None # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if page_size is not None: + if match_id is not None: - _query_params.append(('page_size', page_size)) + _query_params.append(('match_id', match_id)) - if search is not None: + if function_ids is not None: - _query_params.append(('search', search)) + _query_params.append(('function_ids', function_ids)) # process the header parameters # process the form parameters @@ -4648,7 +4267,7 @@ def _get_function_strings_0_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/strings', + resource_path='/v3/functions/matches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4665,9 +4284,10 @@ def _get_function_strings_0_serialize( @validate_call - def get_functions_callees_callers( + def get_functions_matching_status( self, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4680,12 +4300,14 @@ def get_functions_callees_callers( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CallEdgesOutputBody: - """Get callees and callers for many functions + ) -> GetMatchesStatusOutputBody: + """Get function-matching status for an explicit set of functions - Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_ids: Function IDs to fetch edges for. (required) + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4709,7 +4331,8 @@ def get_functions_callees_callers( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_callees_callers_serialize( + _param = self._get_functions_matching_status_serialize( + match_id=match_id, function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, @@ -4718,7 +4341,7 @@ def get_functions_callees_callers( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", + '200': "GetMatchesStatusOutputBody", '400': "APIError", '403': "APIError", '404': "APIError", @@ -4737,9 +4360,10 @@ def get_functions_callees_callers( @validate_call - def get_functions_callees_callers_with_http_info( + def get_functions_matching_status_with_http_info( self, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4752,12 +4376,14 @@ def get_functions_callees_callers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CallEdgesOutputBody]: - """Get callees and callers for many functions + ) -> ApiResponse[GetMatchesStatusOutputBody]: + """Get function-matching status for an explicit set of functions - Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_ids: Function IDs to fetch edges for. (required) + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4781,7 +4407,8 @@ def get_functions_callees_callers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_callees_callers_serialize( + _param = self._get_functions_matching_status_serialize( + match_id=match_id, function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, @@ -4790,7 +4417,7 @@ def get_functions_callees_callers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", + '200': "GetMatchesStatusOutputBody", '400': "APIError", '403': "APIError", '404': "APIError", @@ -4809,9 +4436,10 @@ def get_functions_callees_callers_with_http_info( @validate_call - def get_functions_callees_callers_without_preload_content( + def get_functions_matching_status_without_preload_content( self, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1, max_length=100)]], Field(description="Function IDs to fetch edges for.")], + match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, + function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4825,11 +4453,13 @@ def get_functions_callees_callers_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get callees and callers for many functions + """Get function-matching status for an explicit set of functions - Bulk variant — pass `function_ids` as a query parameter (comma-separated or repeated). Caller must have access to every supplied function or the whole request is rejected. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param function_ids: Function IDs to fetch edges for. (required) + :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. + :type match_id: str + :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. :type function_ids: List[int] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -4853,7 +4483,8 @@ def get_functions_callees_callers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_callees_callers_serialize( + _param = self._get_functions_matching_status_serialize( + match_id=match_id, function_ids=function_ids, _request_auth=_request_auth, _content_type=_content_type, @@ -4862,7 +4493,7 @@ def get_functions_callees_callers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CallEdgesOutputBody", + '200': "GetMatchesStatusOutputBody", '400': "APIError", '403': "APIError", '404': "APIError", @@ -4876,8 +4507,9 @@ def get_functions_callees_callers_without_preload_content( return response_data.response - def _get_functions_callees_callers_serialize( + def _get_functions_matching_status_serialize( self, + match_id, function_ids, _request_auth, _content_type, @@ -4902,6 +4534,10 @@ def _get_functions_callees_callers_serialize( # process the path parameters # process the query parameters + if match_id is not None: + + _query_params.append(('match_id', match_id)) + if function_ids is not None: _query_params.append(('function_ids', function_ids)) @@ -4928,7 +4564,7 @@ def _get_functions_callees_callers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/callees-callers', + resource_path='/v3/functions/matches/status', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4945,10 +4581,10 @@ def _get_functions_callees_callers_serialize( @validate_call - def get_functions_matches( + def get_imported_function( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -4961,15 +4597,15 @@ def get_functions_matches( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetMatchesOutputBody: - """Get function-matching results for an explicit set of functions - - Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + ) -> ImportedFunctionDetailOutputBody: + """Get an imported function with its callers - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param imported_function_id: Imported function ID (required) + :type imported_function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -4992,9 +4628,9 @@ def get_functions_matches( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matches_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._get_imported_function_serialize( + analysis_id=analysis_id, + imported_function_id=imported_function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5002,8 +4638,7 @@ def get_functions_matches( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesOutputBody", - '400': "APIError", + '200': "ImportedFunctionDetailOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5021,10 +4656,10 @@ def get_functions_matches( @validate_call - def get_functions_matches_with_http_info( + def get_imported_function_with_http_info( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5037,15 +4672,15 @@ def get_functions_matches_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetMatchesOutputBody]: - """Get function-matching results for an explicit set of functions + ) -> ApiResponse[ImportedFunctionDetailOutputBody]: + """Get an imported function with its callers - Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param imported_function_id: Imported function ID (required) + :type imported_function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5068,9 +4703,9 @@ def get_functions_matches_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matches_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._get_imported_function_serialize( + analysis_id=analysis_id, + imported_function_id=imported_function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5078,8 +4713,7 @@ def get_functions_matches_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesOutputBody", - '400': "APIError", + '200': "ImportedFunctionDetailOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5097,10 +4731,10 @@ def get_functions_matches_with_http_info( @validate_call - def get_functions_matches_without_preload_content( + def get_imported_function_without_preload_content( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5114,14 +4748,14 @@ def get_functions_matches_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function-matching results for an explicit set of functions + """Get an imported function with its callers - Returns the matches blob when the matching workflow has completed. While the workflow is in progress this endpoint returns the current status with no matches; use /matches/status to poll progress. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param imported_function_id: Imported function ID (required) + :type imported_function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5144,9 +4778,9 @@ def get_functions_matches_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matches_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._get_imported_function_serialize( + analysis_id=analysis_id, + imported_function_id=imported_function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5154,8 +4788,7 @@ def get_functions_matches_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesOutputBody", - '400': "APIError", + '200': "ImportedFunctionDetailOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5168,10 +4801,10 @@ def get_functions_matches_without_preload_content( return response_data.response - def _get_functions_matches_serialize( + def _get_imported_function_serialize( self, - match_id, - function_ids, + analysis_id, + imported_function_id, _request_auth, _content_type, _headers, @@ -5181,7 +4814,6 @@ def _get_functions_matches_serialize( _host = None _collection_formats: Dict[str, str] = { - 'function_ids': 'csv', } _path_params: Dict[str, str] = {} @@ -5194,15 +4826,11 @@ def _get_functions_matches_serialize( _body_params: Optional[bytes] = None # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + if imported_function_id is not None: + _path_params['imported_function_id'] = imported_function_id # process the query parameters - if match_id is not None: - - _query_params.append(('match_id', match_id)) - - if function_ids is not None: - - _query_params.append(('function_ids', function_ids)) - # process the header parameters # process the form parameters # process the body parameter @@ -5225,7 +4853,7 @@ def _get_functions_matches_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/matches', + resource_path='/v3/analyses/{analysis_id}/imported-functions/{imported_function_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5242,10 +4870,11 @@ def _get_functions_matches_serialize( @validate_call - def get_functions_matching_status( + def list_analysis_functions( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5258,15 +4887,17 @@ def get_functions_matching_status( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetMatchesStatusOutputBody: - """Get function-matching status for an explicit set of functions + ) -> ListAnalysisFunctionsOutputBody: + """List functions in an analysis - Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5289,9 +4920,10 @@ def get_functions_matching_status( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matching_status_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._list_analysis_functions_serialize( + analysis_id=analysis_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5299,8 +4931,7 @@ def get_functions_matching_status( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesStatusOutputBody", - '400': "APIError", + '200': "ListAnalysisFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5318,10 +4949,11 @@ def get_functions_matching_status( @validate_call - def get_functions_matching_status_with_http_info( + def list_analysis_functions_with_http_info( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5334,15 +4966,17 @@ def get_functions_matching_status_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetMatchesStatusOutputBody]: - """Get function-matching status for an explicit set of functions + ) -> ApiResponse[ListAnalysisFunctionsOutputBody]: + """List functions in an analysis - Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5365,9 +4999,10 @@ def get_functions_matching_status_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matching_status_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._list_analysis_functions_serialize( + analysis_id=analysis_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5375,8 +5010,7 @@ def get_functions_matching_status_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesStatusOutputBody", - '400': "APIError", + '200': "ListAnalysisFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5394,10 +5028,11 @@ def get_functions_matching_status_with_http_info( @validate_call - def get_functions_matching_status_without_preload_content( + def list_analysis_functions_without_preload_content( self, - match_id: Annotated[Optional[StrictStr], Field(description="Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest.")] = None, - function_ids: Annotated[Optional[Annotated[List[StrictInt], Field(min_length=1)]], Field(description="Source function IDs whose matches to fetch. Required unless match_id is supplied.")] = None, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5411,14 +5046,16 @@ def get_functions_matching_status_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function-matching status for an explicit set of functions + """List functions in an analysis - Returns the matching workflow's current status for the supplied function IDs. Does not include the matches blob — use GET /matches for that. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param match_id: Opaque token from a start-matching response. When supplied, returns that specific run instead of the latest. - :type match_id: str - :param function_ids: Source function IDs whose matches to fetch. Required unless match_id is supplied. - :type function_ids: List[int] + :param analysis_id: Analysis ID (required) + :type analysis_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5441,9 +5078,10 @@ def get_functions_matching_status_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_functions_matching_status_serialize( - match_id=match_id, - function_ids=function_ids, + _param = self._list_analysis_functions_serialize( + analysis_id=analysis_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5451,8 +5089,7 @@ def get_functions_matching_status_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetMatchesStatusOutputBody", - '400': "APIError", + '200': "ListAnalysisFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5465,10 +5102,11 @@ def get_functions_matching_status_without_preload_content( return response_data.response - def _get_functions_matching_status_serialize( + def _list_analysis_functions_serialize( self, - match_id, - function_ids, + analysis_id, + offset, + limit, _request_auth, _content_type, _headers, @@ -5478,7 +5116,6 @@ def _get_functions_matching_status_serialize( _host = None _collection_formats: Dict[str, str] = { - 'function_ids': 'csv', } _path_params: Dict[str, str] = {} @@ -5491,14 +5128,16 @@ def _get_functions_matching_status_serialize( _body_params: Optional[bytes] = None # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id # process the query parameters - if match_id is not None: + if offset is not None: - _query_params.append(('match_id', match_id)) + _query_params.append(('offset', offset)) - if function_ids is not None: + if limit is not None: - _query_params.append(('function_ids', function_ids)) + _query_params.append(('limit', limit)) # process the header parameters # process the form parameters @@ -5522,7 +5161,7 @@ def _get_functions_matching_status_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/matches/status', + resource_path='/v3/analyses/{analysis_id}/functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5539,10 +5178,11 @@ def _get_functions_matching_status_serialize( @validate_call - def get_imported_function( + def list_imported_functions( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5555,15 +5195,17 @@ def get_imported_function( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ImportedFunctionDetailOutputBody: - """Get an imported function with its callers + ) -> ListImportedFunctionsOutputBody: + """List imported functions in an analysis - Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param imported_function_id: Imported function ID (required) - :type imported_function_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5586,9 +5228,10 @@ def get_imported_function( :return: Returns the result object. """ # noqa: E501 - _param = self._get_imported_function_serialize( + _param = self._list_imported_functions_serialize( analysis_id=analysis_id, - imported_function_id=imported_function_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5596,7 +5239,7 @@ def get_imported_function( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImportedFunctionDetailOutputBody", + '200': "ListImportedFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5614,10 +5257,11 @@ def get_imported_function( @validate_call - def get_imported_function_with_http_info( + def list_imported_functions_with_http_info( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5630,15 +5274,17 @@ def get_imported_function_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ImportedFunctionDetailOutputBody]: - """Get an imported function with its callers + ) -> ApiResponse[ListImportedFunctionsOutputBody]: + """List imported functions in an analysis - Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param imported_function_id: Imported function ID (required) - :type imported_function_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5661,9 +5307,10 @@ def get_imported_function_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_imported_function_serialize( + _param = self._list_imported_functions_serialize( analysis_id=analysis_id, - imported_function_id=imported_function_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5671,7 +5318,7 @@ def get_imported_function_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImportedFunctionDetailOutputBody", + '200': "ListImportedFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5689,10 +5336,11 @@ def get_imported_function_with_http_info( @validate_call - def get_imported_function_without_preload_content( + def list_imported_functions_without_preload_content( self, analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - imported_function_id: Annotated[int, Field(strict=True, ge=1, description="Imported function ID")], + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5706,14 +5354,16 @@ def get_imported_function_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get an imported function with its callers + """List imported functions in an analysis - Returns a single imported symbol plus the internal functions that call it, resolved via the import's PLT/stub addresses within the binary. Answers \"which functions call `free`?\" for binary navigation. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param analysis_id: Analysis ID (required) :type analysis_id: int - :param imported_function_id: Imported function ID (required) - :type imported_function_id: int + :param offset: Pagination offset. Defaults to 0. + :type offset: int + :param limit: Page size. Defaults to 100. + :type limit: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5736,9 +5386,10 @@ def get_imported_function_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_imported_function_serialize( + _param = self._list_imported_functions_serialize( analysis_id=analysis_id, - imported_function_id=imported_function_id, + offset=offset, + limit=limit, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5746,7 +5397,7 @@ def get_imported_function_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ImportedFunctionDetailOutputBody", + '200': "ListImportedFunctionsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5759,10 +5410,11 @@ def get_imported_function_without_preload_content( return response_data.response - def _get_imported_function_serialize( + def _list_imported_functions_serialize( self, analysis_id, - imported_function_id, + offset, + limit, _request_auth, _content_type, _headers, @@ -5786,9 +5438,15 @@ def _get_imported_function_serialize( # process the path parameters if analysis_id is not None: _path_params['analysis_id'] = analysis_id - if imported_function_id is not None: - _path_params['imported_function_id'] = imported_function_id # process the query parameters + if offset is not None: + + _query_params.append(('offset', offset)) + + if limit is not None: + + _query_params.append(('limit', limit)) + # process the header parameters # process the form parameters # process the body parameter @@ -5811,7 +5469,7 @@ def _get_imported_function_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/imported-functions/{imported_function_id}', + resource_path='/v3/analyses/{analysis_id}/imported-functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5828,11 +5486,9 @@ def _get_imported_function_serialize( @validate_call - def list_analysis_functions( + def start_functions_matching( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5845,17 +5501,13 @@ def list_analysis_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListAnalysisFunctionsOutputBody: - """List functions in an analysis + ) -> StartMatchingOutputBody: + """Start function matching for an explicit set of functions - Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param start_matching_for_functions_input_body: (required) + :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5878,10 +5530,8 @@ def list_analysis_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._list_analysis_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._start_functions_matching_serialize( + start_matching_for_functions_input_body=start_matching_for_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5889,7 +5539,8 @@ def list_analysis_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisFunctionsOutputBody", + '202': "StartMatchingOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5907,11 +5558,9 @@ def list_analysis_functions( @validate_call - def list_analysis_functions_with_http_info( + def start_functions_matching_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -5924,17 +5573,13 @@ def list_analysis_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListAnalysisFunctionsOutputBody]: - """List functions in an analysis + ) -> ApiResponse[StartMatchingOutputBody]: + """Start function matching for an explicit set of functions - Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param start_matching_for_functions_input_body: (required) + :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -5957,10 +5602,8 @@ def list_analysis_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_analysis_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._start_functions_matching_serialize( + start_matching_for_functions_input_body=start_matching_for_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -5968,7 +5611,8 @@ def list_analysis_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisFunctionsOutputBody", + '202': "StartMatchingOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -5986,11 +5630,9 @@ def list_analysis_functions_with_http_info( @validate_call - def list_analysis_functions_without_preload_content( + def start_functions_matching_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6004,16 +5646,12 @@ def list_analysis_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List functions in an analysis + """Start function matching for an explicit set of functions - Returns a paginated list of functions belonging to the analysis. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param start_matching_for_functions_input_body: (required) + :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6036,10 +5674,8 @@ def list_analysis_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_analysis_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._start_functions_matching_serialize( + start_matching_for_functions_input_body=start_matching_for_functions_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6047,7 +5683,8 @@ def list_analysis_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListAnalysisFunctionsOutputBody", + '202': "StartMatchingOutputBody", + '400': "APIError", '403': "APIError", '404': "APIError", '422': "APIError", @@ -6060,11 +5697,9 @@ def list_analysis_functions_without_preload_content( return response_data.response - def _list_analysis_functions_serialize( + def _start_functions_matching_serialize( self, - analysis_id, - offset, - limit, + start_matching_for_functions_input_body, _request_auth, _content_type, _headers, @@ -6086,20 +5721,12 @@ def _list_analysis_functions_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter + if start_matching_for_functions_input_body is not None: + _body_params = start_matching_for_functions_input_body # set the HTTP header `Accept` @@ -6110,6 +5737,19 @@ def _list_analysis_functions_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -6118,8 +5758,8 @@ def _list_analysis_functions_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/analyses/{analysis_id}/functions', + method='POST', + resource_path='/v3/functions/matches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6136,11 +5776,9 @@ def _list_analysis_functions_serialize( @validate_call - def list_imported_functions( + def v3_canonicalize_function_names( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + canonicalize_names_input_body: CanonicalizeNamesInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6153,17 +5791,13 @@ def list_imported_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListImportedFunctionsOutputBody: - """List imported functions in an analysis + ) -> CanonicalizeNamesOutputBody: + """Canonicalize a batch of function names - Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param canonicalize_names_input_body: (required) + :type canonicalize_names_input_body: CanonicalizeNamesInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6186,10 +5820,8 @@ def list_imported_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._list_imported_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._v3_canonicalize_function_names_serialize( + canonicalize_names_input_body=canonicalize_names_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6197,11 +5829,11 @@ def list_imported_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListImportedFunctionsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "CanonicalizeNamesOutputBody", + '400': "APIError", '422': "APIError", '500': "APIError", + '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6215,11 +5847,9 @@ def list_imported_functions( @validate_call - def list_imported_functions_with_http_info( + def v3_canonicalize_function_names_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + canonicalize_names_input_body: CanonicalizeNamesInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6232,17 +5862,13 @@ def list_imported_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListImportedFunctionsOutputBody]: - """List imported functions in an analysis + ) -> ApiResponse[CanonicalizeNamesOutputBody]: + """Canonicalize a batch of function names - Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param canonicalize_names_input_body: (required) + :type canonicalize_names_input_body: CanonicalizeNamesInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6265,10 +5891,8 @@ def list_imported_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._list_imported_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._v3_canonicalize_function_names_serialize( + canonicalize_names_input_body=canonicalize_names_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6276,11 +5900,11 @@ def list_imported_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListImportedFunctionsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "CanonicalizeNamesOutputBody", + '400': "APIError", '422': "APIError", '500': "APIError", + '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6294,11 +5918,9 @@ def list_imported_functions_with_http_info( @validate_call - def list_imported_functions_without_preload_content( + def v3_canonicalize_function_names_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset. Defaults to 0.")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=500, strict=True, ge=1)]], Field(description="Page size. Defaults to 100.")] = None, + canonicalize_names_input_body: CanonicalizeNamesInputBody, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6312,16 +5934,12 @@ def list_imported_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List imported functions in an analysis + """Canonicalize a batch of function names - Returns a paginated list of external/imported symbols (e.g. libc's `free`) linked by the analysis's binary. These are display-only: they carry no embeddings, cannot be renamed, and never participate in match/diff. `total_count` is the full population size, ignoring pagination. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable - :param analysis_id: Analysis ID (required) - :type analysis_id: int - :param offset: Pagination offset. Defaults to 0. - :type offset: int - :param limit: Page size. Defaults to 100. - :type limit: int + :param canonicalize_names_input_body: (required) + :type canonicalize_names_input_body: CanonicalizeNamesInputBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6344,10 +5962,8 @@ def list_imported_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._list_imported_functions_serialize( - analysis_id=analysis_id, - offset=offset, - limit=limit, + _param = self._v3_canonicalize_function_names_serialize( + canonicalize_names_input_body=canonicalize_names_input_body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6355,11 +5971,11 @@ def list_imported_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListImportedFunctionsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "CanonicalizeNamesOutputBody", + '400': "APIError", '422': "APIError", '500': "APIError", + '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6368,11 +5984,9 @@ def list_imported_functions_without_preload_content( return response_data.response - def _list_imported_functions_serialize( + def _v3_canonicalize_function_names_serialize( self, - analysis_id, - offset, - limit, + canonicalize_names_input_body, _request_auth, _content_type, _headers, @@ -6394,20 +6008,12 @@ def _list_imported_functions_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id # process the query parameters - if offset is not None: - - _query_params.append(('offset', offset)) - - if limit is not None: - - _query_params.append(('limit', limit)) - # process the header parameters # process the form parameters # process the body parameter + if canonicalize_names_input_body is not None: + _body_params = canonicalize_names_input_body # set the HTTP header `Accept` @@ -6418,6 +6024,19 @@ def _list_imported_functions_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -6426,8 +6045,8 @@ def _list_imported_functions_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/analyses/{analysis_id}/imported-functions', + method='POST', + resource_path='/v3/functions/canonical-names', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6444,9 +6063,9 @@ def _list_imported_functions_serialize( @validate_call - def start_functions_matching( + def v3_get_analysis_func_maps( self, - start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6459,13 +6078,13 @@ def start_functions_matching( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> StartMatchingOutputBody: - """Start function matching for an explicit set of functions + ) -> GetFunctionMapsOutputBody: + """Get function ID/address maps for an analysis - Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param start_matching_for_functions_input_body: (required) - :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6488,8 +6107,8 @@ def start_functions_matching( :return: Returns the result object. """ # noqa: E501 - _param = self._start_functions_matching_serialize( - start_matching_for_functions_input_body=start_matching_for_functions_input_body, + _param = self._v3_get_analysis_func_maps_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6497,8 +6116,7 @@ def start_functions_matching( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", + '200': "GetFunctionMapsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -6516,9 +6134,9 @@ def start_functions_matching( @validate_call - def start_functions_matching_with_http_info( + def v3_get_analysis_func_maps_with_http_info( self, - start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6531,13 +6149,13 @@ def start_functions_matching_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[StartMatchingOutputBody]: - """Start function matching for an explicit set of functions + ) -> ApiResponse[GetFunctionMapsOutputBody]: + """Get function ID/address maps for an analysis - Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param start_matching_for_functions_input_body: (required) - :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6560,8 +6178,8 @@ def start_functions_matching_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._start_functions_matching_serialize( - start_matching_for_functions_input_body=start_matching_for_functions_input_body, + _param = self._v3_get_analysis_func_maps_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6569,8 +6187,7 @@ def start_functions_matching_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", + '200': "GetFunctionMapsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -6588,9 +6205,9 @@ def start_functions_matching_with_http_info( @validate_call - def start_functions_matching_without_preload_content( + def v3_get_analysis_func_maps_without_preload_content( self, - start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody, + analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6604,12 +6221,12 @@ def start_functions_matching_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Start function matching for an explicit set of functions + """Get function ID/address maps for an analysis - Dispatches the function-matching workflow against the provided function IDs. Returns immediately. Poll the status endpoint for progress; fetch results from the matches endpoint when status=COMPLETED. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - :param start_matching_for_functions_input_body: (required) - :type start_matching_for_functions_input_body: StartMatchingForFunctionsInputBody + :param analysis_id: Analysis ID (required) + :type analysis_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6632,8 +6249,8 @@ def start_functions_matching_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._start_functions_matching_serialize( - start_matching_for_functions_input_body=start_matching_for_functions_input_body, + _param = self._v3_get_analysis_func_maps_serialize( + analysis_id=analysis_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6641,8 +6258,7 @@ def start_functions_matching_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '202': "StartMatchingOutputBody", - '400': "APIError", + '200': "GetFunctionMapsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -6655,9 +6271,9 @@ def start_functions_matching_without_preload_content( return response_data.response - def _start_functions_matching_serialize( + def _v3_get_analysis_func_maps_serialize( self, - start_matching_for_functions_input_body, + analysis_id, _request_auth, _content_type, _headers, @@ -6679,12 +6295,12 @@ def _start_functions_matching_serialize( _body_params: Optional[bytes] = None # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if start_matching_for_functions_input_body is not None: - _body_params = start_matching_for_functions_input_body # set the HTTP header `Accept` @@ -6695,19 +6311,6 @@ def _start_functions_matching_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -6716,8 +6319,8 @@ def _start_functions_matching_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/functions/matches', + method='GET', + resource_path='/v3/analyses/{analysis_id}/func-maps', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6734,9 +6337,10 @@ def _start_functions_matching_serialize( @validate_call - def v3_canonicalize_function_names( + def v3_get_function_feedback( self, - canonicalize_names_input_body: CanonicalizeNamesInputBody, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6749,13 +6353,15 @@ def v3_canonicalize_function_names( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CanonicalizeNamesOutputBody: - """Canonicalize a batch of function names + ) -> RecordedFeedback: + """Get the caller's feedback on a function. - Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param canonicalize_names_input_body: (required) - :type canonicalize_names_input_body: CanonicalizeNamesInputBody + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6778,8 +6384,9 @@ def v3_canonicalize_function_names( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_canonicalize_function_names_serialize( - canonicalize_names_input_body=canonicalize_names_input_body, + _param = self._v3_get_function_feedback_serialize( + function_id=function_id, + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6787,11 +6394,11 @@ def v3_canonicalize_function_names( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CanonicalizeNamesOutputBody", - '400': "APIError", + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", - '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6805,9 +6412,10 @@ def v3_canonicalize_function_names( @validate_call - def v3_canonicalize_function_names_with_http_info( + def v3_get_function_feedback_with_http_info( self, - canonicalize_names_input_body: CanonicalizeNamesInputBody, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6820,13 +6428,15 @@ def v3_canonicalize_function_names_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CanonicalizeNamesOutputBody]: - """Canonicalize a batch of function names + ) -> ApiResponse[RecordedFeedback]: + """Get the caller's feedback on a function. - Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param canonicalize_names_input_body: (required) - :type canonicalize_names_input_body: CanonicalizeNamesInputBody + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6849,8 +6459,9 @@ def v3_canonicalize_function_names_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_canonicalize_function_names_serialize( - canonicalize_names_input_body=canonicalize_names_input_body, + _param = self._v3_get_function_feedback_serialize( + function_id=function_id, + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6858,11 +6469,11 @@ def v3_canonicalize_function_names_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CanonicalizeNamesOutputBody", - '400': "APIError", + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", - '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6876,9 +6487,10 @@ def v3_canonicalize_function_names_with_http_info( @validate_call - def v3_canonicalize_function_names_without_preload_content( + def v3_get_function_feedback_without_preload_content( self, - canonicalize_names_input_body: CanonicalizeNamesInputBody, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -6892,12 +6504,14 @@ def v3_canonicalize_function_names_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Canonicalize a batch of function names + """Get the caller's feedback on a function. - Accepts up to 25 raw function names and returns their canonical forms in the same order. A name with no canonical form is returned unchanged. **Error codes:** - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request - `503` [`SERVICE_UNAVAILABLE`](/errors/SERVICE_UNAVAILABLE) — Service Unavailable + Returns the feedback the caller recorded for one kind of result on this function, or null fields when they have not recorded any. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param canonicalize_names_input_body: (required) - :type canonicalize_names_input_body: CanonicalizeNamesInputBody + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -6920,8 +6534,9 @@ def v3_canonicalize_function_names_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_canonicalize_function_names_serialize( - canonicalize_names_input_body=canonicalize_names_input_body, + _param = self._v3_get_function_feedback_serialize( + function_id=function_id, + type=type, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -6929,11 +6544,11 @@ def v3_canonicalize_function_names_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "CanonicalizeNamesOutputBody", - '400': "APIError", + '200': "RecordedFeedback", + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", - '503': "APIError", } response_data = self.api_client.call_api( *_param, @@ -6942,9 +6557,10 @@ def v3_canonicalize_function_names_without_preload_content( return response_data.response - def _v3_canonicalize_function_names_serialize( + def _v3_get_function_feedback_serialize( self, - canonicalize_names_input_body, + function_id, + type, _request_auth, _content_type, _headers, @@ -6966,12 +6582,14 @@ def _v3_canonicalize_function_names_serialize( _body_params: Optional[bytes] = None # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + if type is not None: + _path_params['type'] = type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if canonicalize_names_input_body is not None: - _body_params = canonicalize_names_input_body # set the HTTP header `Accept` @@ -6982,19 +6600,6 @@ def _v3_canonicalize_function_names_serialize( ] ) - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -7003,8 +6608,8 @@ def _v3_canonicalize_function_names_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v3/functions/canonical-names', + method='GET', + resource_path='/v3/functions/{function_id}/feedback/{type}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7021,9 +6626,9 @@ def _v3_canonicalize_function_names_serialize( @validate_call - def v3_get_analysis_func_maps( + def v3_list_function_globals( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7036,13 +6641,13 @@ def v3_get_analysis_func_maps( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetFunctionMapsOutputBody: - """Get function ID/address maps for an analysis + ) -> ListFunctionGlobalsOutputBody: + """List the global variables a function references. - Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7065,8 +6670,8 @@ def v3_get_analysis_func_maps( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_func_maps_serialize( - analysis_id=analysis_id, + _param = self._v3_list_function_globals_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7074,7 +6679,7 @@ def v3_get_analysis_func_maps( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFunctionMapsOutputBody", + '200': "ListFunctionGlobalsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7092,9 +6697,9 @@ def v3_get_analysis_func_maps( @validate_call - def v3_get_analysis_func_maps_with_http_info( + def v3_list_function_globals_with_http_info( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7107,13 +6712,13 @@ def v3_get_analysis_func_maps_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetFunctionMapsOutputBody]: - """Get function ID/address maps for an analysis + ) -> ApiResponse[ListFunctionGlobalsOutputBody]: + """List the global variables a function references. - Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7136,8 +6741,8 @@ def v3_get_analysis_func_maps_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_func_maps_serialize( - analysis_id=analysis_id, + _param = self._v3_list_function_globals_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7145,7 +6750,7 @@ def v3_get_analysis_func_maps_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFunctionMapsOutputBody", + '200': "ListFunctionGlobalsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7163,9 +6768,9 @@ def v3_get_analysis_func_maps_with_http_info( @validate_call - def v3_get_analysis_func_maps_without_preload_content( + def v3_list_function_globals_without_preload_content( self, - analysis_id: Annotated[int, Field(strict=True, ge=1, description="Analysis ID")], + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7179,12 +6784,12 @@ def v3_get_analysis_func_maps_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get function ID/address maps for an analysis + """List the global variables a function references. - Returns three maps built from every function in the analysis's binary: function ID to virtual address, its inverse, and virtual address to mangled name. Empty maps for a binary with no functions yet. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param analysis_id: Analysis ID (required) - :type analysis_id: int + :param function_id: Function ID (required) + :type function_id: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7207,8 +6812,8 @@ def v3_get_analysis_func_maps_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_get_analysis_func_maps_serialize( - analysis_id=analysis_id, + _param = self._v3_list_function_globals_serialize( + function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7216,7 +6821,7 @@ def v3_get_analysis_func_maps_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "GetFunctionMapsOutputBody", + '200': "ListFunctionGlobalsOutputBody", '403': "APIError", '404': "APIError", '422': "APIError", @@ -7229,9 +6834,9 @@ def v3_get_analysis_func_maps_without_preload_content( return response_data.response - def _v3_get_analysis_func_maps_serialize( + def _v3_list_function_globals_serialize( self, - analysis_id, + function_id, _request_auth, _content_type, _headers, @@ -7253,8 +6858,8 @@ def _v3_get_analysis_func_maps_serialize( _body_params: Optional[bytes] = None # process the path parameters - if analysis_id is not None: - _path_params['analysis_id'] = analysis_id + if function_id is not None: + _path_params['function_id'] = function_id # process the query parameters # process the header parameters # process the form parameters @@ -7278,7 +6883,7 @@ def _v3_get_analysis_func_maps_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/analyses/{analysis_id}/func-maps', + resource_path='/v3/functions/{function_id}/globals', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7295,9 +6900,12 @@ def _v3_get_analysis_func_maps_serialize( @validate_call - def v3_list_function_globals( + def v3_search_functions( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7310,13 +6918,19 @@ def v3_list_function_globals( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListFunctionGlobalsOutputBody: - """List the global variables a function references. + ) -> SearchFunctionsOutputBody: + """Search functions - Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - :param function_id: Function ID (required) - :type function_id: int + :param partial_name: Partial or full function name to search for + :type partial_name: str + :param model_name: Restrict results to functions analysed with this model + :type model_name: str + :param limit: Maximum results to return + :type limit: int + :param offset: Number of results to skip + :type offset: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7339,8 +6953,11 @@ def v3_list_function_globals( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_function_globals_serialize( - function_id=function_id, + _param = self._v3_search_functions_serialize( + partial_name=partial_name, + model_name=model_name, + limit=limit, + offset=offset, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7348,9 +6965,7 @@ def v3_list_function_globals( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionGlobalsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "SearchFunctionsOutputBody", '422': "APIError", '500': "APIError", } @@ -7366,9 +6981,12 @@ def v3_list_function_globals( @validate_call - def v3_list_function_globals_with_http_info( + def v3_search_functions_with_http_info( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7381,13 +6999,19 @@ def v3_list_function_globals_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListFunctionGlobalsOutputBody]: - """List the global variables a function references. + ) -> ApiResponse[SearchFunctionsOutputBody]: + """Search functions - Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - :param function_id: Function ID (required) - :type function_id: int + :param partial_name: Partial or full function name to search for + :type partial_name: str + :param model_name: Restrict results to functions analysed with this model + :type model_name: str + :param limit: Maximum results to return + :type limit: int + :param offset: Number of results to skip + :type offset: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7410,8 +7034,11 @@ def v3_list_function_globals_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_function_globals_serialize( - function_id=function_id, + _param = self._v3_search_functions_serialize( + partial_name=partial_name, + model_name=model_name, + limit=limit, + offset=offset, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7419,9 +7046,7 @@ def v3_list_function_globals_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionGlobalsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "SearchFunctionsOutputBody", '422': "APIError", '500': "APIError", } @@ -7437,9 +7062,12 @@ def v3_list_function_globals_with_http_info( @validate_call - def v3_list_function_globals_without_preload_content( + def v3_search_functions_without_preload_content( self, - function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, + model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, + limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7453,12 +7081,18 @@ def v3_list_function_globals_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """List the global variables a function references. + """Search functions - Returns the global variables referenced by the function, ordered by address. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied + Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed - :param function_id: Function ID (required) - :type function_id: int + :param partial_name: Partial or full function name to search for + :type partial_name: str + :param model_name: Restrict results to functions analysed with this model + :type model_name: str + :param limit: Maximum results to return + :type limit: int + :param offset: Number of results to skip + :type offset: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7481,8 +7115,11 @@ def v3_list_function_globals_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_list_function_globals_serialize( - function_id=function_id, + _param = self._v3_search_functions_serialize( + partial_name=partial_name, + model_name=model_name, + limit=limit, + offset=offset, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7490,9 +7127,7 @@ def v3_list_function_globals_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFunctionGlobalsOutputBody", - '403': "APIError", - '404': "APIError", + '200': "SearchFunctionsOutputBody", '422': "APIError", '500': "APIError", } @@ -7503,9 +7138,12 @@ def v3_list_function_globals_without_preload_content( return response_data.response - def _v3_list_function_globals_serialize( + def _v3_search_functions_serialize( self, - function_id, + partial_name, + model_name, + limit, + offset, _request_auth, _content_type, _headers, @@ -7527,9 +7165,23 @@ def _v3_list_function_globals_serialize( _body_params: Optional[bytes] = None # process the path parameters - if function_id is not None: - _path_params['function_id'] = function_id # process the query parameters + if partial_name is not None: + + _query_params.append(('partial_name', partial_name)) + + if model_name is not None: + + _query_params.append(('model_name', model_name)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter @@ -7552,7 +7204,7 @@ def _v3_list_function_globals_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v3/functions/{function_id}/globals', + resource_path='/v3/functions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -7569,12 +7221,11 @@ def _v3_list_function_globals_serialize( @validate_call - def v3_search_functions( + def v3_upsert_function_feedback( self, - partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, - model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7587,19 +7238,17 @@ def v3_search_functions( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SearchFunctionsOutputBody: - """Search functions + ) -> None: + """Record feedback on a function. - Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param partial_name: Partial or full function name to search for - :type partial_name: str - :param model_name: Restrict results to functions analysed with this model - :type model_name: str - :param limit: Maximum results to return - :type limit: int - :param offset: Number of results to skip - :type offset: int + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7622,11 +7271,10 @@ def v3_search_functions( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_search_functions_serialize( - partial_name=partial_name, - model_name=model_name, - limit=limit, - offset=offset, + _param = self._v3_upsert_function_feedback_serialize( + function_id=function_id, + type=type, + feedback_submission=feedback_submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7634,7 +7282,9 @@ def v3_search_functions( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchFunctionsOutputBody", + '204': None, + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", } @@ -7650,12 +7300,11 @@ def v3_search_functions( @validate_call - def v3_search_functions_with_http_info( + def v3_upsert_function_feedback_with_http_info( self, - partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, - model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7668,19 +7317,17 @@ def v3_search_functions_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SearchFunctionsOutputBody]: - """Search functions + ) -> ApiResponse[None]: + """Record feedback on a function. - Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param partial_name: Partial or full function name to search for - :type partial_name: str - :param model_name: Restrict results to functions analysed with this model - :type model_name: str - :param limit: Maximum results to return - :type limit: int - :param offset: Number of results to skip - :type offset: int + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7703,11 +7350,10 @@ def v3_search_functions_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_search_functions_serialize( - partial_name=partial_name, - model_name=model_name, - limit=limit, - offset=offset, + _param = self._v3_upsert_function_feedback_serialize( + function_id=function_id, + type=type, + feedback_submission=feedback_submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7715,7 +7361,9 @@ def v3_search_functions_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchFunctionsOutputBody", + '204': None, + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", } @@ -7731,12 +7379,11 @@ def v3_search_functions_with_http_info( @validate_call - def v3_search_functions_without_preload_content( + def v3_upsert_function_feedback_without_preload_content( self, - partial_name: Annotated[Optional[StrictStr], Field(description="Partial or full function name to search for")] = None, - model_name: Annotated[Optional[StrictStr], Field(description="Restrict results to functions analysed with this model")] = None, - limit: Annotated[Optional[Annotated[int, Field(le=50, strict=True, ge=1)]], Field(description="Maximum results to return")] = None, - offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of results to skip")] = None, + function_id: Annotated[int, Field(strict=True, ge=1, description="Function ID")], + type: Annotated[StrictStr, Field(description="What the feedback is about")], + feedback_submission: FeedbackSubmission, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -7750,18 +7397,16 @@ def v3_search_functions_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Search functions + """Record feedback on a function. - Searches for functions visible to the caller. At least one of partial_name or model_name must be provided. **Error codes:** - `422` [`VALIDATION_FAILED`](/errors/VALIDATION_FAILED) — Validation Failed + Records how useful the caller found one kind of result for this function, with any context the client captured. Replaces any feedback they recorded previously. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - :param partial_name: Partial or full function name to search for - :type partial_name: str - :param model_name: Restrict results to functions analysed with this model - :type model_name: str - :param limit: Maximum results to return - :type limit: int - :param offset: Number of results to skip - :type offset: int + :param function_id: Function ID (required) + :type function_id: int + :param type: What the feedback is about (required) + :type type: str + :param feedback_submission: (required) + :type feedback_submission: FeedbackSubmission :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -7784,11 +7429,10 @@ def v3_search_functions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._v3_search_functions_serialize( - partial_name=partial_name, - model_name=model_name, - limit=limit, - offset=offset, + _param = self._v3_upsert_function_feedback_serialize( + function_id=function_id, + type=type, + feedback_submission=feedback_submission, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -7796,7 +7440,9 @@ def v3_search_functions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchFunctionsOutputBody", + '204': None, + '403': "APIError", + '404': "APIError", '422': "APIError", '500': "APIError", } @@ -7807,12 +7453,11 @@ def v3_search_functions_without_preload_content( return response_data.response - def _v3_search_functions_serialize( + def _v3_upsert_function_feedback_serialize( self, - partial_name, - model_name, - limit, - offset, + function_id, + type, + feedback_submission, _request_auth, _content_type, _headers, @@ -7834,26 +7479,16 @@ def _v3_search_functions_serialize( _body_params: Optional[bytes] = None # process the path parameters + if function_id is not None: + _path_params['function_id'] = function_id + if type is not None: + _path_params['type'] = type # process the query parameters - if partial_name is not None: - - _query_params.append(('partial_name', partial_name)) - - if model_name is not None: - - _query_params.append(('model_name', model_name)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if offset is not None: - - _query_params.append(('offset', offset)) - # process the header parameters # process the form parameters # process the body parameter + if feedback_submission is not None: + _body_params = feedback_submission # set the HTTP header `Accept` @@ -7864,6 +7499,19 @@ def _v3_search_functions_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -7872,8 +7520,8 @@ def _v3_search_functions_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v3/functions', + method='PUT', + resource_path='/v3/functions/{function_id}/feedback/{type}', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/revengai/api/iam_users_api.py b/revengai/api/iam_users_api.py index ac411214..6b2742a9 100644 --- a/revengai/api/iam_users_api.py +++ b/revengai/api/iam_users_api.py @@ -15,8 +15,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from revengai.models.current_user import CurrentUser from revengai.models.permissions import Permissions -from revengai.models.user import User from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -51,10 +51,10 @@ def get_me( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> User: + ) -> CurrentUser: """Get current user - Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -86,7 +86,7 @@ def get_me( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "User", + '200': "CurrentUser", '404': "APIError", '500': "APIError", } @@ -116,10 +116,10 @@ def get_me_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[User]: + ) -> ApiResponse[CurrentUser]: """Get current user - Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -151,7 +151,7 @@ def get_me_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "User", + '200': "CurrentUser", '404': "APIError", '500': "APIError", } @@ -184,7 +184,7 @@ def get_me_without_preload_content( ) -> RESTResponseType: """Get current user - Returns the authenticated user's own information. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + Returns the authenticated user's own information, and how they sign in. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -216,7 +216,7 @@ def get_me_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "User", + '200': "CurrentUser", '404': "APIError", '500': "APIError", } diff --git a/revengai/api_client.py b/revengai/api_client.py index 54fd4996..a99ee346 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v4.75.0/python' + self.user_agent = 'OpenAPI-Generator/v4.77.1/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 2bed04f2..38f104a0 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -541,8 +541,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v4.75.0\n"\ - "SDK Package Version: v4.75.0".\ + "Version of the API: v4.77.1\n"\ + "SDK Package Version: v4.77.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index 2994b92a..e0cdd5c6 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -70,10 +70,7 @@ from revengai.models.analysis_requirement import AnalysisRequirement from revengai.models.analysis_scope import AnalysisScope from revengai.models.analysis_string_function import AnalysisStringFunction -from revengai.models.analysis_string_input import AnalysisStringInput from revengai.models.analysis_string_item import AnalysisStringItem -from revengai.models.analysis_strings_response import AnalysisStringsResponse -from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse from revengai.models.analysis_tag_body import AnalysisTagBody from revengai.models.analysis_tags import AnalysisTags from revengai.models.analysis_tags_output_body import AnalysisTagsOutputBody @@ -86,8 +83,6 @@ from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy -from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction -from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability from revengai.models.archive_content_entry import ArchiveContentEntry from revengai.models.array_data_type import ArrayDataType @@ -107,8 +102,6 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList -from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse -from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags from revengai.models.base_response_analysis_update_tags_response import BaseResponseAnalysisUpdateTagsResponse from revengai.models.base_response_basic import BaseResponseBasic @@ -133,7 +126,6 @@ from revengai.models.base_response_function_blocks_response import BaseResponseFunctionBlocksResponse from revengai.models.base_response_function_capability_response import BaseResponseFunctionCapabilityResponse from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse -from revengai.models.base_response_function_strings_response import BaseResponseFunctionStringsResponse from revengai.models.base_response_functions_detail_response import BaseResponseFunctionsDetailResponse from revengai.models.base_response_get_public_user_response import BaseResponseGetPublicUserResponse from revengai.models.base_response_list_callees_caller_functions_response import BaseResponseListCalleesCallerFunctionsResponse @@ -166,7 +158,6 @@ from revengai.models.batch_rename_item import BatchRenameItem from revengai.models.batch_rename_output_body import BatchRenameOutputBody from revengai.models.binaries_related_status_response import BinariesRelatedStatusResponse -from revengai.models.binaries_task_status import BinariesTaskStatus from revengai.models.binary import Binary from revengai.models.binary_additional_details_data_response import BinaryAdditionalDetailsDataResponse from revengai.models.binary_additional_response import BinaryAdditionalResponse @@ -206,6 +197,7 @@ from revengai.models.capabilities_result import CapabilitiesResult from revengai.models.capability import Capability from revengai.models.capability_entry import CapabilityEntry +from revengai.models.capability_implementation import CapabilityImplementation from revengai.models.child_binaries_response import ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest @@ -282,6 +274,7 @@ from revengai.models.crypto_scan_metadata import CryptoScanMetadata from revengai.models.crypto_scan_result import CryptoScanResult from revengai.models.crypto_verification import CryptoVerification +from revengai.models.current_user import CurrentUser from revengai.models.daily_analyses_count_output_body import DailyAnalysesCountOutputBody from revengai.models.daily_count_body import DailyCountBody from revengai.models.data_type_entry import DataTypeEntry @@ -296,6 +289,7 @@ from revengai.models.decompilation_data import DecompilationData from revengai.models.decompiler_summary import DecompilerSummary from revengai.models.decompiler_summary_evidence import DecompilerSummaryEvidence +from revengai.models.delete_me_body import DeleteMeBody from revengai.models.die_match import DieMatch from revengai.models.disassembly_output_body import DisassemblyOutputBody from revengai.models.disassembly_summary_evidence import DisassemblySummaryEvidence @@ -304,6 +298,8 @@ from revengai.models.drakvuf_file_metadata import DrakvufFileMetadata from revengai.models.dynamic_execution_metadata import DynamicExecutionMetadata from revengai.models.dynamic_execution_result import DynamicExecutionResult +from revengai.models.dynamic_execution_run import DynamicExecutionRun +from revengai.models.dynamic_execution_run_config import DynamicExecutionRunConfig from revengai.models.dynamic_execution_status import DynamicExecutionStatus from revengai.models.dynamic_execution_summary import DynamicExecutionSummary from revengai.models.dynamic_execution_summary_metadata import DynamicExecutionSummaryMetadata @@ -373,6 +369,7 @@ from revengai.models.extracted_url import ExtractedURL from revengai.models.extraction_failure import ExtractionFailure from revengai.models.feedback_output_body import FeedbackOutputBody +from revengai.models.feedback_submission import FeedbackSubmission from revengai.models.file_activity_entry import FileActivityEntry from revengai.models.file_format import FileFormat from revengai.models.file_hashes import FileHashes @@ -392,6 +389,7 @@ from revengai.models.finding_counts_body import FindingCountsBody from revengai.models.finding_evidence_inner import FindingEvidenceInner from revengai.models.form_file import FormFile +from revengai.models.function import Function from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse from revengai.models.function_block_response import FunctionBlockResponse from revengai.models.function_blocks_response import FunctionBlocksResponse @@ -418,9 +416,7 @@ from revengai.models.function_similarity import FunctionSimilarity from revengai.models.function_similarity_evidence import FunctionSimilarityEvidence from revengai.models.function_source_type import FunctionSourceType -from revengai.models.function_string import FunctionString from revengai.models.function_string_item import FunctionStringItem -from revengai.models.function_strings_response import FunctionStringsResponse from revengai.models.function_type_definition import FunctionTypeDefinition from revengai.models.function_usage import FunctionUsage from revengai.models.functions_detail_response import FunctionsDetailResponse @@ -436,6 +432,7 @@ from revengai.models.get_binary_externals_output_body import GetBinaryExternalsOutputBody from revengai.models.get_collection_output_body import GetCollectionOutputBody from revengai.models.get_config_output_body import GetConfigOutputBody +from revengai.models.get_credit_estimates_output_body import GetCreditEstimatesOutputBody from revengai.models.get_data_type_history_body import GetDataTypeHistoryBody from revengai.models.get_die_info_output_body import GetDieInfoOutputBody from revengai.models.get_finding_output_body import GetFindingOutputBody @@ -495,6 +492,7 @@ from revengai.models.list_collections_output_body import ListCollectionsOutputBody from revengai.models.list_conversations_output_body import ListConversationsOutputBody from revengai.models.list_data_type_functions_body import ListDataTypeFunctionsBody +from revengai.models.list_dynamic_execution_runs_output_body import ListDynamicExecutionRunsOutputBody from revengai.models.list_example_analyses_output_body import ListExampleAnalysesOutputBody from revengai.models.list_findings_output_body import ListFindingsOutputBody from revengai.models.list_function_globals_output_body import ListFunctionGlobalsOutputBody @@ -503,6 +501,7 @@ from revengai.models.list_global_functions_output_body import ListGlobalFunctionsOutputBody from revengai.models.list_imported_functions_output_body import ListImportedFunctionsOutputBody from revengai.models.list_investigations_output_body import ListInvestigationsOutputBody +from revengai.models.list_malware_families_output_body import ListMalwareFamiliesOutputBody from revengai.models.list_operation_prerequisites_output_body import ListOperationPrerequisitesOutputBody from revengai.models.list_principals_output_body import ListPrincipalsOutputBody from revengai.models.list_public_users_output_body import ListPublicUsersOutputBody @@ -514,6 +513,7 @@ from revengai.models.logs import Logs from revengai.models.lookup_analysis_by_binary_id_output_body import LookupAnalysisByBinaryIDOutputBody from revengai.models.mitre_technique import MITRETechnique +from revengai.models.malware_family import MalwareFamily from revengai.models.match_filters import MatchFilters from revengai.models.matched_function import MatchedFunction from revengai.models.memdump_entry import MemdumpEntry @@ -543,6 +543,7 @@ from revengai.models.oidc_callback_input_body import OIDCCallbackInputBody from revengai.models.operand_xref import OperandXref from revengai.models.operation_binary_export_metadata_binary_export_result import OperationBinaryExportMetadataBinaryExportResult +from revengai.models.operation_cost_body import OperationCostBody from revengai.models.operation_create_metadata_create_result import OperationCreateMetadataCreateResult from revengai.models.operation_crypto_explain_metadata_crypto_explain_result import OperationCryptoExplainMetadataCryptoExplainResult from revengai.models.operation_crypto_scan_metadata_crypto_scan_result import OperationCryptoScanMetadataCryptoScanResult @@ -601,11 +602,11 @@ from revengai.models.protocols_agent_response import ProtocolsAgentResponse from revengai.models.public_team_body import PublicTeamBody from revengai.models.public_user_body import PublicUserBody -from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse from revengai.models.rating_output_body import RatingOutputBody from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent +from revengai.models.recorded_feedback import RecordedFeedback from revengai.models.referenced_constant import ReferencedConstant from revengai.models.referenced_constant_evidence import ReferencedConstantEvidence from revengai.models.refresh_body import RefreshBody @@ -692,6 +693,7 @@ from revengai.models.single_code_signature_model import SingleCodeSignatureModel from revengai.models.single_pdb_entry_model import SinglePDBEntryModel from revengai.models.single_section_model import SingleSectionModel +from revengai.models.size_bucket_body import SizeBucketBody from revengai.models.software_type_counts_body import SoftwareTypeCountsBody from revengai.models.source_delta_event import SourceDeltaEvent from revengai.models.source_reset_event import SourceResetEvent @@ -728,10 +730,8 @@ from revengai.models.step_started_data import StepStartedData from revengai.models.stream_ai_decompilation200_response_inner import StreamAiDecompilation200ResponseInner from revengai.models.stream_events200_response_inner import StreamEvents200ResponseInner -from revengai.models.string_functions import StringFunctions from revengai.models.string_match import StringMatch from revengai.models.string_match_evidence import StringMatchEvidence -from revengai.models.string_source import StringSource from revengai.models.struct_data_type import StructDataType from revengai.models.struct_definition import StructDefinition from revengai.models.subject import Subject diff --git a/revengai/models/analysis_basic_info_output_body.py b/revengai/models/analysis_basic_info_output_body.py index 21facf63..70f43f45 100644 --- a/revengai/models/analysis_basic_info_output_body.py +++ b/revengai/models/analysis_basic_info_output_body.py @@ -39,7 +39,7 @@ class AnalysisBasicInfoOutputBody(BaseModel): detected_binary_type: StrictStr = Field(description="Detected operating-system platform; empty when unavailable") detected_language: StrictStr = Field(description="Detected source language; empty when unavailable") function_count: StrictInt = Field(description="Number of functions in the binary") - is_advanced: StrictBool = Field(description="True when the analysis was run in advanced mode") + is_advanced: StrictBool = Field(description="Always false; advanced (DFG) analysis has been removed") is_owner: StrictBool = Field(description="True when the caller is the analysis owner") is_system: StrictBool = Field(description="True when the analysis is owned by a system user") model_id: StrictInt = Field(description="Model ID") diff --git a/revengai/models/analysis_config.py b/revengai/models/analysis_config.py index 9753487d..d965e0c1 100644 --- a/revengai/models/analysis_config.py +++ b/revengai/models/analysis_config.py @@ -30,10 +30,9 @@ class AnalysisConfig(BaseModel): scrape_third_party_config: Optional[ScrapeThirdPartyConfig] = Field(default=None, description="Settings to scrape third party sources") generate_capabilities: Optional[StrictBool] = Field(default=False, description="A configuration option for generating capabilities of a binary") no_cache: Optional[StrictBool] = Field(default=False, description="When enabled, skips using cached data within the processing.") - advanced_analysis: Optional[StrictBool] = Field(default=False, description="Enables an advanced security analysis.") sandbox_config: Optional[SandboxOptions] = Field(default=None, description="Including a sandbox config enables the dynamic execution sandbox") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_capabilities", "no_cache", "advanced_analysis", "sandbox_config"] + __properties: ClassVar[List[str]] = ["scrape_third_party_config", "generate_capabilities", "no_cache", "sandbox_config"] model_config = ConfigDict( populate_by_name=True, @@ -102,7 +101,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "scrape_third_party_config": ScrapeThirdPartyConfig.from_dict(obj["scrape_third_party_config"]) if obj.get("scrape_third_party_config") is not None else None, "generate_capabilities": obj.get("generate_capabilities") if obj.get("generate_capabilities") is not None else False, "no_cache": obj.get("no_cache") if obj.get("no_cache") is not None else False, - "advanced_analysis": obj.get("advanced_analysis") if obj.get("advanced_analysis") is not None else False, "sandbox_config": SandboxOptions.from_dict(obj["sandbox_config"]) if obj.get("sandbox_config") is not None else None }) # store additional fields in additional_properties diff --git a/revengai/models/analysis_functions.py b/revengai/models/analysis_functions.py index cc930b75..17f42238 100644 --- a/revengai/models/analysis_functions.py +++ b/revengai/models/analysis_functions.py @@ -18,7 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction +from revengai.models.function import Function from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ class AnalysisFunctions(BaseModel): """ AnalysisFunctions """ # noqa: E501 - functions: List[AppApiRestV2FunctionsTypesFunction] = Field(description="The functions associated with the analysis") + functions: List[Function] = Field(description="The functions associated with the analysis") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["functions"] @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "functions": [AppApiRestV2FunctionsTypesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + "functions": [Function.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/analysis_operations_output_body.py b/revengai/models/analysis_operations_output_body.py index 9c8f4199..beae263a 100644 --- a/revengai/models/analysis_operations_output_body.py +++ b/revengai/models/analysis_operations_output_body.py @@ -26,7 +26,7 @@ class AnalysisOperationsOutputBody(BaseModel): """ AnalysisOperationsOutputBody """ # noqa: E501 - operations: List[AnalysisOperationBody] = Field(description="The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary. Operations that have never run are omitted") + operations: List[AnalysisOperationBody] = Field(description="The analysis' static-analysis operation, followed by the latest run of each other operation started on its binary, then one dynamic-execution operation per sandbox run of the analysis, newest first. Operations that have never run are omitted") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["operations"] diff --git a/revengai/models/base_response_analysis_strings_status_response.py b/revengai/models/base_response_analysis_strings_status_response.py deleted file mode 100644 index 75d786ed..00000000 --- a/revengai/models/base_response_analysis_strings_status_response.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel -from typing import Optional, Set -from typing_extensions import Self - -class BaseResponseAnalysisStringsStatusResponse(BaseModel): - """ - BaseResponseAnalysisStringsStatusResponse - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[AnalysisStringsStatusResponse] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseAnalysisStringsStatusResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseAnalysisStringsStatusResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": AnalysisStringsStatusResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj - - diff --git a/revengai/models/basic.py b/revengai/models/basic.py index 8e9efcfb..df3365e9 100644 --- a/revengai/models/basic.py +++ b/revengai/models/basic.py @@ -39,7 +39,7 @@ class Basic(BaseModel): is_owner: StrictBool = Field(description="Whether the current user is the owner") debug: StrictBool = Field(description="Whether the current analysis was analysed with debug symbols") function_count: StrictInt = Field(description="The number of functions in the binary") - is_advanced: StrictBool = Field(description="Whether the analysis was advanced") + is_advanced: Optional[StrictBool] = Field(default=False, description="Always false; advanced (DFG) analysis has been removed") base_address: Optional[StrictInt] binary_uuid: Optional[StrictStr] = None sequencer_version: Optional[StrictStr] = None @@ -133,7 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "is_owner": obj.get("is_owner"), "debug": obj.get("debug"), "function_count": obj.get("function_count"), - "is_advanced": obj.get("is_advanced"), + "is_advanced": obj.get("is_advanced") if obj.get("is_advanced") is not None else False, "base_address": obj.get("base_address"), "binary_uuid": obj.get("binary_uuid"), "sequencer_version": obj.get("sequencer_version"), diff --git a/revengai/models/batch_function_signature_entry.py b/revengai/models/batch_function_signature_entry.py index bee85b46..0b05b588 100644 --- a/revengai/models/batch_function_signature_entry.py +++ b/revengai/models/batch_function_signature_entry.py @@ -46,8 +46,8 @@ def source_type_validate_enum(cls, value): if value is None: return value - if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api')") + if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/binaries_task_status.py b/revengai/models/binaries_task_status.py deleted file mode 100644 index 89ee44ed..00000000 --- a/revengai/models/binaries_task_status.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class BinariesTaskStatus(str, Enum): - """ - BinariesTaskStatus - """ - - """ - allowed enum values - """ - UNINITIALISED = 'UNINITIALISED' - PENDING = 'PENDING' - RUNNING = 'RUNNING' - COMPLETED = 'COMPLETED' - FAILED = 'FAILED' - UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of BinariesTaskStatus from a JSON string""" - return cls(json.loads(json_str)) - - @classmethod - def _missing_(cls, value): - """Fall back to the unknown default for values not defined in the SDK.""" - return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") - - diff --git a/revengai/models/call_edge.py b/revengai/models/call_edge.py index 1a5a245c..65a00232 100644 --- a/revengai/models/call_edge.py +++ b/revengai/models/call_edge.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -33,9 +33,17 @@ class CallEdge(BaseModel): caller_vaddr: StrictInt = Field(description="Entry vaddr of the caller function (joined from function_t).") imported_function_id: Optional[StrictInt] = Field(default=None, description="Imported function ID for an external callee, resolved via the thunk/stub address.") is_external: StrictBool + source: StrictStr = Field(description="Who found the edge: SYSTEM for the analysis, AI_AGENT for a call AI decompilation recovered that the analysis missed.") thunked_vaddr: Optional[StrictInt] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["callee_function_id", "callee_name", "callee_vaddr", "caller_function_id", "caller_name", "caller_vaddr", "imported_function_id", "is_external", "thunked_vaddr"] + __properties: ClassVar[List[str]] = ["callee_function_id", "callee_name", "callee_vaddr", "caller_function_id", "caller_name", "caller_vaddr", "imported_function_id", "is_external", "source", "thunked_vaddr"] + + @field_validator('source') + def source_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SYSTEM', 'AI_AGENT', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('SYSTEM', 'AI_AGENT', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -103,6 +111,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "caller_vaddr": obj.get("caller_vaddr"), "imported_function_id": obj.get("imported_function_id"), "is_external": obj.get("is_external"), + "source": obj.get("source"), "thunked_vaddr": obj.get("thunked_vaddr") }) # store additional fields in additional_properties diff --git a/revengai/models/analysis_string_input.py b/revengai/models/capability_implementation.py similarity index 78% rename from revengai/models/analysis_string_input.py rename to revengai/models/capability_implementation.py index f193e583..a38a63b1 100644 --- a/revengai/models/analysis_string_input.py +++ b/revengai/models/capability_implementation.py @@ -16,21 +16,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List -from revengai.models.string_source import StringSource from typing import Optional, Set from typing_extensions import Self -class AnalysisStringInput(BaseModel): +class CapabilityImplementation(BaseModel): """ - Input model for inserting a string into an analysis. + CapabilityImplementation """ # noqa: E501 - value: StrictStr = Field(description="The string literal value") - vaddr: StrictInt = Field(description="The virtual address of the string") - source: StringSource = Field(description="The source of the string") + capability: StrictStr = Field(description="Capability this summary describes") + summary: StrictStr = Field(description="How the function implements this capability") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] + __properties: ClassVar[List[str]] = ["capability", "summary"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AnalysisStringInput from a JSON string""" + """Create an instance of CapabilityImplementation from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AnalysisStringInput from a dict""" + """Create an instance of CapabilityImplementation from a dict""" if obj is None: return None @@ -90,9 +88,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "value": obj.get("value"), - "vaddr": obj.get("vaddr"), - "source": obj.get("source") + "capability": obj.get("capability"), + "summary": obj.get("summary") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/create_user_input_body.py b/revengai/models/create_user_input_body.py index e56958aa..b5a776b9 100644 --- a/revengai/models/create_user_input_body.py +++ b/revengai/models/create_user_input_body.py @@ -26,7 +26,7 @@ class CreateUserInputBody(BaseModel): """ CreateUserInputBody """ # noqa: E501 - credits: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Initial credit balance in credits (1 credit = 1000 units); defaults to 10 credits") + credits: Optional[Annotated[int, Field(le=2147483, strict=True, ge=0)]] = Field(default=None, description="Initial credit balance in credits (1 credit = 1000 units); defaults to 10 credits") email: Annotated[str, Field(min_length=1, strict=True, max_length=255)] = Field(description="Email address") first_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="First name") last_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Last name") diff --git a/revengai/models/base_response_analysis_strings_response.py b/revengai/models/current_user.py similarity index 54% rename from revengai/models/base_response_analysis_strings_response.py rename to revengai/models/current_user.py index 479e9aa3..ff261a07 100644 --- a/revengai/models/base_response_analysis_strings_response.py +++ b/revengai/models/current_user.py @@ -16,25 +16,51 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.analysis_strings_response import AnalysisStringsResponse -from revengai.models.error_model import ErrorModel -from revengai.models.meta_model import MetaModel +from revengai.models.user_profile import UserProfile from typing import Optional, Set from typing_extensions import Self -class BaseResponseAnalysisStringsResponse(BaseModel): +class CurrentUser(BaseModel): """ - BaseResponseAnalysisStringsResponse + CurrentUser """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[AnalysisStringsResponse] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") + created_at: datetime + email: StrictStr + is_active: StrictBool = Field(description="Inactive users cannot authenticate") + profile: UserProfile + role: StrictStr + signs_in_with: StrictStr = Field(description="How the user re-authenticates to delete their account: 'password' sends their current password, 'sso' signs in again at their identity provider.") + tier: Optional[StrictStr] = None + user_id: StrictInt additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + __properties: ClassVar[List[str]] = ["created_at", "email", "is_active", "profile", "role", "signs_in_with", "tier", "user_id"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['USER', 'ADMIN', 'SUPERADMIN', 'SYSTEM', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('USER', 'ADMIN', 'SUPERADMIN', 'SYSTEM', 'unknown_default_open_api')") + return value + + @field_validator('signs_in_with') + def signs_in_with_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['password', 'sso', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('password', 'sso', 'unknown_default_open_api')") + return value + + @field_validator('tier') + def tier_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['ENTHUSIAST', 'REVERSER', 'BUG_HUNTER', 'MALWARE_ANALYST', 'SECURITY_RESEARCHER', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ENTHUSIAST', 'REVERSER', 'BUG_HUNTER', 'MALWARE_ANALYST', 'SECURITY_RESEARCHER', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -54,7 +80,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseAnalysisStringsResponse from a JSON string""" + """Create an instance of CurrentUser from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,44 +103,19 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() + # override the default output from pydantic by calling `to_dict()` of profile + if self.profile: + _dict['profile'] = self.profile.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None - # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None - return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseAnalysisStringsResponse from a dict""" + """Create an instance of CurrentUser from a dict""" if obj is None: return None @@ -122,11 +123,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": AnalysisStringsResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + "created_at": obj.get("created_at"), + "email": obj.get("email"), + "is_active": obj.get("is_active"), + "profile": UserProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, + "role": obj.get("role"), + "signs_in_with": obj.get("signs_in_with"), + "tier": obj.get("tier"), + "user_id": obj.get("user_id") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/analysis_strings_status_response.py b/revengai/models/delete_me_body.py similarity index 82% rename from revengai/models/analysis_strings_status_response.py rename to revengai/models/delete_me_body.py index 52045bf7..d080e2ca 100644 --- a/revengai/models/analysis_strings_status_response.py +++ b/revengai/models/delete_me_body.py @@ -17,18 +17,18 @@ import json from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from revengai.models.binaries_task_status import BinariesTaskStatus +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self -class AnalysisStringsStatusResponse(BaseModel): +class DeleteMeBody(BaseModel): """ - AnalysisStringsStatusResponse + DeleteMeBody """ # noqa: E501 - status: BinariesTaskStatus = Field(description="The current status of the strings extraction task") + password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = Field(default=None, description="Current password. Required for users who sign in with a password; ignored for users from an external identity provider.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["status"] + __properties: ClassVar[List[str]] = ["password"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AnalysisStringsStatusResponse from a JSON string""" + """Create an instance of DeleteMeBody from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -80,7 +80,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AnalysisStringsStatusResponse from a dict""" + """Create an instance of DeleteMeBody from a dict""" if obj is None: return None @@ -88,7 +88,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status") + "password": obj.get("password") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/disassembly_output_body.py b/revengai/models/disassembly_output_body.py index a12fcd08..f0c8d0c9 100644 --- a/revengai/models/disassembly_output_body.py +++ b/revengai/models/disassembly_output_body.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional from revengai.models.operand_xref import OperandXref from typing import Optional, Set @@ -31,11 +31,9 @@ class DisassemblyOutputBody(BaseModel): global_variables: Optional[Any] = None local_variables: Optional[Any] = None operand_xrefs: Optional[List[OperandXref]] = Field(default=None, description="Instruction operands that reference a pointer slot, sorted by instruction_vaddr, target_vaddr, pointed_vaddr.") - params: Optional[Any] = None - return_type: Optional[StrictStr] = None returns: StrictBool additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["basic_blocks", "function_id", "global_variables", "local_variables", "operand_xrefs", "params", "return_type", "returns"] + __properties: ClassVar[List[str]] = ["basic_blocks", "function_id", "global_variables", "local_variables", "operand_xrefs", "returns"] model_config = ConfigDict( populate_by_name=True, @@ -110,11 +108,6 @@ def to_dict(self) -> Dict[str, Any]: if self.operand_xrefs is None and "operand_xrefs" in self.model_fields_set: _dict['operand_xrefs'] = None - # set to None if params (nullable) is None - # and model_fields_set contains the field - if self.params is None and "params" in self.model_fields_set: - _dict['params'] = None - return _dict @classmethod @@ -132,8 +125,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "global_variables": obj.get("global_variables"), "local_variables": obj.get("local_variables"), "operand_xrefs": [OperandXref.from_dict(_item) for _item in obj["operand_xrefs"]] if obj.get("operand_xrefs") is not None else None, - "params": obj.get("params"), - "return_type": obj.get("return_type"), "returns": obj.get("returns") }) # store additional fields in additional_properties diff --git a/revengai/models/dynamic_execution_metadata.py b/revengai/models/dynamic_execution_metadata.py index a02ab95f..e86b8017 100644 --- a/revengai/models/dynamic_execution_metadata.py +++ b/revengai/models/dynamic_execution_metadata.py @@ -27,15 +27,15 @@ class DynamicExecutionMetadata(BaseModel): DynamicExecutionMetadata """ # noqa: E501 logs: AnalysisLogs = Field(description="Sandbox status log messages captured during the run. Empty when none have been captured yet.") - status: StrictStr = Field(description="Run status. UNINITIALISED means this analysis has never had a run triggered.") + status: StrictStr = Field(description="Run status") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["logs", "status"] @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" - if value not in set(['UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('UNINITIALISED', 'PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + if value not in set(['PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/function_strings_response.py b/revengai/models/dynamic_execution_run.py similarity index 67% rename from revengai/models/function_strings_response.py rename to revengai/models/dynamic_execution_run.py index fd4715f7..24b1354f 100644 --- a/revengai/models/function_strings_response.py +++ b/revengai/models/dynamic_execution_run.py @@ -16,20 +16,30 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List -from revengai.models.function_string import FunctionString +from revengai.models.dynamic_execution_run_config import DynamicExecutionRunConfig from typing import Optional, Set from typing_extensions import Self -class FunctionStringsResponse(BaseModel): +class DynamicExecutionRun(BaseModel): """ - Response for listing all the strings of a function. + DynamicExecutionRun """ # noqa: E501 - strings: List[FunctionString] = Field(description="The strings associated with this function") - total_strings: StrictInt = Field(description="The total number of strings associated with this function") + config: DynamicExecutionRunConfig = Field(description="Parameters the run was started with") + created_at: datetime = Field(description="When the run was started") + id: StrictStr = Field(description="Run ID") + status: StrictStr = Field(description="Run status") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["strings", "total_strings"] + __properties: ClassVar[List[str]] = ["config", "created_at", "id", "status"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('PENDING', 'RUNNING', 'COMPLETED', 'FAILED', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -49,7 +59,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FunctionStringsResponse from a JSON string""" + """Create an instance of DynamicExecutionRun from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,13 +82,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in strings (list) - _items = [] - if self.strings: - for _item_strings in self.strings: - if _item_strings: - _items.append(_item_strings.to_dict()) - _dict['strings'] = _items + # override the default output from pydantic by calling `to_dict()` of config + if self.config: + _dict['config'] = self.config.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -88,7 +94,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionStringsResponse from a dict""" + """Create an instance of DynamicExecutionRun from a dict""" if obj is None: return None @@ -96,8 +102,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "strings": [FunctionString.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, - "total_strings": obj.get("total_strings") + "config": DynamicExecutionRunConfig.from_dict(obj["config"]) if obj.get("config") is not None else None, + "created_at": obj.get("created_at"), + "id": obj.get("id"), + "status": obj.get("status") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/base_response_function_strings_response.py b/revengai/models/dynamic_execution_run_config.py similarity index 54% rename from revengai/models/base_response_function_strings_response.py rename to revengai/models/dynamic_execution_run_config.py index 84c968c9..aa8055a9 100644 --- a/revengai/models/base_response_function_strings_response.py +++ b/revengai/models/dynamic_execution_run_config.py @@ -16,25 +16,34 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.error_model import ErrorModel -from revengai.models.function_strings_response import FunctionStringsResponse -from revengai.models.meta_model import MetaModel from typing import Optional, Set from typing_extensions import Self -class BaseResponseFunctionStringsResponse(BaseModel): +class DynamicExecutionRunConfig(BaseModel): """ - BaseResponseFunctionStringsResponse + DynamicExecutionRunConfig """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[FunctionStringsResponse] = None - message: Optional[StrictStr] = None - errors: Optional[List[ErrorModel]] = None - meta: Optional[MetaModel] = Field(default=None, description="Metadata") + archive_entry_path: StrictStr = Field(description="Relative path of the archive entry executed. Empty when no archive was used.") + archive_sha_256_hash: StrictStr = Field(description="SHA-256 of the archive sent to the sandbox instead of the analysed binary. Empty when no archive was used.") + command_line_args: StrictStr = Field(description="Command-line arguments passed to the sample. Empty when none were given.") + has_archive_password: StrictBool = Field(description="Whether a password was given for the archive. The password itself is never returned.") + start_method: Optional[StrictStr] = Field(description="How the sandbox launched the sample. Null when the sandbox's standard behaviour was used.") + timeout_seconds: StrictInt = Field(description="Maximum sandbox execution time in seconds") + url: StrictStr = Field(description="URL opened in the sandbox's browser instead of a sample. Empty for a sample run.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + __properties: ClassVar[List[str]] = ["archive_entry_path", "archive_sha_256_hash", "command_line_args", "has_archive_password", "start_method", "timeout_seconds", "url"] + + @field_validator('start_method') + def start_method_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['standard_user_process', 'administrator_process', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('standard_user_process', 'administrator_process', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -54,7 +63,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseFunctionStringsResponse from a JSON string""" + """Create an instance of DynamicExecutionRunConfig from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,44 +86,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of data - if self.data: - _dict['data'] = self.data.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of meta - if self.meta: - _dict['meta'] = self.meta.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if data (nullable) is None - # and model_fields_set contains the field - if self.data is None and "data" in self.model_fields_set: - _dict['data'] = None - - # set to None if message (nullable) is None - # and model_fields_set contains the field - if self.message is None and "message" in self.model_fields_set: - _dict['message'] = None - - # set to None if errors (nullable) is None + # set to None if start_method (nullable) is None # and model_fields_set contains the field - if self.errors is None and "errors" in self.model_fields_set: - _dict['errors'] = None + if self.start_method is None and "start_method" in self.model_fields_set: + _dict['start_method'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseFunctionStringsResponse from a dict""" + """Create an instance of DynamicExecutionRunConfig from a dict""" if obj is None: return None @@ -122,11 +108,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "status": obj.get("status") if obj.get("status") is not None else True, - "data": FunctionStringsResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, - "message": obj.get("message"), - "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + "archive_entry_path": obj.get("archive_entry_path"), + "archive_sha_256_hash": obj.get("archive_sha_256_hash"), + "command_line_args": obj.get("command_line_args"), + "has_archive_password": obj.get("has_archive_password"), + "start_method": obj.get("start_method"), + "timeout_seconds": obj.get("timeout_seconds"), + "url": obj.get("url") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/dynamic_execution_summary_metadata.py b/revengai/models/dynamic_execution_summary_metadata.py index 0c65d80a..71429e22 100644 --- a/revengai/models/dynamic_execution_summary_metadata.py +++ b/revengai/models/dynamic_execution_summary_metadata.py @@ -25,7 +25,7 @@ class DynamicExecutionSummaryMetadata(BaseModel): """ DynamicExecutionSummaryMetadata """ # noqa: E501 - status: StrictStr = Field(description="Status of the most recent summary attempt. UNINITIALISED means no summary has been attempted for this analysis.") + status: StrictStr = Field(description="Status of the run's most recent summary attempt. UNINITIALISED means no summary has been attempted for the run.") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["status"] diff --git a/revengai/models/error_body.py b/revengai/models/error_body.py index 9c923fb6..5ea619fa 100644 --- a/revengai/models/error_body.py +++ b/revengai/models/error_body.py @@ -36,8 +36,8 @@ class ErrorBody(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REAUTH_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REAUTH_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/feedback_submission.py b/revengai/models/feedback_submission.py new file mode 100644 index 00000000..8a4f7e6a --- /dev/null +++ b/revengai/models/feedback_submission.py @@ -0,0 +1,108 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class FeedbackSubmission(BaseModel): + """ + FeedbackSubmission + """ # noqa: E501 + metadata: Optional[Dict[str, Any]] = Field(default=None, description="Context the client captured with the feedback, stored as-is (e.g. the binary hash and the matches the caller was shown)") + sentiment: StrictStr = Field(description="How useful the caller found the result") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metadata", "sentiment"] + + @field_validator('sentiment') + def sentiment_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeedbackSubmission from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeedbackSubmission from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "metadata": obj.get("metadata"), + "sentiment": obj.get("sentiment") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/app_api_rest_v2_functions_types_function.py b/revengai/models/function.py similarity index 93% rename from revengai/models/app_api_rest_v2_functions_types_function.py rename to revengai/models/function.py index af8b33c1..28bcb942 100644 --- a/revengai/models/app_api_rest_v2_functions_types_function.py +++ b/revengai/models/function.py @@ -21,9 +21,9 @@ from typing import Optional, Set from typing_extensions import Self -class AppApiRestV2FunctionsTypesFunction(BaseModel): +class Function(BaseModel): """ - AppApiRestV2FunctionsTypesFunction + Function """ # noqa: E501 function_id: StrictInt = Field(description="Function id") function_name: StrictStr = Field(description="Demangled name of the function") @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AppApiRestV2FunctionsTypesFunction from a JSON string""" + """Create an instance of Function from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AppApiRestV2FunctionsTypesFunction from a dict""" + """Create an instance of Function from a dict""" if obj is None: return None diff --git a/revengai/models/function_signature_body.py b/revengai/models/function_signature_body.py index 54d4d2b5..29626bbe 100644 --- a/revengai/models/function_signature_body.py +++ b/revengai/models/function_signature_body.py @@ -47,8 +47,8 @@ def source_type_validate_enum(cls, value): if value is None: return value - if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api')") + if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/function_signature_entry.py b/revengai/models/function_signature_entry.py index 58e6bbe8..e32b8c12 100644 --- a/revengai/models/function_signature_entry.py +++ b/revengai/models/function_signature_entry.py @@ -45,8 +45,8 @@ def source_type_validate_enum(cls, value): if value is None: return value - if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'unknown_default_open_api')") + if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'AI_AGENT', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/get_credit_estimates_output_body.py b/revengai/models/get_credit_estimates_output_body.py new file mode 100644 index 00000000..c5988e0a --- /dev/null +++ b/revengai/models/get_credit_estimates_output_body.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from revengai.models.operation_cost_body import OperationCostBody +from revengai.models.size_bucket_body import SizeBucketBody +from typing import Optional, Set +from typing_extensions import Self + +class GetCreditEstimatesOutputBody(BaseModel): + """ + GetCreditEstimatesOutputBody + """ # noqa: E501 + operations: List[OperationCostBody] = Field(description="Estimated cost of each operation") + size_buckets: List[SizeBucketBody] = Field(description="Size buckets in ascending order of size") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["operations", "size_buckets"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GetCreditEstimatesOutputBody from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in operations (list) + _items = [] + if self.operations: + for _item_operations in self.operations: + if _item_operations: + _items.append(_item_operations.to_dict()) + _dict['operations'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in size_buckets (list) + _items = [] + if self.size_buckets: + for _item_size_buckets in self.size_buckets: + if _item_size_buckets: + _items.append(_item_size_buckets.to_dict()) + _dict['size_buckets'] = _items + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GetCreditEstimatesOutputBody from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "operations": [OperationCostBody.from_dict(_item) for _item in obj["operations"]] if obj.get("operations") is not None else None, + "size_buckets": [SizeBucketBody.from_dict(_item) for _item in obj["size_buckets"]] if obj.get("size_buckets") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/put_analysis_strings_request.py b/revengai/models/list_dynamic_execution_runs_output_body.py similarity index 78% rename from revengai/models/put_analysis_strings_request.py rename to revengai/models/list_dynamic_execution_runs_output_body.py index 861cbaea..91061388 100644 --- a/revengai/models/put_analysis_strings_request.py +++ b/revengai/models/list_dynamic_execution_runs_output_body.py @@ -18,17 +18,17 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from revengai.models.analysis_string_input import AnalysisStringInput +from revengai.models.dynamic_execution_run import DynamicExecutionRun from typing import Optional, Set from typing_extensions import Self -class PutAnalysisStringsRequest(BaseModel): +class ListDynamicExecutionRunsOutputBody(BaseModel): """ - PutAnalysisStringsRequest + ListDynamicExecutionRunsOutputBody """ # noqa: E501 - strings: List[AnalysisStringInput] = Field(description="The strings to add to the analysis") + runs: List[DynamicExecutionRun] = Field(description="The analysis's runs, newest first") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["strings"] + __properties: ClassVar[List[str]] = ["runs"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of PutAnalysisStringsRequest from a JSON string""" + """Create an instance of ListDynamicExecutionRunsOutputBody from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -71,13 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in strings (list) + # override the default output from pydantic by calling `to_dict()` of each item in runs (list) _items = [] - if self.strings: - for _item_strings in self.strings: - if _item_strings: - _items.append(_item_strings.to_dict()) - _dict['strings'] = _items + if self.runs: + for _item_runs in self.runs: + if _item_runs: + _items.append(_item_runs.to_dict()) + _dict['runs'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -87,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of PutAnalysisStringsRequest from a dict""" + """Create an instance of ListDynamicExecutionRunsOutputBody from a dict""" if obj is None: return None @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "strings": [AnalysisStringInput.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None + "runs": [DynamicExecutionRun.from_dict(_item) for _item in obj["runs"]] if obj.get("runs") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/analysis_strings_response.py b/revengai/models/list_malware_families_output_body.py similarity index 73% rename from revengai/models/analysis_strings_response.py rename to revengai/models/list_malware_families_output_body.py index b3e77482..15fa4b55 100644 --- a/revengai/models/analysis_strings_response.py +++ b/revengai/models/list_malware_families_output_body.py @@ -16,20 +16,19 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from revengai.models.string_functions import StringFunctions +from revengai.models.malware_family import MalwareFamily from typing import Optional, Set from typing_extensions import Self -class AnalysisStringsResponse(BaseModel): +class ListMalwareFamiliesOutputBody(BaseModel): """ - AnalysisStringsResponse + ListMalwareFamiliesOutputBody """ # noqa: E501 - strings: List[StringFunctions] = Field(description="The strings associated with the analysis") - total_strings: StrictInt = Field(description="The total number of strings associated with this analysis") + families: List[MalwareFamily] = Field(description="Families of the requested binaries, sorted by name") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["strings", "total_strings"] + __properties: ClassVar[List[str]] = ["families"] model_config = ConfigDict( populate_by_name=True, @@ -49,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AnalysisStringsResponse from a JSON string""" + """Create an instance of ListMalwareFamiliesOutputBody from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -72,13 +71,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in strings (list) + # override the default output from pydantic by calling `to_dict()` of each item in families (list) _items = [] - if self.strings: - for _item_strings in self.strings: - if _item_strings: - _items.append(_item_strings.to_dict()) - _dict['strings'] = _items + if self.families: + for _item_families in self.families: + if _item_families: + _items.append(_item_families.to_dict()) + _dict['families'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -88,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AnalysisStringsResponse from a dict""" + """Create an instance of ListMalwareFamiliesOutputBody from a dict""" if obj is None: return None @@ -96,8 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "strings": [StringFunctions.from_dict(_item) for _item in obj["strings"]] if obj.get("strings") is not None else None, - "total_strings": obj.get("total_strings") + "families": [MalwareFamily.from_dict(_item) for _item in obj["families"]] if obj.get("families") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/malware_family.py b/revengai/models/malware_family.py new file mode 100644 index 00000000..2dab99ce --- /dev/null +++ b/revengai/models/malware_family.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class MalwareFamily(BaseModel): + """ + MalwareFamily + """ # noqa: E501 + binary_ids: Optional[List[StrictInt]] = Field(description="Every binary in the RevEng.AI malware corpus in this family, matched or not") + matched_binary_ids: Optional[List[StrictInt]] = Field(description="Requested binaries in this family") + name: StrictStr = Field(description="Family name, lowercase without punctuation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["binary_ids", "matched_binary_ids", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MalwareFamily from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if binary_ids (nullable) is None + # and model_fields_set contains the field + if self.binary_ids is None and "binary_ids" in self.model_fields_set: + _dict['binary_ids'] = None + + # set to None if matched_binary_ids (nullable) is None + # and model_fields_set contains the field + if self.matched_binary_ids is None and "matched_binary_ids" in self.model_fields_set: + _dict['matched_binary_ids'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MalwareFamily from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "binary_ids": obj.get("binary_ids"), + "matched_binary_ids": obj.get("matched_binary_ids"), + "name": obj.get("name") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/revengai/models/function_string.py b/revengai/models/operation_cost_body.py similarity index 73% rename from revengai/models/function_string.py rename to revengai/models/operation_cost_body.py index 7df23edb..e1ec69fd 100644 --- a/revengai/models/function_string.py +++ b/revengai/models/operation_cost_body.py @@ -16,21 +16,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.string_source import StringSource +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Union from typing import Optional, Set from typing_extensions import Self -class FunctionString(BaseModel): +class OperationCostBody(BaseModel): """ - FunctionString + OperationCostBody """ # noqa: E501 - value: StrictStr = Field(description="The value of the string literal") - vaddr: StrictInt = Field(description="The vaddr of the string value") - source: Optional[StringSource] = Field(default=None, description="The source of the string") + base_credits: Union[StrictFloat, StrictInt] = Field(description="Credits the operation is estimated to use regardless of the binary's size") + credits_per_function: Union[StrictFloat, StrictInt] = Field(description="Credits the operation is estimated to use per function in the binary") + operation: StrictStr = Field(description="The operation, as requested when creating an analysis, or binary-analysis for the analysis itself") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["value", "vaddr", "source"] + __properties: ClassVar[List[str]] = ["base_credits", "credits_per_function", "operation"] model_config = ConfigDict( populate_by_name=True, @@ -50,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FunctionString from a JSON string""" + """Create an instance of OperationCostBody from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -82,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FunctionString from a dict""" + """Create an instance of OperationCostBody from a dict""" if obj is None: return None @@ -90,9 +89,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "value": obj.get("value"), - "vaddr": obj.get("vaddr"), - "source": obj.get("source") + "base_credits": obj.get("base_credits"), + "credits_per_function": obj.get("credits_per_function"), + "operation": obj.get("operation") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/string_functions.py b/revengai/models/recorded_feedback.py similarity index 64% rename from revengai/models/string_functions.py rename to revengai/models/recorded_feedback.py index ac584e0f..19c9ccd5 100644 --- a/revengai/models/string_functions.py +++ b/revengai/models/recorded_feedback.py @@ -16,22 +16,29 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional -from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction -from revengai.models.string_source import StringSource from typing import Optional, Set from typing_extensions import Self -class StringFunctions(BaseModel): +class RecordedFeedback(BaseModel): """ - This is a string with the functions where the string is used. A function string is a string literal referenced within a function. When analyzing stripped or obfuscated binaries, function strings can help identify the function’s purpose. + RecordedFeedback """ # noqa: E501 - value: StrictStr = Field(description="The value of the string literal") - functions: List[AppApiRestV2FunctionsResponsesFunction] = Field(description="The function ids the string literal was found within") - source: Optional[StringSource] = Field(default=None, description="The source of the string") + metadata: Optional[Dict[str, Any]] = Field(description="The context recorded with the feedback, or null when there is none") + sentiment: Optional[StrictStr] = Field(description="The sentiment the caller recorded, or null when they have not left any") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["value", "functions", "source"] + __properties: ClassVar[List[str]] = ["metadata", "sentiment"] + + @field_validator('sentiment') + def sentiment_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('POSITIVE', 'NEUTRAL', 'NEGATIVE', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -51,7 +58,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StringFunctions from a JSON string""" + """Create an instance of RecordedFeedback from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -74,23 +81,26 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in functions (list) - _items = [] - if self.functions: - for _item_functions in self.functions: - if _item_functions: - _items.append(_item_functions.to_dict()) - _dict['functions'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): _dict[_key] = _value + # set to None if metadata (nullable) is None + # and model_fields_set contains the field + if self.metadata is None and "metadata" in self.model_fields_set: + _dict['metadata'] = None + + # set to None if sentiment (nullable) is None + # and model_fields_set contains the field + if self.sentiment is None and "sentiment" in self.model_fields_set: + _dict['sentiment'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StringFunctions from a dict""" + """Create an instance of RecordedFeedback from a dict""" if obj is None: return None @@ -98,9 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "value": obj.get("value"), - "functions": [AppApiRestV2FunctionsResponsesFunction.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None, - "source": obj.get("source") + "metadata": obj.get("metadata"), + "sentiment": obj.get("sentiment") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/rendered_token.py b/revengai/models/rendered_token.py index ed7d7f51..7774cf2f 100644 --- a/revengai/models/rendered_token.py +++ b/revengai/models/rendered_token.py @@ -26,13 +26,14 @@ class RenderedToken(BaseModel): RenderedToken """ # noqa: E501 data_type_id: Optional[StrictInt] = Field(default=None, description="Data type this token names, or for a field the type that declares it. Scoped by the response's analysis_id.") + enum_value: Optional[StrictStr] = Field(default=None, description="Integer value of an enum the decompiler recovered a name for. Absent for an unnamed enum, which already renders as its value.") function_id: Optional[StrictInt] = Field(default=None, description="Function this token calls or names. Absent when the address reaches no function of this binary.") imported_function_id: Optional[StrictInt] = Field(default=None, description="Imported function this token calls. Set instead of function_id for an external call.") kind: StrictStr = Field(description="What the token names.") vaddr: Optional[StrictInt] = Field(default=None, description="Virtual address the token resolves to. Absent for a token with no address.") value: StrictStr = Field(description="Name the token resolves to.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["data_type_id", "function_id", "imported_function_id", "kind", "vaddr", "value"] + __properties: ClassVar[List[str]] = ["data_type_id", "enum_value", "function_id", "imported_function_id", "kind", "vaddr", "value"] @field_validator('kind') def kind_validate_enum(cls, value): @@ -100,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "data_type_id": obj.get("data_type_id"), + "enum_value": obj.get("enum_value"), "function_id": obj.get("function_id"), "imported_function_id": obj.get("imported_function_id"), "kind": obj.get("kind"), diff --git a/revengai/models/app_api_rest_v2_functions_responses_function.py b/revengai/models/size_bucket_body.py similarity index 74% rename from revengai/models/app_api_rest_v2_functions_responses_function.py rename to revengai/models/size_bucket_body.py index a5987a14..a42795bd 100644 --- a/revengai/models/app_api_rest_v2_functions_responses_function.py +++ b/revengai/models/size_bucket_body.py @@ -16,19 +16,20 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self -class AppApiRestV2FunctionsResponsesFunction(BaseModel): +class SizeBucketBody(BaseModel): """ - Function schema used in function strings response. + SizeBucketBody """ # noqa: E501 - function_id: Optional[StrictInt] = None - function_vaddr: StrictInt = Field(description="Function virtual address") + below_bytes: Optional[StrictInt] = Field(description="Exclusive upper bound of the bucket, in bytes. Null for the last bucket, which has no upper bound.") + functions: StrictInt = Field(description="Functions a binary this size is estimated to have") + uncertain: StrictBool = Field(description="True where too few operations have run on binaries this size for the estimate to be reliable") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["function_id", "function_vaddr"] + __properties: ClassVar[List[str]] = ["below_bytes", "functions", "uncertain"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AppApiRestV2FunctionsResponsesFunction from a JSON string""" + """Create an instance of SizeBucketBody from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -76,16 +77,16 @@ def to_dict(self) -> Dict[str, Any]: for _key, _value in self.additional_properties.items(): _dict[_key] = _value - # set to None if function_id (nullable) is None + # set to None if below_bytes (nullable) is None # and model_fields_set contains the field - if self.function_id is None and "function_id" in self.model_fields_set: - _dict['function_id'] = None + if self.below_bytes is None and "below_bytes" in self.model_fields_set: + _dict['below_bytes'] = None return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AppApiRestV2FunctionsResponsesFunction from a dict""" + """Create an instance of SizeBucketBody from a dict""" if obj is None: return None @@ -93,8 +94,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "function_id": obj.get("function_id"), - "function_vaddr": obj.get("function_vaddr") + "below_bytes": obj.get("below_bytes"), + "functions": obj.get("functions"), + "uncertain": obj.get("uncertain") }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/revengai/models/status.py b/revengai/models/status.py index cce7d0c3..663089ce 100644 --- a/revengai/models/status.py +++ b/revengai/models/status.py @@ -36,8 +36,8 @@ class Status(BaseModel): @field_validator('code') def code_validate_enum(cls, value): """Validates the enum""" - if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): - raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") + if value not in set(['ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REAUTH_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('ACCESS_DENIED', 'ALREADY_EXISTS', 'ANALYSIS_NOT_READY', 'BAD_REQUEST', 'CAPTCHA_FAILED', 'CLIENT_CLOSED_REQUEST', 'CONFLICT', 'CONVERSATION_NOT_FOUND', 'DISPOSABLE_EMAIL_NOT_ALLOWED', 'DOMAIN_ALREADY_CLAIMED', 'DOMAIN_VERIFICATION_PENDING', 'DYNAMIC_EXECUTION_INCOMPLETE', 'EMAIL_NOT_VERIFIED', 'EXTERNAL_USER', 'FORBIDDEN', 'GATEWAY_TIMEOUT', 'GROUP_HAS_MEMBERS', 'INSUFFICIENT_CREDITS', 'INTERNAL_ERROR', 'INTERNAL_ISSUER', 'INVALID_CONVERSATION_ID', 'INVALID_CREDENTIALS', 'INVALID_INVITE_CODE', 'INVALID_RESET_CODE', 'INVESTIGATION_BUDGET_SPENT', 'LAST_ORG_OWNER', 'LAST_TEAM_ADMIN', 'LAST_TEAM_MEMBER', 'LINKED_TO_ORG', 'METHOD_NOT_ALLOWED', 'NOT_ACCEPTABLE', 'NOT_FOUND', 'NOT_IMPLEMENTED', 'NO_ACTIVE_RUN', 'NO_PENDING_CONFIRMATION', 'NO_VIRUSTOTAL_KEY', 'OIDC_DISCOVERY_FAILED', 'OPERATION_PREREQUISITE_NOT_MET', 'PASSWORD_RESET_REQUIRED', 'PAYMENT_REQUIRED', 'PRECONDITION_FAILED', 'REAUTH_REQUIRED', 'REPORT_RENDER_FAILED', 'REQUEST_ENTITY_TOO_LARGE', 'RUN_ALREADY_ACTIVE', 'SELF_DELETION_NOT_ALLOWED', 'SERVICE_UNAVAILABLE', 'TOKEN_EXPIRED', 'TOKEN_REUSED', 'TOO_MANY_REQUESTS', 'UNAUTHORIZED', 'UNSUPPORTED_MEDIA_TYPE', 'VALIDATION_FAILED', 'VERIFICATION_EXPIRED', 'VERIFICATION_NOT_FOUND', 'unknown_default_open_api')") return value model_config = ConfigDict( diff --git a/revengai/models/string_source.py b/revengai/models/string_source.py deleted file mode 100644 index 03c1696f..00000000 --- a/revengai/models/string_source.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -from enum import Enum -from typing_extensions import Self - - -class StringSource(str, Enum): - """ - StringSource - """ - - """ - allowed enum values - """ - SYSTEM = 'SYSTEM' - USER = 'USER' - AI_AGENT = 'AI_AGENT' - UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api' - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of StringSource from a JSON string""" - return cls(json.loads(json_str)) - - @classmethod - def _missing_(cls, value): - """Fall back to the unknown default for values not defined in the SDK.""" - return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API") - - diff --git a/revengai/models/tool_call_result_data.py b/revengai/models/tool_call_result_data.py index e72484c1..365c20f5 100644 --- a/revengai/models/tool_call_result_data.py +++ b/revengai/models/tool_call_result_data.py @@ -26,13 +26,15 @@ class ToolCallResultData(BaseModel): """ ToolCallResultData """ # noqa: E501 + binary_name: Optional[StrictStr] = None + function_name: Optional[StrictStr] = None is_error: Optional[StrictBool] = None result: Optional[StrictStr] = None tool_call_id: Optional[StrictStr] = None tool_name: Optional[StrictStr] = None updated: Optional[List[EntityUpdate]] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["is_error", "result", "tool_call_id", "tool_name", "updated"] + __properties: ClassVar[List[str]] = ["binary_name", "function_name", "is_error", "result", "tool_call_id", "tool_name", "updated"] model_config = ConfigDict( populate_by_name=True, @@ -104,6 +106,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "binary_name": obj.get("binary_name"), + "function_name": obj.get("function_name"), "is_error": obj.get("is_error"), "result": obj.get("result"), "tool_call_id": obj.get("tool_call_id"), diff --git a/revengai/models/triage_function.py b/revengai/models/triage_function.py index fdbb8067..df841dac 100644 --- a/revengai/models/triage_function.py +++ b/revengai/models/triage_function.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union +from revengai.models.capability_implementation import CapabilityImplementation from typing import Optional, Set from typing_extensions import Self @@ -27,11 +28,12 @@ class TriageFunction(BaseModel): """ # noqa: E501 address: StrictInt = Field(description="Virtual address of the function") capabilities: Optional[List[StrictStr]] = Field(description="Capability categories the function exhibits") + capability_implementations: Optional[List[CapabilityImplementation]] = Field(default=None, description="How the function implements each assigned capability. Absent when the run did not record any.") id: StrictInt = Field(description="ID of the function") score: Union[StrictFloat, StrictInt] = Field(description="Maliciousness score for the function, 0 to 1") summary: StrictStr = Field(description="What the function does") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["address", "capabilities", "id", "score", "summary"] + __properties: ClassVar[List[str]] = ["address", "capabilities", "capability_implementations", "id", "score", "summary"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +76,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in capability_implementations (list) + _items = [] + if self.capability_implementations: + for _item_capability_implementations in self.capability_implementations: + if _item_capability_implementations: + _items.append(_item_capability_implementations.to_dict()) + _dict['capability_implementations'] = _items # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -84,6 +93,11 @@ def to_dict(self) -> Dict[str, Any]: if self.capabilities is None and "capabilities" in self.model_fields_set: _dict['capabilities'] = None + # set to None if capability_implementations (nullable) is None + # and model_fields_set contains the field + if self.capability_implementations is None and "capability_implementations" in self.model_fields_set: + _dict['capability_implementations'] = None + return _dict @classmethod @@ -98,6 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "address": obj.get("address"), "capabilities": obj.get("capabilities"), + "capability_implementations": [CapabilityImplementation.from_dict(_item) for _item in obj["capability_implementations"]] if obj.get("capability_implementations") is not None else None, "id": obj.get("id"), "score": obj.get("score"), "summary": obj.get("summary") diff --git a/revengai/models/update_profile_input_body.py b/revengai/models/update_profile_input_body.py index f4c6606a..ea6507a2 100644 --- a/revengai/models/update_profile_input_body.py +++ b/revengai/models/update_profile_input_body.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -26,6 +26,7 @@ class UpdateProfileInputBody(BaseModel): """ UpdateProfileInputBody """ # noqa: E501 + agent_chat_layout: Optional[StrictStr] = Field(default=None, description="Agent chat layout: floating over the page, or fixed below it") default_team_id: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Default team ID") first_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="First name") hide_ai_decompilation_comments: Optional[StrictBool] = Field(default=None, description="Hide AI decompilation comments across the platform") @@ -34,7 +35,17 @@ class UpdateProfileInputBody(BaseModel): time_zone: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="IANA time zone") username: Optional[Annotated[str, Field(strict=True, max_length=255)]] = Field(default=None, description="Username") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username"] + __properties: ClassVar[List[str]] = ["agent_chat_layout", "default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username"] + + @field_validator('agent_chat_layout') + def agent_chat_layout_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['floating', 'fixed', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('floating', 'fixed', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -94,6 +105,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "agent_chat_layout": obj.get("agent_chat_layout"), "default_team_id": obj.get("default_team_id"), "first_name": obj.get("first_name"), "hide_ai_decompilation_comments": obj.get("hide_ai_decompilation_comments"), diff --git a/revengai/models/user_profile.py b/revengai/models/user_profile.py index 623b2ecc..640186f3 100644 --- a/revengai/models/user_profile.py +++ b/revengai/models/user_profile.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -25,6 +25,7 @@ class UserProfile(BaseModel): """ UserProfile """ # noqa: E501 + agent_chat_layout: StrictStr default_team_id: Optional[StrictInt] = None first_name: StrictStr hide_ai_decompilation_comments: StrictBool @@ -33,7 +34,14 @@ class UserProfile(BaseModel): time_zone: StrictStr username: StrictStr additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username"] + __properties: ClassVar[List[str]] = ["agent_chat_layout", "default_team_id", "first_name", "hide_ai_decompilation_comments", "hide_example_binaries", "last_name", "time_zone", "username"] + + @field_validator('agent_chat_layout') + def agent_chat_layout_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['floating', 'fixed', 'unknown_default_open_api']): + raise ValueError("must be one of enum values ('floating', 'fixed', 'unknown_default_open_api')") + return value model_config = ConfigDict( populate_by_name=True, @@ -93,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "agent_chat_layout": obj.get("agent_chat_layout"), "default_team_id": obj.get("default_team_id"), "first_name": obj.get("first_name"), "hide_ai_decompilation_comments": obj.get("hide_ai_decompilation_comments"),