From 294f38157e2ff9dfabd633b663d23e34bec66b28 Mon Sep 17 00:00:00 2001 From: "fingerprint-dx-team-actions-runner[bot]" <197604345+fingerprint-dx-team-actions-runner[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 15:38:12 +0000 Subject: [PATCH 1/5] feat: sync OpenAPI schema to v3.9.0 --- .../error-response-503-events-search.md | 5 ++ .changeset/error-response-503-events.md | 5 ++ .changeset/pre.json | 8 +++ .schema-version | 2 +- docs/DeviceDetails.md | 2 +- docs/FingerprintApi.md | 18 ++--- fingerprint_server_sdk/api/fingerprint_api.py | 70 ++++++++++--------- .../models/device_details.py | 3 +- res/fingerprint-server-api.yaml | 68 +++++++++--------- test/mocks/errors/400_edge_ip_required.json | 6 ++ test/mocks/errors/400_edge_unknown_field.json | 6 ++ .../errors/400_request_read_timeout.json | 6 ++ test/mocks/errors/413_payload_too_large.json | 6 ++ .../mocks/errors/503_service_unavailable.json | 6 ++ .../mocks/events/get_event_with_edge_200.json | 51 ++++++++++++++ 15 files changed, 187 insertions(+), 75 deletions(-) create mode 100644 .changeset/error-response-503-events-search.md create mode 100644 .changeset/error-response-503-events.md create mode 100644 .changeset/pre.json create mode 100644 test/mocks/errors/400_edge_ip_required.json create mode 100644 test/mocks/errors/400_edge_unknown_field.json create mode 100644 test/mocks/errors/400_request_read_timeout.json create mode 100644 test/mocks/errors/413_payload_too_large.json create mode 100644 test/mocks/errors/503_service_unavailable.json create mode 100644 test/mocks/events/get_event_with_edge_200.json diff --git a/.changeset/error-response-503-events-search.md b/.changeset/error-response-503-events-search.md new file mode 100644 index 00000000..f70fce61 --- /dev/null +++ b/.changeset/error-response-503-events-search.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/python-sdk': minor +--- + +**events-search**: Add `503` Service Temporarily Unavailable response to the Events Search endpoint diff --git a/.changeset/error-response-503-events.md b/.changeset/error-response-503-events.md new file mode 100644 index 00000000..ac413c14 --- /dev/null +++ b/.changeset/error-response-503-events.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/python-sdk': minor +--- + +**events**: Add `503` Service Temporarily Unavailable response to the Get Event endpoint diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..8186e344 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "@fingerprint/python-sdk": "9.8.0" + }, + "changesets": [] +} diff --git a/.schema-version b/.schema-version index ea535dc5..65aee83a 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.8.0 \ No newline at end of file +v3.9.0 \ No newline at end of file diff --git a/docs/DeviceDetails.md b/docs/DeviceDetails.md index b79e8631..f9f34dc1 100644 --- a/docs/DeviceDetails.md +++ b/docs/DeviceDetails.md @@ -5,7 +5,7 @@ Native, SDK-collected mobile device identification signals (manufacturer, model, Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **device_manufacturer** | **str** | Raw device manufacturer string as reported by the device OS. Not normalized: casing is vendor-defined (samsung, Xiaomi, OPPO, HUAWEI). Always `Apple` on iOS. | [optional] -**device_model** | **str** | Raw device model identifier, as reported by the mobile OS. | [optional] +**device_model** | **str** | Raw device model identifier, as reported by the mobile OS. On Android, this is the vendor-defined model string (e.g., `SM-G991U`). On iOS, this is an Apple board code (e.g., `D84AP`). | [optional] **os_version** | **str** | Mobile operating system version. Component count is not fixed and must not be assumed by consumers: iOS always reports `major.minor.patch` (e.g. `17.4.1`), while Android's precision varies by OS era and which raw signal resolved it — `major` only (`9`, `13`) since Android 10 dropped point releases, `major.minor` (`16.1`) from Android 16 (API 36+) reintroducing a minor component, or a genuine `major.minor.patch` (`8.1.0`) on pre-Android 10 devices that shipped real point releases. Never a fabricated/zero-padded component. | [optional] [[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/FingerprintApi.md b/docs/FingerprintApi.md index 795ae2d8..590a711c 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -191,14 +191,15 @@ Name | Type | Description | Notes **400** | Bad request. The event ID provided is not valid. | - | **403** | Forbidden. Access to this API is denied. | - | **404** | Not found. The event ID cannot be found in this workspace's data. | - | -**429** | Too Many Requests. The request is throttled. To protect service stability during rare periods of extreme load, we may return HTTP 429 responses with message `too many search requests` even if you are within your assigned rate limits. | - | +**429** | Too Many Requests. The request is throttled. | - | **500** | Workspace error. | - | -**504** | Gateway Timeout. Search execution exceeded the allowed timeout window. | - | +**503** | Service Temporarily Unavailable. | - | +**504** | Gateway Timeout. | - | [[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_events** -> EventSearch search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, source=source, active_call=active_call) +> EventSearch search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, active_call=active_call, source=source) Search events @@ -310,12 +311,12 @@ total_hits: int = 100 # When set, the response will include a `total_hits` prope tor_node: bool = True # Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) incremental_identification_status: SearchEventsIncrementalIdentificationStatus = fingerprint_server_sdk.SearchEventsIncrementalIdentificationStatus() # Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) simulator: bool = True # Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) -source: List[SearchEventsSource] = [fingerprint_server_sdk.SearchEventsSource()] # Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) active_call: bool = True # Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) +source: List[SearchEventsSource] = [fingerprint_server_sdk.SearchEventsSource()] # Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) try: # Search events - api_response = api_instance.search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, source=source, active_call=active_call) + api_response = api_instance.search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, active_call=active_call, source=source) print("The response of FingerprintApi->search_events:\n") pprint(api_response) except ApiException as e: @@ -384,8 +385,8 @@ Name | Type | Description | Notes **tor_node** | **bool**| Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. | [optional] **incremental_identification_status** | [**SearchEventsIncrementalIdentificationStatus**](.md)| Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. | [optional] **simulator** | **bool**| Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. | [optional] - **source** | [**List[SearchEventsSource]**](SearchEventsSource.md)| Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] **active_call** | **bool**| Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. | [optional] + **source** | [**List[SearchEventsSource]**](SearchEventsSource.md)| Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] ### Return type @@ -404,9 +405,10 @@ Name | Type | Description | Notes **400** | Bad request. One or more supplied search parameters are invalid, or a required parameter is missing. | - | **403** | Forbidden. Access to this API is denied. | - | **404** | Not found. The requested visitor does not exist in this workspace's data. | - | -**429** | Too Many Requests. The request is throttled. To protect service stability during rare periods of extreme load, we may return HTTP 429 responses with message `too many search requests` even if you are within your assigned rate limits. | - | +**429** | Too Many Requests. The request is throttled. | - | **500** | Workspace error. | - | -**504** | Gateway Timeout. Search execution exceeded the allowed timeout window. | - | +**503** | Service Temporarily Unavailable. | - | +**504** | Gateway Timeout. | - | [[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/fingerprint_server_sdk/api/fingerprint_api.py b/fingerprint_server_sdk/api/fingerprint_api.py index aca258fb..7fcd97a6 100644 --- a/fingerprint_server_sdk/api/fingerprint_api.py +++ b/fingerprint_server_sdk/api/fingerprint_api.py @@ -363,6 +363,7 @@ def get_event( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -438,6 +439,7 @@ def get_event_with_http_info( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -513,6 +515,7 @@ def get_event_without_preload_content( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -870,18 +873,18 @@ def search_events( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - source: Annotated[ - Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], - Field( - description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' - ), - ] = None, active_call: Annotated[ Optional[StrictBool], Field( description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' ), ] = None, + source: Annotated[ + Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], + Field( + description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -995,10 +998,10 @@ def search_events( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. - :type source: List[SearchEventsSource] :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. :type active_call: bool + :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. + :type source: List[SearchEventsSource] :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 @@ -1068,8 +1071,8 @@ def search_events( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - source=source, active_call=active_call, + source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1082,6 +1085,7 @@ def search_events( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -1393,18 +1397,18 @@ def search_events_with_http_info( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - source: Annotated[ - Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], - Field( - description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' - ), - ] = None, active_call: Annotated[ Optional[StrictBool], Field( description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' ), ] = None, + source: Annotated[ + Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], + Field( + description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1518,10 +1522,10 @@ def search_events_with_http_info( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. - :type source: List[SearchEventsSource] :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. :type active_call: bool + :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. + :type source: List[SearchEventsSource] :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 @@ -1591,8 +1595,8 @@ def search_events_with_http_info( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - source=source, active_call=active_call, + source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1605,6 +1609,7 @@ def search_events_with_http_info( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -1916,18 +1921,18 @@ def search_events_without_preload_content( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - source: Annotated[ - Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], - Field( - description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' - ), - ] = None, active_call: Annotated[ Optional[StrictBool], Field( description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' ), ] = None, + source: Annotated[ + Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], + Field( + description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2041,10 +2046,10 @@ def search_events_without_preload_content( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. - :type source: List[SearchEventsSource] :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. :type active_call: bool + :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. + :type source: List[SearchEventsSource] :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 @@ -2114,8 +2119,8 @@ def search_events_without_preload_content( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - source=source, active_call=active_call, + source=source, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2128,6 +2133,7 @@ def search_events_without_preload_content( '404': 'ErrorResponse', '429': 'ErrorResponse', '500': 'ErrorResponse', + '503': 'ErrorResponse', '504': 'ErrorResponse', } @@ -2186,8 +2192,8 @@ def _search_events_serialize( tor_node: Optional[bool], incremental_identification_status: Optional[SearchEventsIncrementalIdentificationStatus], simulator: Optional[bool], - source: Optional[list[SearchEventsSource]], active_call: Optional[bool], + source: Optional[list[SearchEventsSource]], _request_auth: Optional[dict[StrictStr, Any]], _content_type: Optional[StrictStr], _headers: Optional[dict[StrictStr, Any]], @@ -2425,14 +2431,14 @@ def _search_events_serialize( if simulator is not None: _query_params.append(('simulator', simulator)) - # process the query parameters - if source is not None: - _query_params.append(('source', source)) - # process the query parameters if active_call is not None: _query_params.append(('active_call', active_call)) + # process the query parameters + if source is not None: + _query_params.append(('source', source)) + # set the HTTP header `Accept` if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) diff --git a/fingerprint_server_sdk/models/device_details.py b/fingerprint_server_sdk/models/device_details.py index 34a71b99..3d4338c6 100644 --- a/fingerprint_server_sdk/models/device_details.py +++ b/fingerprint_server_sdk/models/device_details.py @@ -32,7 +32,8 @@ class DeviceDetails(BaseModel): description='Raw device manufacturer string as reported by the device OS. Not normalized: casing is vendor-defined (samsung, Xiaomi, OPPO, HUAWEI). Always `Apple` on iOS.', ) device_model: Optional[StrictStr] = Field( - default=None, description='Raw device model identifier, as reported by the mobile OS.' + default=None, + description='Raw device model identifier, as reported by the mobile OS. On Android, this is the vendor-defined model string (e.g., `SM-G991U`). On iOS, this is an Apple board code (e.g., `D84AP`).', ) os_version: Optional[StrictStr] = Field( default=None, diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index c71de893..6b178b67 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -17,8 +17,7 @@ info: email: support@fingerprint.com license: name: MIT - url: >- - https://github.com/fingerprintjs/fingerprint-pro-server-api-openapi/blob/main/LICENSE + url: https://github.com/fingerprintjs/openapi/blob/main/LICENSE tags: - name: Fingerprint description: >- @@ -104,12 +103,8 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' '429': - description: > + description: | Too Many Requests. The request is throttled. - - To protect service stability during rare periods of extreme load, we - may return HTTP 429 responses with message `too many search - requests` even if you are within your assigned rate limits. content: application/json: schema: @@ -120,10 +115,15 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + '503': + description: Service Temporarily Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '504': - description: >- - Gateway Timeout. Search execution exceeded the allowed timeout - window. + description: Gateway Timeout. + x-deprecated-response: true content: application/json: schema: @@ -940,6 +940,18 @@ paths: > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. + - name: active_call + in: query + schema: + type: boolean + description: > + Filter events by Active Call Detection result on mobile devices. + + + > Note: When using this parameter, only events with the + `active_call` property set to `true` or `false` are returned. Events + without an `active_call` Smart Signal result are left out of the + response. - name: source in: query required: false @@ -963,18 +975,6 @@ paths: > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. - - name: active_call - in: query - schema: - type: boolean - description: > - Filter events by Active Call Detection result on mobile devices. - - - > Note: When using this parameter, only events with the - `active_call` property set to `true` or `false` are returned. Events - without an `active_call` Smart Signal result are left out of the - response. responses: '200': description: Events matching the filter(s). @@ -1005,12 +1005,8 @@ paths: schema: $ref: '#/components/schemas/ErrorResponse' '429': - description: > + description: | Too Many Requests. The request is throttled. - - To protect service stability during rare periods of extreme load, we - may return HTTP 429 responses with message `too many search - requests` even if you are within your assigned rate limits. content: application/json: schema: @@ -1021,10 +1017,15 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorResponse' + '503': + description: Service Temporarily Unavailable. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' '504': - description: >- - Gateway Timeout. Search execution exceeded the allowed timeout - window. + description: Gateway Timeout. + x-deprecated-response: true content: application/json: schema: @@ -2088,8 +2089,11 @@ components: type: string examples: - SM-G991U - - iPhone14,5 - description: Raw device model identifier, as reported by the mobile OS. + - D84AP + description: >- + Raw device model identifier, as reported by the mobile OS. On + Android, this is the vendor-defined model string (e.g., `SM-G991U`). + On iOS, this is an Apple board code (e.g., `D84AP`). os_version: type: string examples: diff --git a/test/mocks/errors/400_edge_ip_required.json b/test/mocks/errors/400_edge_ip_required.json new file mode 100644 index 00000000..8f055f8f --- /dev/null +++ b/test/mocks/errors/400_edge_ip_required.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_cannot_be_parsed", + "message": "at least one of ipv4_address or ipv6_address is required" + } +} diff --git a/test/mocks/errors/400_edge_unknown_field.json b/test/mocks/errors/400_edge_unknown_field.json new file mode 100644 index 00000000..c0a153ef --- /dev/null +++ b/test/mocks/errors/400_edge_unknown_field.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_cannot_be_parsed", + "message": "request body contains an unknown field \"unknown\"" + } +} \ No newline at end of file diff --git a/test/mocks/errors/400_request_read_timeout.json b/test/mocks/errors/400_request_read_timeout.json new file mode 100644 index 00000000..89daaca8 --- /dev/null +++ b/test/mocks/errors/400_request_read_timeout.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "request_read_timeout", + "message": "request read timeout" + } +} \ No newline at end of file diff --git a/test/mocks/errors/413_payload_too_large.json b/test/mocks/errors/413_payload_too_large.json new file mode 100644 index 00000000..00a1c6f9 --- /dev/null +++ b/test/mocks/errors/413_payload_too_large.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "payload_too_large", + "message": "payload too large" + } +} diff --git a/test/mocks/errors/503_service_unavailable.json b/test/mocks/errors/503_service_unavailable.json new file mode 100644 index 00000000..aebf5cdd --- /dev/null +++ b/test/mocks/errors/503_service_unavailable.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "service_unavailable", + "message": "service temporarily unavailable" + } +} diff --git a/test/mocks/events/get_event_with_edge_200.json b/test/mocks/events/get_event_with_edge_200.json new file mode 100644 index 00000000..387c86eb --- /dev/null +++ b/test/mocks/events/get_event_with_edge_200.json @@ -0,0 +1,51 @@ +{ + "event_id": "1758130560902.8tRtrH", + "timestamp": 1758130560902, + "source": "edge", + "url": "https://example.com/login?foo=bar", + "bot_info": { + "category": "ai_agent", + "provider": "OpenAI", + "provider_url": "https://openai.com", + "name": "ChatGPT Agent", + "identity": "signed", + "confidence": "high" + }, + "ip_info": { + "v4": { + "address": "104.210.139.192", + "geolocation": { + "accuracy_radius": 20, + "latitude": 29.42412, + "longitude": -98.49363, + "postal_code": "78205", + "timezone": "America/Chicago", + "city_name": "San Antonio", + "country_code": "US", + "country_name": "United States", + "continent_code": "NA", + "continent_name": "North America", + "subdivisions": [ + { + "iso_code": "TX", + "name": "Texas" + } + ] + }, + "asn": "8075", + "asn_name": "Microsoft Corporation", + "asn_network": "104.208.0.0/13", + "asn_type": "hosting", + "datacenter_result": true, + "datacenter_name": "Microsoft Azure" + } + }, + "proxy": false, + "proxy_confidence": "high", + "vpn": false, + "vpn_confidence": "medium", + "vpn_methods": { + "public_vpn": false, + "relay": false + } +} \ No newline at end of file From a06b45eb05a7f1dca65f968cdc71c45d67cab39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Mon, 12 Oct 2026 15:59:06 +0300 Subject: [PATCH 2/5] chore: reorder searchEvents parameters to keep backward compatibility --- docs/FingerprintApi.md | 8 +-- fingerprint_server_sdk/api/fingerprint_api.py | 64 +++++++++---------- res/fingerprint-server-api.yaml | 24 +++---- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 590a711c..c1418a8c 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -199,7 +199,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_events** -> EventSearch search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, active_call=active_call, source=source) +> EventSearch search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, source=source, active_call=active_call) Search events @@ -311,12 +311,12 @@ total_hits: int = 100 # When set, the response will include a `total_hits` prope tor_node: bool = True # Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. (optional) incremental_identification_status: SearchEventsIncrementalIdentificationStatus = fingerprint_server_sdk.SearchEventsIncrementalIdentificationStatus() # Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. (optional) simulator: bool = True # Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. (optional) -active_call: bool = True # Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) source: List[SearchEventsSource] = [fingerprint_server_sdk.SearchEventsSource()] # Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. (optional) +active_call: bool = True # Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. (optional) try: # Search events - api_response = api_instance.search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, active_call=active_call, source=source) + api_response = api_instance.search_events(limit=limit, pagination_key=pagination_key, visitor_id=visitor_id, high_recall_id=high_recall_id, bot=bot, bot_info=bot_info, bot_info_category=bot_info_category, bot_info_identity=bot_info_identity, bot_info_confidence=bot_info_confidence, bot_info_provider=bot_info_provider, bot_info_name=bot_info_name, ip_address=ip_address, asn=asn, linked_id=linked_id, url=url, bundle_id=bundle_id, package_name=package_name, origin=origin, start=start, end=end, reverse=reverse, suspect=suspect, vpn=vpn, virtual_machine=virtual_machine, tampering=tampering, anti_detect_browser=anti_detect_browser, incognito=incognito, privacy_settings=privacy_settings, jailbroken=jailbroken, frida=frida, factory_reset=factory_reset, cloned_app=cloned_app, emulator=emulator, root_apps=root_apps, vpn_confidence=vpn_confidence, min_suspect_score=min_suspect_score, developer_tools=developer_tools, location_spoofing=location_spoofing, mitm_attack=mitm_attack, rare_device=rare_device, rare_device_percentile_bucket=rare_device_percentile_bucket, proxy=proxy, sdk_version=sdk_version, sdk_platform=sdk_platform, environment=environment, proximity_id=proximity_id, total_hits=total_hits, tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, source=source, active_call=active_call) print("The response of FingerprintApi->search_events:\n") pprint(api_response) except ApiException as e: @@ -385,8 +385,8 @@ Name | Type | Description | Notes **tor_node** | **bool**| Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. | [optional] **incremental_identification_status** | [**SearchEventsIncrementalIdentificationStatus**](.md)| Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. | [optional] **simulator** | **bool**| Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. | [optional] - **active_call** | **bool**| Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. | [optional] **source** | [**List[SearchEventsSource]**](SearchEventsSource.md)| Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. | [optional] + **active_call** | **bool**| Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. | [optional] ### Return type diff --git a/fingerprint_server_sdk/api/fingerprint_api.py b/fingerprint_server_sdk/api/fingerprint_api.py index 7fcd97a6..145c04e1 100644 --- a/fingerprint_server_sdk/api/fingerprint_api.py +++ b/fingerprint_server_sdk/api/fingerprint_api.py @@ -873,18 +873,18 @@ def search_events( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - active_call: Annotated[ - Optional[StrictBool], - Field( - description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' - ), - ] = None, source: Annotated[ Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], Field( description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' ), ] = None, + active_call: Annotated[ + Optional[StrictBool], + Field( + description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -998,10 +998,10 @@ def search_events( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. - :type active_call: bool :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. :type source: List[SearchEventsSource] + :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. + :type active_call: 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 @@ -1071,8 +1071,8 @@ def search_events( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - active_call=active_call, source=source, + active_call=active_call, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1397,18 +1397,18 @@ def search_events_with_http_info( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - active_call: Annotated[ - Optional[StrictBool], - Field( - description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' - ), - ] = None, source: Annotated[ Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], Field( description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' ), ] = None, + active_call: Annotated[ + Optional[StrictBool], + Field( + description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1522,10 +1522,10 @@ def search_events_with_http_info( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. - :type active_call: bool :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. :type source: List[SearchEventsSource] + :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. + :type active_call: 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 @@ -1595,8 +1595,8 @@ def search_events_with_http_info( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - active_call=active_call, source=source, + active_call=active_call, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1921,18 +1921,18 @@ def search_events_without_preload_content( description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' ), ] = None, - active_call: Annotated[ - Optional[StrictBool], - Field( - description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' - ), - ] = None, source: Annotated[ Optional[Annotated[list[SearchEventsSource], Field(max_length=1)]], Field( description='Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. ' ), ] = None, + active_call: Annotated[ + Optional[StrictBool], + Field( + description='Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. ' + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2046,10 +2046,10 @@ def search_events_without_preload_content( :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. :type simulator: bool - :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. - :type active_call: bool :param source: Selects the source of events to search. When omitted, only traditional identification events generated from devices are returned (the default behavior). When set to `edge`, only Automation Intelligence (Edge) events are returned. To retrieve all events regardless of source, you must make two requests. One with the `source` parameter set to `edge`, and another with the `source` parameter omitted. > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. :type source: List[SearchEventsSource] + :param active_call: Filter events by Active Call Detection result on mobile devices. > Note: When using this parameter, only events with the `active_call` property set to `true` or `false` are returned. Events without an `active_call` Smart Signal result are left out of the response. + :type active_call: 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 @@ -2119,8 +2119,8 @@ def search_events_without_preload_content( tor_node=tor_node, incremental_identification_status=incremental_identification_status, simulator=simulator, - active_call=active_call, source=source, + active_call=active_call, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2192,8 +2192,8 @@ def _search_events_serialize( tor_node: Optional[bool], incremental_identification_status: Optional[SearchEventsIncrementalIdentificationStatus], simulator: Optional[bool], - active_call: Optional[bool], source: Optional[list[SearchEventsSource]], + active_call: Optional[bool], _request_auth: Optional[dict[StrictStr, Any]], _content_type: Optional[StrictStr], _headers: Optional[dict[StrictStr, Any]], @@ -2431,14 +2431,14 @@ def _search_events_serialize( if simulator is not None: _query_params.append(('simulator', simulator)) - # process the query parameters - if active_call is not None: - _query_params.append(('active_call', active_call)) - # process the query parameters if source is not None: _query_params.append(('source', source)) + # process the query parameters + if active_call is not None: + _query_params.append(('active_call', active_call)) + # set the HTTP header `Accept` if 'Accept' not in _header_params: _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 6b178b67..bc18d5b1 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -940,18 +940,6 @@ paths: > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. - - name: active_call - in: query - schema: - type: boolean - description: > - Filter events by Active Call Detection result on mobile devices. - - - > Note: When using this parameter, only events with the - `active_call` property set to `true` or `false` are returned. Events - without an `active_call` Smart Signal result are left out of the - response. - name: source in: query required: false @@ -975,6 +963,18 @@ paths: > Note: The Automation Intelligence API is in public preview testing phase. If you encounter any issues, please [contact](https://fingerprint.com/support/) our support team. + - name: active_call + in: query + schema: + type: boolean + description: > + Filter events by Active Call Detection result on mobile devices. + + + > Note: When using this parameter, only events with the + `active_call` property set to `true` or `false` are returned. Events + without an `active_call` Smart Signal result are left out of the + response. responses: '200': description: Events matching the filter(s). From cec79cda7f6748704538edefd594ff53eb268fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Mon, 12 Oct 2026 15:59:16 +0300 Subject: [PATCH 3/5] chore: remove unnecessary mock files --- test/mocks/errors/400_edge_ip_required.json | 6 --- test/mocks/errors/400_edge_unknown_field.json | 6 --- .../errors/400_request_read_timeout.json | 6 --- test/mocks/errors/413_payload_too_large.json | 6 --- .../mocks/events/get_event_with_edge_200.json | 51 ------------------- 5 files changed, 75 deletions(-) delete mode 100644 test/mocks/errors/400_edge_ip_required.json delete mode 100644 test/mocks/errors/400_edge_unknown_field.json delete mode 100644 test/mocks/errors/400_request_read_timeout.json delete mode 100644 test/mocks/errors/413_payload_too_large.json delete mode 100644 test/mocks/events/get_event_with_edge_200.json diff --git a/test/mocks/errors/400_edge_ip_required.json b/test/mocks/errors/400_edge_ip_required.json deleted file mode 100644 index 8f055f8f..00000000 --- a/test/mocks/errors/400_edge_ip_required.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_cannot_be_parsed", - "message": "at least one of ipv4_address or ipv6_address is required" - } -} diff --git a/test/mocks/errors/400_edge_unknown_field.json b/test/mocks/errors/400_edge_unknown_field.json deleted file mode 100644 index c0a153ef..00000000 --- a/test/mocks/errors/400_edge_unknown_field.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_cannot_be_parsed", - "message": "request body contains an unknown field \"unknown\"" - } -} \ No newline at end of file diff --git a/test/mocks/errors/400_request_read_timeout.json b/test/mocks/errors/400_request_read_timeout.json deleted file mode 100644 index 89daaca8..00000000 --- a/test/mocks/errors/400_request_read_timeout.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "request_read_timeout", - "message": "request read timeout" - } -} \ No newline at end of file diff --git a/test/mocks/errors/413_payload_too_large.json b/test/mocks/errors/413_payload_too_large.json deleted file mode 100644 index 00a1c6f9..00000000 --- a/test/mocks/errors/413_payload_too_large.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "error": { - "code": "payload_too_large", - "message": "payload too large" - } -} diff --git a/test/mocks/events/get_event_with_edge_200.json b/test/mocks/events/get_event_with_edge_200.json deleted file mode 100644 index 387c86eb..00000000 --- a/test/mocks/events/get_event_with_edge_200.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "event_id": "1758130560902.8tRtrH", - "timestamp": 1758130560902, - "source": "edge", - "url": "https://example.com/login?foo=bar", - "bot_info": { - "category": "ai_agent", - "provider": "OpenAI", - "provider_url": "https://openai.com", - "name": "ChatGPT Agent", - "identity": "signed", - "confidence": "high" - }, - "ip_info": { - "v4": { - "address": "104.210.139.192", - "geolocation": { - "accuracy_radius": 20, - "latitude": 29.42412, - "longitude": -98.49363, - "postal_code": "78205", - "timezone": "America/Chicago", - "city_name": "San Antonio", - "country_code": "US", - "country_name": "United States", - "continent_code": "NA", - "continent_name": "North America", - "subdivisions": [ - { - "iso_code": "TX", - "name": "Texas" - } - ] - }, - "asn": "8075", - "asn_name": "Microsoft Corporation", - "asn_network": "104.208.0.0/13", - "asn_type": "hosting", - "datacenter_result": true, - "datacenter_name": "Microsoft Azure" - } - }, - "proxy": false, - "proxy_confidence": "high", - "vpn": false, - "vpn_confidence": "medium", - "vpn_methods": { - "public_vpn": false, - "relay": false - } -} \ No newline at end of file From 152956166cfb7c1116796d2b8be1f627002dc172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Mon, 12 Oct 2026 15:59:22 +0300 Subject: [PATCH 4/5] test: add 503 error tests --- sync.sh | 1 + test/test_fingerprint_api.py | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/sync.sh b/sync.sh index f4c2efe5..eb4c3e3a 100755 --- a/sync.sh +++ b/sync.sh @@ -38,6 +38,7 @@ examples=( 'errors/404_visitor_not_found.json' 'errors/409_state_not_ready.json' 'errors/429_too_many_requests.json' + 'errors/503_service_unavailable.json' ) for example in "${examples[@]}"; do diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index 6ee8c73d..d79951b9 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -24,6 +24,7 @@ SearchEventsSdkPlatform, SearchEventsSource, SearchEventsVpnConfidence, + ServiceException, TooManyRequestsException, __version__, ) @@ -332,6 +333,30 @@ def test_get_event_too_many_requests(self) -> None: self.assertIsInstance(context.exception.data, ErrorResponse) self.assertEqual(context.exception.data.error.code, ErrorCode.TOO_MANY_REQUESTS) + def test_get_event_service_unavailable(self) -> None: + """Test case for get_event with 503 Service Unavailable response""" + mock_pool = MockPoolManager(self) + self.api.api_client.rest_client.pool_manager = mock_pool + event_id = '0000000000000.XXXXX' + mock_pool.expect_request( + 'GET', + TestFingerprintApi.get_event_path(event_id), + fields=[], + headers=self.request_headers, + preload_content=True, + timeout=None, + response_status_code=503, + response_data_file='errors/503_service_unavailable.json', + ) + + with self.assertRaises(ServiceException) as context: + self.api.get_event(event_id) + + self.assertNotIsInstance(context.exception, GatewayTimeoutException) + self.assertEqual(context.exception.status, 503) + self.assertIsInstance(context.exception.data, ErrorResponse) + self.assertEqual(context.exception.data.error.code, ErrorCode.SERVICE_UNAVAILABLE) + def test_get_event_gateway_timeout(self) -> None: """Test case for get_event with 504 Gateway Timeout response""" mock_pool = MockPoolManager(self) @@ -580,6 +605,31 @@ def test_search_events_too_many_requests(self) -> None: self.assertIsInstance(context.exception.data, ErrorResponse) self.assertEqual(context.exception.data.error.code, ErrorCode.TOO_MANY_REQUESTS) + def test_search_events_service_unavailable(self) -> None: + """Test case for search_events with 503 Service Unavailable response""" + params = {'limit': 2} + + mock_pool = MockPoolManager(self) + self.api.api_client.rest_client.pool_manager = mock_pool + mock_pool.expect_request( + 'GET', + TestFingerprintApi.get_search_events_path(params), + fields=[], + headers=self.request_headers, + preload_content=True, + timeout=None, + response_status_code=503, + response_data_file='errors/503_service_unavailable.json', + ) + + with self.assertRaises(ServiceException) as context: + self.api.search_events(**params) + + self.assertNotIsInstance(context.exception, GatewayTimeoutException) + self.assertEqual(context.exception.status, 503) + self.assertIsInstance(context.exception.data, ErrorResponse) + self.assertEqual(context.exception.data.error.code, ErrorCode.SERVICE_UNAVAILABLE) + def test_search_events_gateway_timeout(self) -> None: """Test case for search_events with 504 Gateway Timeout response""" params = {'limit': 2} From a8e7e7e435da2e8d1e26fa61137a2209606d85db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20Ayd=C4=B1n?= Date: Mon, 12 Oct 2026 15:59:30 +0300 Subject: [PATCH 5/5] chore: add changesets for deprecated 504 response --- .changeset/deprecate-504-events-search.md | 5 +++++ .changeset/deprecate-504-events.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/deprecate-504-events-search.md create mode 100644 .changeset/deprecate-504-events.md diff --git a/.changeset/deprecate-504-events-search.md b/.changeset/deprecate-504-events-search.md new file mode 100644 index 00000000..1ec11149 --- /dev/null +++ b/.changeset/deprecate-504-events-search.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/python-sdk': minor +--- + +**events-search**: The `504` response for the Events Search endpoint is deprecated and will no longer be generated by the Server API. diff --git a/.changeset/deprecate-504-events.md b/.changeset/deprecate-504-events.md new file mode 100644 index 00000000..07cfcb16 --- /dev/null +++ b/.changeset/deprecate-504-events.md @@ -0,0 +1,5 @@ +--- +'@fingerprint/python-sdk': minor +--- + +**events**: The `504` response for the Get Event endpoint is deprecated and will no longer be generated by the Server API.