Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.123.0
v3.124.0
1 change: 1 addition & 0 deletions docs/Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**can_export_symbols** | **bool** | |
**can_generate_pdf_reports** | **bool** | |
**can_use_ai_malware_analysis** | **bool** | |
**can_use_composition_analysis** | **bool** | |
**can_use_malware_sandbox** | **bool** | |
**can_use_private_analyses** | **bool** | |

Expand Down
12 changes: 8 additions & 4 deletions docs/SearchApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Method | HTTP request | Description


# **search_binaries**
> BaseResponseBinarySearchResponse search_binaries(page=page, page_size=page_size, 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)
> BaseResponseBinarySearchResponse search_binaries(page=page, page_size=page_size, 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)

Binaries search

Expand Down Expand Up @@ -62,10 +62,11 @@ with revengai.ApiClient(configuration) as api_client:
model_name = 'model_name_example' # str | The name of the model used to analyze the binary the function belongs to (optional)
user_files_only = False # bool | Whether to only search user's uploaded files (optional) (default to False)
exclude_binary_id = 56 # int | A binary ID to exclude from the results (optional)
user_ids = [56] # List[int] | Restrict the search to binaries owned by these user IDs (optional)

try:
# Binaries search
api_response = api_instance.search_binaries(page=page, page_size=page_size, 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)
api_response = api_instance.search_binaries(page=page, page_size=page_size, 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)
print("The response of SearchApi->search_binaries:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -87,6 +88,7 @@ Name | Type | Description | Notes
**model_name** | **str**| The name of the model used to analyze the binary the function belongs to | [optional]
**user_files_only** | **bool**| Whether to only search user's uploaded files | [optional] [default to False]
**exclude_binary_id** | **int**| A binary ID to exclude from the results | [optional]
**user_ids** | [**List[int]**](int.md)| Restrict the search to binaries owned by these user IDs | [optional]

### Return type

Expand All @@ -111,7 +113,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)

# **search_collections**
> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction)
> BaseResponseCollectionSearchResponse search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction, user_ids=user_ids)

Collections search

Expand Down Expand Up @@ -166,10 +168,11 @@ with revengai.ApiClient(configuration) as api_client:
filters = [revengai.Filters()] # List[Filters] | The filters to be used for the search (optional)
order_by = revengai.AppApiRestV2CollectionsEnumsOrderBy() # AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results (optional)
order_by_direction = revengai.Order() # Order | The order direction in which to return results (optional)
user_ids = [56] # List[int] | Restrict the search to collections owned by these user IDs (optional)

try:
# Collections search
api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction)
api_response = api_instance.search_collections(page=page, page_size=page_size, partial_collection_name=partial_collection_name, partial_binary_name=partial_binary_name, partial_binary_sha256=partial_binary_sha256, tags=tags, filters=filters, order_by=order_by, order_by_direction=order_by_direction, user_ids=user_ids)
print("The response of SearchApi->search_collections:\n")
pprint(api_response)
except Exception as e:
Expand All @@ -192,6 +195,7 @@ Name | Type | Description | Notes
**filters** | [**List[Filters]**](Filters.md)| The filters to be used for the search | [optional]
**order_by** | [**AppApiRestV2CollectionsEnumsOrderBy**](.md)| The field to sort the order by in the results | [optional]
**order_by_direction** | [**Order**](.md)| The order direction in which to return results | [optional]
**user_ids** | [**List[int]**](int.md)| Restrict the search to collections owned by these user IDs | [optional]

### Return type

Expand Down
2 changes: 1 addition & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v3.123.0"
__version__ = "v3.124.0"

