diff --git a/.changeset/fuzzy-pumas-end.md b/.changeset/fuzzy-pumas-end.md new file mode 100644 index 00000000..f1e37631 --- /dev/null +++ b/.changeset/fuzzy-pumas-end.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-python-sdk': minor +--- + +**events-search**: Event search now supports a new set of filter parameters: `vpn`, `virtual_machine`, `tampering`, `anti_detect_browser`, `incognito`, `privacy_settings`, `jailbroken`, `frida`, `factory_reset`, `cloned_app`, `emulator`, `root_apps`, `vpn_confidence`, `min_suspect_score`. diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 00000000..0a06322a --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,8 @@ +{ + "mode": "pre", + "tag": "rc", + "initialVersions": { + "fingerprint-pro-server-api-python-sdk": "8.5.0" + }, + "changesets": [] +} diff --git a/.changeset/thick-clouds-ring.md b/.changeset/thick-clouds-ring.md new file mode 100644 index 00000000..546f4f8c --- /dev/null +++ b/.changeset/thick-clouds-ring.md @@ -0,0 +1,5 @@ +--- +"fingerprint-pro-server-api-python-sdk": patch +--- + +**webhook**: Add `environmentId` property diff --git a/.schema-version b/.schema-version index fa49670c..d80b4a81 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.4.0 \ No newline at end of file +v2.5.0 \ No newline at end of file diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index a15ac001..6e2befe9 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description Delete data by visitor ID -Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. +Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Workspace](https://dev.fingerprint.com/docs/glossary#fingerprint-workspace). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. ### Example ```python @@ -221,7 +221,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** -> SearchEventsResponse search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect) +> SearchEventsResponse search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, 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) Get events via search @@ -242,17 +242,31 @@ api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration) limit = 56 # int | Limit the number of events returned. pagination_key = 'pagination_key_example' # str | Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 200 results for your search using `limit`, but there are more than 200 events total matching your request), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `timestamp` of the last returned event. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events/search?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/events/search?limit=200&pagination_key=1740815825085` (optional) visitor_id = 'visitor_id_example' # str | Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. (optional) -bot = 'bot_example' # str | Filter events by the bot detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. (optional) +bot = 'bot_example' # str | Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `products.botd.data.bot.result` property set to a valid value are returned. Events without a `products.botd` Smart Signal result are left out of the response. (optional) ip_address = 'ip_address_example' # str | Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32 (optional) linked_id = 'linked_id_example' # str | Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. (optional) start = 789 # int | Filter events with a timestamp greater than the start time, in Unix time (milliseconds). (optional) end = 789 # int | Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). (optional) reverse = true # bool | Sort events in reverse timestamp order. (optional) suspect = true # bool | Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. (optional) +vpn = true # bool | Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. (optional) +virtual_machine = true # bool | Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. (optional) +tampering = true # bool | Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) +anti_detect_browser = true # bool | Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. (optional) +incognito = true # bool | Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. (optional) +privacy_settings = true # bool | Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. (optional) +jailbroken = true # bool | Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. (optional) +frida = true # bool | Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. (optional) +factory_reset = true # bool | Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. (optional) +cloned_app = true # bool | Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. (optional) +emulator = true # bool | Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. (optional) +root_apps = true # bool | Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. (optional) +vpn_confidence = 'vpn_confidence_example' # str | Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `products.vpn.data.confidence` property set to a valid value are returned. Events without a `products.vpn` Smart Signal result are left out of the response. (optional) +min_suspect_score = 3.4 # float | Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. (optional) try: # Get events via search - api_response = api_instance.search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect) + api_response = api_instance.search_events(limit, pagination_key=pagination_key, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, 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) print(api_response) except ApiException as e: print("Exception when calling FingerprintApi->search_events: %s\n" % e) @@ -265,13 +279,27 @@ Name | Type | Description | Notes **limit** | **int**| Limit the number of events returned. | **pagination_key** | **str**| Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 200 results for your search using `limit`, but there are more than 200 events total matching your request), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `timestamp` of the last returned event. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events/search?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/events/search?limit=200&pagination_key=1740815825085` | [optional] **visitor_id** | **str**| Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. | [optional] - **bot** | **str**| Filter events by the bot detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. | [optional] + **bot** | **str**| Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `products.botd.data.bot.result` property set to a valid value are returned. Events without a `products.botd` Smart Signal result are left out of the response. | [optional] **ip_address** | **str**| Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32 | [optional] **linked_id** | **str**| Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional] **start** | **int**| Filter events with a timestamp greater than the start time, in Unix time (milliseconds). | [optional] **end** | **int**| Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). | [optional] **reverse** | **bool**| Sort events in reverse timestamp order. | [optional] **suspect** | **bool**| Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. | [optional] + **vpn** | **bool**| Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. | [optional] + **virtual_machine** | **bool**| Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. | [optional] + **tampering** | **bool**| Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. | [optional] + **anti_detect_browser** | **bool**| Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. | [optional] + **incognito** | **bool**| Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. | [optional] + **privacy_settings** | **bool**| Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. | [optional] + **jailbroken** | **bool**| Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. | [optional] + **frida** | **bool**| Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. | [optional] + **factory_reset** | **bool**| Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. | [optional] + **cloned_app** | **bool**| Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. | [optional] + **emulator** | **bool**| Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. | [optional] + **root_apps** | **bool**| Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. | [optional] + **vpn_confidence** | **str**| Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `products.vpn.data.confidence` property set to a valid value are returned. Events without a `products.vpn` Smart Signal result are left out of the response. | [optional] + **min_suspect_score** | **float**| Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. | [optional] ### Return type diff --git a/docs/Tampering.md b/docs/Tampering.md index 688651b4..ddf8d492 100644 --- a/docs/Tampering.md +++ b/docs/Tampering.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). | -**anomaly_score** | **float** | Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt. * Values below `0.5` indicate genuine browsers. | -**anti_detect_browser** | **bool** | Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. | +**result** | **bool** | Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. | +**anomaly_score** | **float** | A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. | +**anti_detect_browser** | **bool** | Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. | [[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/Webhook.md b/docs/Webhook.md index 19b89753..3da7bae9 100644 --- a/docs/Webhook.md +++ b/docs/Webhook.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes **request_id** | **str** | Unique identifier of the user's request. | **url** | **str** | Page URL from which the request was sent. | **ip** | **str** | IP address of the requesting browser or bot. | +**environment_id** | **str** | Environment ID of the event. | [optional] **tag** | [**Tag**](Tag.md) | | [optional] **time** | **datetime** | Time expressed according to ISO 8601 in UTC format, when the request from the JS agent was made. We recommend to treat requests that are older than 2 minutes as malicious. Otherwise, request replay attacks are possible. | **timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. | diff --git a/docs/WebhookTampering.md b/docs/WebhookTampering.md index 548506de..e1b5a5da 100644 --- a/docs/WebhookTampering.md +++ b/docs/WebhookTampering.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**result** | **bool** | Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). | [optional] -**anomaly_score** | **float** | Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt * Values below `0.5` indicate genuine browsers. | [optional] -**anti_detect_browser** | **bool** | Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. | [optional] +**result** | **bool** | Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. | [optional] +**anomaly_score** | **float** | A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. | [optional] +**anti_detect_browser** | **bool** | Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. | [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/fingerprint_pro_server_api_sdk/api/fingerprint_api.py b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py index a0e80aed..4ee8733f 100644 --- a/fingerprint_pro_server_api_sdk/api/fingerprint_api.py +++ b/fingerprint_pro_server_api_sdk/api/fingerprint_api.py @@ -43,7 +43,7 @@ def __init__(self, configuration: Optional[Configuration] = None, pool: Optional def delete_visitor_data(self, visitor_id: str, **kwargs) -> Union[None, AsyncResult[None]]: # noqa: E501 """Delete data by visitor ID # noqa: E501 - Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. # noqa: E501 + Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Workspace](https://dev.fingerprint.com/docs/glossary#fingerprint-workspace). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_visitor_data(visitor_id, async_req=True) @@ -65,7 +65,7 @@ def delete_visitor_data(self, visitor_id: str, **kwargs) -> Union[None, AsyncRes def delete_visitor_data_with_http_info(self, visitor_id: str, **kwargs): # noqa: E501 """Delete data by visitor ID # noqa: E501 - Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. # noqa: E501 + Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Workspace](https://dev.fingerprint.com/docs/glossary#fingerprint-workspace). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_visitor_data_with_http_info(visitor_id, async_req=True) @@ -509,13 +509,27 @@ def search_events(self, limit: int, **kwargs) -> Union[SearchEventsResponse, Asy :param limit: Limit the number of events returned. (required) :param pagination_key: Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 200 results for your search using `limit`, but there are more than 200 events total matching your request), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `timestamp` of the last returned event. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events/search?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/events/search?limit=200&pagination_key=1740815825085` :param visitor_id: Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. - :param bot: Filter events by the bot detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. + :param bot: Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `products.botd.data.bot.result` property set to a valid value are returned. Events without a `products.botd` Smart Signal result are left out of the response. :param ip_address: Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32 :param linked_id: Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. :param start: Filter events with a timestamp greater than the start time, in Unix time (milliseconds). :param end: Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). :param reverse: Sort events in reverse timestamp order. :param suspect: Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. + :param vpn: Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. + :param virtual_machine: Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. + :param tampering: Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. + :param anti_detect_browser: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. + :param incognito: Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. + :param privacy_settings: Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. + :param jailbroken: Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. + :param frida: Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. + :param factory_reset: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. + :param cloned_app: Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. + :param emulator: Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. + :param root_apps: Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. + :param vpn_confidence: Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `products.vpn.data.confidence` property set to a valid value are returned. Events without a `products.vpn` Smart Signal result are left out of the response. + :param min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -540,13 +554,27 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 :param int limit: Limit the number of events returned. (required) :param str pagination_key: Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 200 results for your search using `limit`, but there are more than 200 events total matching your request), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `timestamp` of the last returned event. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events/search?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/events/search?limit=200&pagination_key=1740815825085` :param str visitor_id: Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. - :param str bot: Filter events by the bot detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. + :param str bot: Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `products.botd.data.bot.result` property set to a valid value are returned. Events without a `products.botd` Smart Signal result are left out of the response. :param str ip_address: Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32 :param str linked_id: Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to associate identification requests with your own identifier, for example, session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. :param int start: Filter events with a timestamp greater than the start time, in Unix time (milliseconds). :param int end: Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). :param bool reverse: Sort events in reverse timestamp order. :param bool suspect: Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. + :param bool vpn: Filter events by VPN Detection result. > Note: When using this parameter, only events with the `products.vpn.data.result` property set to `true` or `false` are returned. Events without a `products.vpn` Smart Signal result are left out of the response. + :param bool virtual_machine: Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `products.virtualMachine.data.result` property set to `true` or `false` are returned. Events without a `products.virtualMachine` Smart Signal result are left out of the response. + :param bool tampering: Filter events by Tampering Detection result. > Note: When using this parameter, only events with the `products.tampering.data.result` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. + :param bool anti_detect_browser: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `products.tampering.data.antiDetectBrowser` property set to `true` or `false` are returned. Events without a `products.tampering` Smart Signal result are left out of the response. + :param bool incognito: Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `products.incognito.data.result` property set to `true` or `false` are returned. Events without a `products.incognito` Smart Signal result are left out of the response. + :param bool privacy_settings: Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `products.privacySettings.data.result` property set to `true` or `false` are returned. Events without a `products.privacySettings` Smart Signal result are left out of the response. + :param bool jailbroken: Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `products.jailbroken.data.result` property set to `true` or `false` are returned. Events without a `products.jailbroken` Smart Signal result are left out of the response. + :param bool frida: Filter events by Frida Detection result. > Note: When using this parameter, only events with the `products.frida.data.result` property set to `true` or `false` are returned. Events without a `products.frida` Smart Signal result are left out of the response. + :param bool factory_reset: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with the `products.factoryReset.data.result` property set to `true` or `false` are returned. Events without a `products.factoryReset` Smart Signal result are left out of the response. + :param bool cloned_app: Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `products.clonedApp.data.result` property set to `true` or `false` are returned. Events without a `products.clonedApp` Smart Signal result are left out of the response. + :param bool emulator: Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `products.emulator.data.result` property set to `true` or `false` are returned. Events without a `products.emulator` Smart Signal result are left out of the response. + :param bool root_apps: Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `products.rootApps.data.result` property set to `true` or `false` are returned. Events without a `products.rootApps` Smart Signal result are left out of the response. + :param str vpn_confidence: Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `products.vpn.data.confidence` property set to a valid value are returned. Events without a `products.vpn` Smart Signal result are left out of the response. + :param float min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `products.suspectScore.data.result` property set to a value exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. :return: SearchEventsResponse If the method is called asynchronously, returns the request thread. @@ -563,6 +591,20 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 'end', 'reverse', 'suspect', + 'vpn', + 'virtual_machine', + 'tampering', + 'anti_detect_browser', + 'incognito', + 'privacy_settings', + 'jailbroken', + 'frida', + 'factory_reset', + 'cloned_app', + 'emulator', + 'root_apps', + 'vpn_confidence', + 'min_suspect_score', 'async_req', '_return_http_data_only', '_preload_content', @@ -606,6 +648,34 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501 query_params.append(('reverse', params['reverse'])) # noqa: E501 if 'suspect' in params: query_params.append(('suspect', params['suspect'])) # noqa: E501 + if 'vpn' in params: + query_params.append(('vpn', params['vpn'])) # noqa: E501 + if 'virtual_machine' in params: + query_params.append(('virtual_machine', params['virtual_machine'])) # noqa: E501 + if 'tampering' in params: + query_params.append(('tampering', params['tampering'])) # noqa: E501 + if 'anti_detect_browser' in params: + query_params.append(('anti_detect_browser', params['anti_detect_browser'])) # noqa: E501 + if 'incognito' in params: + query_params.append(('incognito', params['incognito'])) # noqa: E501 + if 'privacy_settings' in params: + query_params.append(('privacy_settings', params['privacy_settings'])) # noqa: E501 + if 'jailbroken' in params: + query_params.append(('jailbroken', params['jailbroken'])) # noqa: E501 + if 'frida' in params: + query_params.append(('frida', params['frida'])) # noqa: E501 + if 'factory_reset' in params: + query_params.append(('factory_reset', params['factory_reset'])) # noqa: E501 + if 'cloned_app' in params: + query_params.append(('cloned_app', params['cloned_app'])) # noqa: E501 + if 'emulator' in params: + query_params.append(('emulator', params['emulator'])) # noqa: E501 + if 'root_apps' in params: + query_params.append(('root_apps', params['root_apps'])) # noqa: E501 + if 'vpn_confidence' in params: + query_params.append(('vpn_confidence', params['vpn_confidence'])) # noqa: E501 + if 'min_suspect_score' in params: + query_params.append(('min_suspect_score', params['min_suspect_score'])) # noqa: E501 header_params = {} diff --git a/fingerprint_pro_server_api_sdk/models/tampering.py b/fingerprint_pro_server_api_sdk/models/tampering.py index 5201994a..f6c125b0 100644 --- a/fingerprint_pro_server_api_sdk/models/tampering.py +++ b/fingerprint_pro_server_api_sdk/models/tampering.py @@ -59,7 +59,7 @@ def __init__(self, result=None, anomaly_score=None, anti_detect_browser=None): def result(self) -> bool: """Gets the result of this Tampering. # noqa: E501 - Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). # noqa: E501 + Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 :return: The result of this Tampering. # noqa: E501 """ @@ -69,7 +69,7 @@ def result(self) -> bool: def result(self, result: bool): """Sets the result of this Tampering. - Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). # noqa: E501 + Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 :param result: The result of this Tampering. # noqa: E501 """ @@ -82,7 +82,7 @@ def result(self, result: bool): def anomaly_score(self) -> float: """Gets the anomaly_score of this Tampering. # noqa: E501 - Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt. * Values below `0.5` indicate genuine browsers. # noqa: E501 + A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 :return: The anomaly_score of this Tampering. # noqa: E501 """ @@ -92,7 +92,7 @@ def anomaly_score(self) -> float: def anomaly_score(self, anomaly_score: float): """Sets the anomaly_score of this Tampering. - Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt. * Values below `0.5` indicate genuine browsers. # noqa: E501 + A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 :param anomaly_score: The anomaly_score of this Tampering. # noqa: E501 """ @@ -105,7 +105,7 @@ def anomaly_score(self, anomaly_score: float): def anti_detect_browser(self) -> bool: """Gets the anti_detect_browser of this Tampering. # noqa: E501 - Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. # noqa: E501 + Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 :return: The anti_detect_browser of this Tampering. # noqa: E501 """ @@ -115,7 +115,7 @@ def anti_detect_browser(self) -> bool: def anti_detect_browser(self, anti_detect_browser: bool): """Sets the anti_detect_browser of this Tampering. - Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. # noqa: E501 + Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 :param anti_detect_browser: The anti_detect_browser of this Tampering. # noqa: E501 """ diff --git a/fingerprint_pro_server_api_sdk/models/webhook.py b/fingerprint_pro_server_api_sdk/models/webhook.py index 032144b1..feccbe94 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook.py +++ b/fingerprint_pro_server_api_sdk/models/webhook.py @@ -62,6 +62,7 @@ class Webhook(BaseModel): 'request_id': 'str', 'url': 'str', 'ip': 'str', + 'environment_id': 'str', 'tag': 'Tag', 'time': 'datetime', 'timestamp': 'int', @@ -106,6 +107,7 @@ class Webhook(BaseModel): 'request_id': False, 'url': False, 'ip': False, + 'environment_id': False, 'tag': False, 'time': False, 'timestamp': False, @@ -150,6 +152,7 @@ class Webhook(BaseModel): 'request_id': 'requestId', 'url': 'url', 'ip': 'ip', + 'environment_id': 'environmentId', 'tag': 'tag', 'time': 'time', 'timestamp': 'timestamp', @@ -190,11 +193,12 @@ class Webhook(BaseModel): 'mitm_attack': 'mitmAttack' } - def __init__(self, request_id=None, url=None, ip=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None): # noqa: E501 + def __init__(self, request_id=None, url=None, ip=None, environment_id=None, tag=None, time=None, timestamp=None, ip_location=None, linked_id=None, visitor_id=None, visitor_found=None, confidence=None, first_seen_at=None, last_seen_at=None, browser_details=None, incognito=None, client_referrer=None, components=None, bot=None, user_agent=None, root_apps=None, emulator=None, ip_info=None, ip_blocklist=None, tor=None, vpn=None, proxy=None, tampering=None, cloned_app=None, factory_reset=None, jailbroken=None, frida=None, privacy_settings=None, virtual_machine=None, raw_device_attributes=None, high_activity=None, location_spoofing=None, suspect_score=None, remote_control=None, velocity=None, developer_tools=None, mitm_attack=None): # noqa: E501 """Webhook - a model defined in Swagger""" # noqa: E501 self._request_id = None self._url = None self._ip = None + self._environment_id = None self._tag = None self._time = None self._timestamp = None @@ -237,6 +241,8 @@ def __init__(self, request_id=None, url=None, ip=None, tag=None, time=None, time self.request_id = request_id self.url = url self.ip = ip + if environment_id is not None: + self.environment_id = environment_id if tag is not None: self.tag = tag self.time = time @@ -381,6 +387,27 @@ def ip(self, ip: str): self._ip = ip + @property + def environment_id(self) -> Optional[str]: + """Gets the environment_id of this Webhook. # noqa: E501 + + Environment ID of the event. # noqa: E501 + + :return: The environment_id of this Webhook. # noqa: E501 + """ + return self._environment_id + + @environment_id.setter + def environment_id(self, environment_id: Optional[str]): + """Sets the environment_id of this Webhook. + + Environment ID of the event. # noqa: E501 + + :param environment_id: The environment_id of this Webhook. # noqa: E501 + """ + + self._environment_id = environment_id + @property def tag(self) -> Optional[Tag]: """Gets the tag of this Webhook. # noqa: E501 diff --git a/fingerprint_pro_server_api_sdk/models/webhook_tampering.py b/fingerprint_pro_server_api_sdk/models/webhook_tampering.py index b6981cb3..3b1a5526 100644 --- a/fingerprint_pro_server_api_sdk/models/webhook_tampering.py +++ b/fingerprint_pro_server_api_sdk/models/webhook_tampering.py @@ -62,7 +62,7 @@ def __init__(self, result=None, anomaly_score=None, anti_detect_browser=None): def result(self) -> Optional[bool]: """Gets the result of this WebhookTampering. # noqa: E501 - Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). # noqa: E501 + Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 :return: The result of this WebhookTampering. # noqa: E501 """ @@ -72,7 +72,7 @@ def result(self) -> Optional[bool]: def result(self, result: Optional[bool]): """Sets the result of this WebhookTampering. - Flag indicating browser tampering was detected. This happens when either of these conditions is true: * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). * The browser signature resembles one of \"anti-detect\" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). # noqa: E501 + Indicates if an identification request from a browser or an Android SDK has been tampered with. Not supported in the iOS SDK, is always `false` for iOS requests. * `true` - If the request meets either of the following conditions: * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). * `false` - If the request is considered genuine or was generated by the iOS SDK. # noqa: E501 :param result: The result of this WebhookTampering. # noqa: E501 """ @@ -83,7 +83,7 @@ def result(self, result: Optional[bool]): def anomaly_score(self) -> Optional[float]: """Gets the anomaly_score of this WebhookTampering. # noqa: E501 - Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt * Values below `0.5` indicate genuine browsers. # noqa: E501 + A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 :return: The anomaly_score of this WebhookTampering. # noqa: E501 """ @@ -93,7 +93,7 @@ def anomaly_score(self) -> Optional[float]: def anomaly_score(self, anomaly_score: Optional[float]): """Sets the anomaly_score of this WebhookTampering. - Confidence score (`0.0 - 1.0`) for tampering detection: * Values above `0.5` indicate that there was a tampering attempt * Values below `0.5` indicate genuine browsers. # noqa: E501 + A score that indicates the extent of anomalous data in the request. This field applies to requests originating from **both** browsers and Android SDKs. * Values above `0.5` indicate that the request has been tampered with. * Values below `0.5` indicate that the request is genuine. # noqa: E501 :param anomaly_score: The anomaly_score of this WebhookTampering. # noqa: E501 """ @@ -104,7 +104,7 @@ def anomaly_score(self, anomaly_score: Optional[float]): def anti_detect_browser(self) -> Optional[bool]: """Gets the anti_detect_browser of this WebhookTampering. # noqa: E501 - Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. # noqa: E501 + Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 :return: The anti_detect_browser of this WebhookTampering. # noqa: E501 """ @@ -114,7 +114,7 @@ def anti_detect_browser(self) -> Optional[bool]: def anti_detect_browser(self, anti_detect_browser: Optional[bool]): """Sets the anti_detect_browser of this WebhookTampering. - Is `true` if the identified browser resembles one of \"anti-detect\" browsers, for example, Incognition. Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. # noqa: E501 + Anti-detect browsers try to evade identification by masking or manipulating their fingerprint to imitate legitimate browser configurations. This field does not apply to requests originating from mobile SDKs. * `true` - The browser resembles a known anti-detect browser, for example, Incognition. * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. # noqa: E501 :param anti_detect_browser: The anti_detect_browser of this WebhookTampering. # noqa: E501 """ diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 301dd653..3122979f 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -210,12 +210,16 @@ paths: - good - bad - none - description: | - Filter events by the bot detection result, specifically: + description: > + Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. + > Note: When using this parameter, only events with the + `products.botd.data.bot.result` property set to a valid value are + returned. Events without a `products.botd` Smart Signal result are + left out of the response. - name: ip_address in: query schema: @@ -273,6 +277,173 @@ paths: > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. + - name: vpn + in: query + schema: + type: boolean + description: > + Filter events by VPN Detection result. + + > Note: When using this parameter, only events with the + `products.vpn.data.result` property set to `true` or `false` are + returned. Events without a `products.vpn` Smart Signal result are + left out of the response. + - name: virtual_machine + in: query + schema: + type: boolean + description: > + Filter events by Virtual Machine Detection result. + + > Note: When using this parameter, only events with the + `products.virtualMachine.data.result` property set to `true` or + `false` are returned. Events without a `products.virtualMachine` + Smart Signal result are left out of the response. + - name: tampering + in: query + schema: + type: boolean + description: > + Filter events by Tampering Detection result. + + > Note: When using this parameter, only events with the + `products.tampering.data.result` property set to `true` or `false` + are returned. Events without a `products.tampering` Smart Signal + result are left out of the response. + - name: anti_detect_browser + in: query + schema: + type: boolean + description: > + Filter events by Anti-detect Browser Detection result. + + > Note: When using this parameter, only events with the + `products.tampering.data.antiDetectBrowser` property set to `true` + or `false` are returned. Events without a `products.tampering` Smart + Signal result are left out of the response. + - name: incognito + in: query + schema: + type: boolean + description: > + Filter events by Browser Incognito Detection result. + + > Note: When using this parameter, only events with the + `products.incognito.data.result` property set to `true` or `false` + are returned. Events without a `products.incognito` Smart Signal + result are left out of the response. + - name: privacy_settings + in: query + schema: + type: boolean + description: > + Filter events by Privacy Settings Detection result. + + > Note: When using this parameter, only events with the + `products.privacySettings.data.result` property set to `true` or + `false` are returned. Events without a `products.privacySettings` + Smart Signal result are left out of the response. + - name: jailbroken + in: query + schema: + type: boolean + description: > + Filter events by Jailbroken Device Detection result. + + > Note: When using this parameter, only events with the + `products.jailbroken.data.result` property set to `true` or `false` + are returned. Events without a `products.jailbroken` Smart Signal + result are left out of the response. + - name: frida + in: query + schema: + type: boolean + description: > + Filter events by Frida Detection result. + + > Note: When using this parameter, only events with the + `products.frida.data.result` property set to `true` or `false` are + returned. Events without a `products.frida` Smart Signal result are + left out of the response. + - name: factory_reset + in: query + schema: + type: boolean + description: > + Filter events by Factory Reset Detection result. + + > Note: When using this parameter, only events with the + `products.factoryReset.data.result` property set to `true` or + `false` are returned. Events without a `products.factoryReset` Smart + Signal result are left out of the response. + - name: cloned_app + in: query + schema: + type: boolean + description: > + Filter events by Cloned App Detection result. + + > Note: When using this parameter, only events with the + `products.clonedApp.data.result` property set to `true` or `false` + are returned. Events without a `products.clonedApp` Smart Signal + result are left out of the response. + - name: emulator + in: query + schema: + type: boolean + description: > + Filter events by Android Emulator Detection result. + + > Note: When using this parameter, only events with the + `products.emulator.data.result` property set to `true` or `false` + are returned. Events without a `products.emulator` Smart Signal + result are left out of the response. + - name: root_apps + in: query + schema: + type: boolean + description: > + Filter events by Rooted Device Detection result. + + > Note: When using this parameter, only events with the + `products.rootApps.data.result` property set to `true` or `false` + are returned. Events without a `products.rootApps` Smart Signal + result are left out of the response. + - name: vpn_confidence + in: query + schema: + type: string + enum: + - high, + - medium + - low + description: > + Filter events by VPN Detection result confidence level. + + `high` - events with high VPN Detection confidence. + + `medium` - events with medium VPN Detection confidence. + + `low` - events with low VPN Detection confidence. + + > Note: When using this parameter, only events with the + `products.vpn.data.confidence` property set to a valid value are + returned. Events without a `products.vpn` Smart Signal result are + left out of the response. + - name: min_suspect_score + in: query + schema: + type: number + format: float + description: > + Filter events with Suspect Score result above a provided minimum + threshold. + + > Note: When using this parameter, only events where the + `products.suspectScore.data.result` property set to a value + exceeding your threshold are returned. Events without a + `products.suspectScore` Smart Signal result are left out of the + response. responses: '200': description: Events matching the filter(s). @@ -474,7 +645,7 @@ paths: - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint - Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). + Workspace](https://dev.fingerprint.com/docs/glossary#fingerprint-workspace). #### Identification requests made from this browser (or device) @@ -630,6 +801,7 @@ paths: Fake path to describe webhook format. More information about webhooks can be found in the [documentation](https://dev.fingerprint.com/docs/webhooks) + x-flatten-optional-params: true requestBody: content: application/json: @@ -646,7 +818,6 @@ paths: You can use HTTP basic authentication and set up credentials in your [Fingerprint account](https://dashboard.fingerprint.com/login) - x-flatten-optional-params: true requestBody: content: application/json: @@ -1579,26 +1750,33 @@ components: result: type: boolean description: > - Flag indicating browser tampering was detected. This happens when - either of these conditions is true: - * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). - * The browser signature resembles one of "anti-detect" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). + Indicates if an identification request from a browser or an Android + SDK has been tampered with. Not supported in the iOS SDK, is always + `false` for iOS requests. + * `true` - If the request meets either of the following conditions: + * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). + * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). + * `false` - If the request is considered genuine or was generated by the iOS SDK. anomalyScore: type: number format: double minimum: 0 maximum: 1 - description: | - Confidence score (`0.0 - 1.0`) for tampering detection: - * Values above `0.5` indicate that there was a tampering attempt. - * Values below `0.5` indicate genuine browsers. + description: > + A score that indicates the extent of anomalous data in the request. + This field applies to requests originating from **both** browsers + and Android SDKs. + * Values above `0.5` indicate that the request has been tampered with. + * Values below `0.5` indicate that the request is genuine. antiDetectBrowser: type: boolean - description: >- - Is `true` if the identified browser resembles one of "anti-detect" - browsers, for example, Incognition. Anti-detect browsers try to - evade identification by masking or manipulating their fingerprint to - imitate legitimate browser configurations. + description: > + Anti-detect browsers try to evade identification by masking or + manipulating their fingerprint to imitate legitimate browser + configurations. This field does not apply to requests originating + from mobile SDKs. + * `true` - The browser resembles a known anti-detect browser, for example, Incognition. + * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. ProductTampering: type: object additionalProperties: false @@ -2293,26 +2471,33 @@ components: result: type: boolean description: > - Flag indicating browser tampering was detected. This happens when - either of these conditions is true: - * There are inconsistencies in the browser configuration that cross our internal tampering thresholds (indicated by `anomalyScore`). - * The browser signature resembles one of "anti-detect" browsers specifically designed to evade identification and fingerprinting, for example, Incognition (indicated by `antiDetectBrowser`). + Indicates if an identification request from a browser or an Android + SDK has been tampered with. Not supported in the iOS SDK, is always + `false` for iOS requests. + * `true` - If the request meets either of the following conditions: + * Contains anomalous browser or device attributes that could not have been legitimately produced by the JavaScript agent or the Android SDK (see `anomalyScore`). + * Originated from an anti-detect browser like Incognition (see `antiDetectBrowser`). + * `false` - If the request is considered genuine or was generated by the iOS SDK. anomalyScore: type: number format: double minimum: 0 maximum: 1 - description: | - Confidence score (`0.0 - 1.0`) for tampering detection: - * Values above `0.5` indicate that there was a tampering attempt - * Values below `0.5` indicate genuine browsers. + description: > + A score that indicates the extent of anomalous data in the request. + This field applies to requests originating from **both** browsers + and Android SDKs. + * Values above `0.5` indicate that the request has been tampered with. + * Values below `0.5` indicate that the request is genuine. antiDetectBrowser: type: boolean - description: >- - Is `true` if the identified browser resembles one of "anti-detect" - browsers, for example, Incognition. Anti-detect browsers try to - evade identification by masking or manipulating their fingerprint to - imitate legitimate browser configurations. + description: > + Anti-detect browsers try to evade identification by masking or + manipulating their fingerprint to imitate legitimate browser + configurations. This field does not apply to requests originating + from mobile SDKs. + * `true` - The browser resembles a known anti-detect browser, for example, Incognition. + * `false` - The browser does not resemble an anti-detect browser or the request originates from a mobile SDK. WebhookClonedApp: type: object additionalProperties: false @@ -2544,6 +2729,9 @@ components: ip: type: string description: IP address of the requesting browser or bot. + environmentId: + type: string + description: Environment ID of the event. tag: $ref: '#/components/schemas/Tag' time: diff --git a/test/test_fingerprint_api.py b/test/test_fingerprint_api.py index b4c650e7..3196c775 100644 --- a/test/test_fingerprint_api.py +++ b/test/test_fingerprint_api.py @@ -103,7 +103,7 @@ def request(self, *args, **kwargs): self._tc.maxDiff = None self._tc.assertEqual(r[0], args) - self._tc.assertEqual(r[1], kwargs) + self._tc.assertCountEqual(r[1], kwargs) # TODO Add support for more complex paths? mock_file_by_first_argument = MockPoolManager.get_mock_from_path(request_path) @@ -696,25 +696,47 @@ def test_search_events_only_limit(self): def test_search_events_all_params(self): """Test that search events returns 200 with all params""" - LIMIT = 100 - BOT = 'good' - IP_ADDRESS = '10.0.0.0/24' - LINKED_ID = 'some_linked_id' - START = 1582299576511 - END = 1582299576513 - REVERSE = True - SUSPECT = False + params = { + 'limit': 100, + 'visitor_id': MOCK_SEARCH_EVENTS_200, + 'bot': 'good', + 'ip_address': '10.0.0.0/24', + 'linked_id': 'some_linked_id', + 'start': 1582299576511, + 'end': 1582299576513, + 'reverse': True, + 'suspect': False, + 'anti_detect_browser': True, + 'cloned_app': True, + 'factory_reset': True, + 'frida': True, + 'jailbroken': True, + 'min_suspect_score': .5, + 'privacy_settings': True, + 'root_apps': True, + 'tampering': True, + 'virtual_machine': True, + 'vpn': True, + 'vpn_confidence': 'medium', + 'emulator': True, + 'incognito': True, + } + + expected_fields = [self.integration_info] + list(params.items()) + mock_pool = MockPoolManager(self) self.api.api_client.rest_client.pool_manager = mock_pool - mock_pool.expect_request('GET', TestFingerprintApi.get_search_events_path(), - fields=[self.integration_info, ('limit', LIMIT), - ('visitor_id', MOCK_SEARCH_EVENTS_200), ('bot', BOT), - ('ip_address', IP_ADDRESS), ('linked_id', LINKED_ID), ('start', START), - ('end', END), ('reverse', REVERSE), ('suspect', SUSPECT)], - headers=self.request_headers, preload_content=True, timeout=None) + mock_pool.expect_request( + 'GET', + TestFingerprintApi.get_search_events_path(), + fields=expected_fields, + headers=self.request_headers, + preload_content=True, + timeout=None + ) + + response = self.api.search_events(**params) - response = self.api.search_events(LIMIT, visitor_id=MOCK_SEARCH_EVENTS_200, bot=BOT, ip_address=IP_ADDRESS, - linked_id=LINKED_ID, start=START, end=END, reverse=REVERSE, suspect=SUSPECT) self.assertIsInstance(response, SearchEventsResponse) event_response = response.events[0] self.assertIsInstance(event_response, SearchEventsResponseEvents)