# Define package exports
__all__ = [
Expand Down
36 changes: 36 additions & 0 deletions revengai/api/search_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def search_binaries(
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -88,6 +89,8 @@ def search_binaries(
:type user_files_only: bool
:param exclude_binary_id: A binary ID to exclude from the results
:type exclude_binary_id: int
:param user_ids: Restrict the search to binaries owned by these user IDs
:type user_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
Expand Down Expand Up @@ -119,6 +122,7 @@ def search_binaries(
model_name=model_name,
user_files_only=user_files_only,
exclude_binary_id=exclude_binary_id,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -151,6 +155,7 @@ def search_binaries_with_http_info(
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -184,6 +189,8 @@ def search_binaries_with_http_info(
:type user_files_only: bool
:param exclude_binary_id: A binary ID to exclude from the results
:type exclude_binary_id: int
:param user_ids: Restrict the search to binaries owned by these user IDs
:type user_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
Expand Down Expand Up @@ -215,6 +222,7 @@ def search_binaries_with_http_info(
model_name=model_name,
user_files_only=user_files_only,
exclude_binary_id=exclude_binary_id,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -247,6 +255,7 @@ def search_binaries_without_preload_content(
model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
exclude_binary_id: Annotated[Optional[StrictInt], Field(description="A binary ID to exclude from the results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to binaries owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -280,6 +289,8 @@ def search_binaries_without_preload_content(
:type user_files_only: bool
:param exclude_binary_id: A binary ID to exclude from the results
:type exclude_binary_id: int
:param user_ids: Restrict the search to binaries owned by these user IDs
:type user_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
Expand Down Expand Up @@ -311,6 +322,7 @@ def search_binaries_without_preload_content(
model_name=model_name,
user_files_only=user_files_only,
exclude_binary_id=exclude_binary_id,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -338,6 +350,7 @@ def _search_binaries_serialize(
model_name,
user_files_only,
exclude_binary_id,
user_ids,
_request_auth,
_content_type,
_headers,
Expand All @@ -348,6 +361,7 @@ def _search_binaries_serialize(

_collection_formats: Dict[str, str] = {
'tags': 'multi',
'user_ids': 'multi',
}

_path_params: Dict[str, str] = {}
Expand Down Expand Up @@ -393,6 +407,10 @@ def _search_binaries_serialize(

_query_params.append(('exclude_binary_id', exclude_binary_id))

if user_ids is not None:

_query_params.append(('user_ids', user_ids))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down Expand Up @@ -443,6 +461,7 @@ def search_collections(
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -478,6 +497,8 @@ def search_collections(
:type order_by: AppApiRestV2CollectionsEnumsOrderBy
:param order_by_direction: The order direction in which to return results
:type order_by_direction: Order
:param user_ids: Restrict the search to collections owned by these user IDs
:type user_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
Expand Down Expand Up @@ -510,6 +531,7 @@ def search_collections(
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -543,6 +565,7 @@ def search_collections_with_http_info(
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -578,6 +601,8 @@ def search_collections_with_http_info(
:type order_by: AppApiRestV2CollectionsEnumsOrderBy
:param order_by_direction: The order direction in which to return results
:type order_by_direction: Order
:param user_ids: Restrict the search to collections owned by these user IDs
:type user_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
Expand Down Expand Up @@ -610,6 +635,7 @@ def search_collections_with_http_info(
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -643,6 +669,7 @@ def search_collections_without_preload_content(
filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
user_ids: Annotated[Optional[List[StrictInt]], Field(description="Restrict the search to collections owned by these user IDs")] = None,
_request_timeout: Union[
None,
Annotated[StrictFloat, Field(gt=0)],
Expand Down Expand Up @@ -678,6 +705,8 @@ def search_collections_without_preload_content(
:type order_by: AppApiRestV2CollectionsEnumsOrderBy
:param order_by_direction: The order direction in which to return results
:type order_by_direction: Order
:param user_ids: Restrict the search to collections owned by these user IDs
:type user_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
Expand Down Expand Up @@ -710,6 +739,7 @@ def search_collections_without_preload_content(
filters=filters,
order_by=order_by,
order_by_direction=order_by_direction,
user_ids=user_ids,
_request_auth=_request_auth,
_content_type=_content_type,
_headers=_headers,
Expand Down Expand Up @@ -738,6 +768,7 @@ def _search_collections_serialize(
filters,
order_by,
order_by_direction,
user_ids,
_request_auth,
_content_type,
_headers,
Expand All @@ -749,6 +780,7 @@ def _search_collections_serialize(
_collection_formats: Dict[str, str] = {
'tags': 'multi',
'filters': 'multi',
'user_ids': 'multi',
}

_path_params: Dict[str, str] = {}
Expand Down Expand Up @@ -798,6 +830,10 @@ def _search_collections_serialize(

_query_params.append(('order_by_direction', order_by_direction.value))

if user_ids is not None:

_query_params.append(('user_ids', user_ids))

# process the header parameters
# process the form parameters
# process the body parameter
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/v3.123.0/python'
self.user_agent = 'OpenAPI-Generator/v3.124.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: v3.123.0\n"\
"SDK Package Version: v3.123.0".\
"Version of the API: v3.124.0\n"\
"SDK Package Version: v3.124.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
4 changes: 3 additions & 1 deletion revengai/models/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ class Permissions(BaseModel):
can_export_symbols: StrictBool
can_generate_pdf_reports: StrictBool
can_use_ai_malware_analysis: StrictBool
can_use_composition_analysis: StrictBool
can_use_malware_sandbox: StrictBool
can_use_private_analyses: StrictBool
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["can_export_symbols", "can_generate_pdf_reports", "can_use_ai_malware_analysis", "can_use_malware_sandbox", "can_use_private_analyses"]
__properties: ClassVar[List[str]] = ["can_export_symbols", "can_generate_pdf_reports", "can_use_ai_malware_analysis", "can_use_composition_analysis", "can_use_malware_sandbox", "can_use_private_analyses"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -94,6 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"can_export_symbols": obj.get("can_export_symbols"),
"can_generate_pdf_reports": obj.get("can_generate_pdf_reports"),
"can_use_ai_malware_analysis": obj.get("can_use_ai_malware_analysis"),
"can_use_composition_analysis": obj.get("can_use_composition_analysis"),
"can_use_malware_sandbox": obj.get("can_use_malware_sandbox"),
"can_use_private_analyses": obj.get("can_use_private_analyses")
})
Expand Down