Skip to content

Commit

Permalink
feat: update schema with correct IpLocation format and doc updates
Browse files Browse the repository at this point in the history
For `get_visits` method `before` argument is deprecated, use `pagination_key` instead.
  • Loading branch information
ilfa committed Jun 5, 2023
1 parent 0fcc73c commit d501cfa
Show file tree
Hide file tree
Showing 86 changed files with 612 additions and 301 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</p>

# Fingerprint Pro Server Python SDK
Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. This API can be used for data exports, decision-making, and data analysis scenarios.
Fingerprint Pro Server API allows you to get information about visitors and about individual events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device.

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

Expand Down
2 changes: 1 addition & 1 deletion docs/BotdDetectionResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **str** | Bot detection result: * &#x60;notDetected&#x60; - the visitor is not a bot * &#x60;good&#x60; - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * &#x60;bad&#x60; - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on |
**result** | **str** | Bot detection result: * `notDetected` - the visitor is not a bot * `good` - good bot detected, such as Google bot, Baidu Spider, AlexaBot and so on * `bad` - bad bot detected, such as Selenium, Puppeteer, Playwright, headless browsers, and so on |
**type** | **str** | | [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)
Expand Down
2 changes: 1 addition & 1 deletion docs/ErrorEvent403ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | Error code: * &#x60;TokenRequired&#x60; - &#x60;Auth-API-Key&#x60; header is missing or empty * &#x60;TokenNotFound&#x60; - subscription not found for specified secret key * &#x60;SubscriptionNotActive&#x60; - subscription is not active * &#x60;WrongRegion&#x60; - server and subscription region differ |
**code** | **str** | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ |
**message** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/ErrorEvent404ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | Error code: * &#x60;RequestNotFound&#x60; - request not found for specified id |
**code** | **str** | Error code: * `RequestNotFound` - request not found for specified id |
**message** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
19 changes: 10 additions & 9 deletions docs/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Method | HTTP request | Description
Get event by requestId

This endpoint allows you to get events with all the information from each activated product (Fingerprint Pro or Bot Detection). Use the requestId as a URL path :request_id parameter. This API method is scoped to a request, i.e. all returned information is by requestId.
This endpoint allows you to retrieve an individual analysis event with all the information from each activated product (Identification, Bot Detection, and others). Products that are not activated for your application or not relevant to the event's detected platform (web, iOS, Android) are not included in the response. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`.

### Example
```python
Expand Down Expand Up @@ -43,7 +43,7 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_id** | **str**| requestId is the unique identifier of each request |
**request_id** | **str**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. |

### Return type

Expand All @@ -61,11 +61,11 @@ Name | Type | Description | Notes
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **get_visits**
> Response get_visits(visitor_id, request_id=request_id, linked_id=linked_id, limit=limit, before=before)
> Response get_visits(visitor_id, request_id=request_id, linked_id=linked_id, limit=limit, pagination_key=pagination_key, before=before)
Get visits by visitorId

This endpoint allows you to get a history of visits with all available information. Use the visitorId as a URL path parameter. This API method is scoped to a visitor, i.e. all returned information is by visitorId.
This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received.

### Example
```python
Expand Down Expand Up @@ -96,11 +96,12 @@ except ApiException as e:

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**visitor_id** | **str**| |
**request_id** | **str**| Filter visits by requestId | [optional]
**linked_id** | **str**| Filter visits by custom identifier | [optional]
**limit** | **int**| Limit scanned results | [optional]
**before** | **int**| Timestamp (in milliseconds since epoch) used to paginate results | [optional]
**visitor_id** | **str**| Unique identifier of the visitor issued by Fingerprint Pro. |
**request_id** | **str**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional]
**linked_id** | **str**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#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]
**limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional]
**pagination_key** | **str**| Use `paginationKey` to get the next page of results. When more results are available (e.g., you requested 200 results using `limit` parameter, but a total of 600 results are available), the `paginationKey` top-level attribute is added to the response. The key corresponds to the `requestId` of the last returned event. In the following request, use that value in the `paginationKey` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/visitors/:visitorId?limit=200` 2. Use `response.paginationKey` to get the next page of results: `GET api-base-url/visitors/:visitorId?limit=200&paginationKey=1683900801733.Ogvu1j` Pagination happens during scanning and before filtering, so you can get less visits than the `limit` you specified with more available on the next page. When there are no more results available for scanning, the `paginationKey` attribute is not returned. | [optional]
**before** | **int**| ⚠️ Deprecated pagination method, please use `paginationKey` instead. Timestamp (in milliseconds since epoch) used to paginate results. | [optional]

### Return type

Expand Down
12 changes: 6 additions & 6 deletions docs/IPLocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accuracy_radius** | **int** | |
**latitude** | **float** | |
**longitude** | **float** | |
**accuracy_radius** | **int** | | [optional]
**latitude** | **float** | | [optional]
**longitude** | **float** | | [optional]
**postal_code** | **str** | | [optional]
**timezone** | **str** | |
**timezone** | **str** | | [optional]
**city** | [**IPLocationCity**](IPLocationCity.md) | | [optional]
**country** | [**Location**](Location.md) | |
**continent** | [**Location**](Location.md) | |
**country** | [**Location**](Location.md) | | [optional]
**continent** | [**Location**](Location.md) | | [optional]
**subdivisions** | [**list[Subdivision]**](Subdivision.md) | | [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)
Expand Down
2 changes: 1 addition & 1 deletion docs/IdentificationError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | Error code: * &#x60;429 Too Many Requests&#x60; - the limit on secret API key requests per second has been exceeded * &#x60;Failed&#x60; - internal server error |
**code** | **str** | Error code: * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error |
**message** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/IpBlockListResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | &#x60;true&#x60; if request IP address is part of any database that we use to search for known malicious actors, &#x60;false&#x60; otherwise. | [optional]
**result** | **bool** | `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise. | [optional]
**details** | [**IpBlockListResultDetails**](IpBlockListResultDetails.md) | | [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)
Expand Down
2 changes: 1 addition & 1 deletion docs/ProductError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **str** | Error code: * &#x60;TooManyRequests&#x60; - the limit on secret API key requests per second has been exceeded * &#x60;Failed&#x60; - internal server error |
**code** | **str** | Error code: * `TooManyRequests` - the limit on secret API key requests per second has been exceeded * `Failed` - internal server error |
**message** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/ProductsResponseIdentificationData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**request_id** | **str** | Unique identifier of the user&#x27;s identification request. |
**request_id** | **str** | Unique identifier of the user's identification request. |
**browser_details** | [**BrowserDetails**](BrowserDetails.md) | |
**incognito** | **bool** | Flag if user used incognito session. |
**ip** | **str** | |
**ip_location** | [**IPLocation**](IPLocation.md) | |
**ip_location** | [**IPLocation**](IPLocation.md) | | [optional]
**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. |
**time** | **datetime** | Time expressed according to ISO 8601 in UTC format. |
**url** | **str** | Page URL from which identification request was sent. |
Expand Down
4 changes: 2 additions & 2 deletions docs/Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**visitor_id** | **str** | |
**visits** | [**list[ResponseVisits]**](ResponseVisits.md) | |
**last_timestamp** | **int** | When more results are available (e.g., you scanned 200 results using &#x60;limit&#x60; parameter, but a total of 600 results are available), a special &#x60;lastTimestamp&#x60; top-level attribute is added to the response. If you want to paginate the results further in the past, you should use the value of this attribute. | [optional]
**pagination_key** | **str** | Visit&#x27;s &#x60;requestId&#x60; of the last visit in the current page. | [optional]
**last_timestamp** | **int** | ⚠️ Deprecated paging attribute, please use `paginationKey` instead. Timestamp of the last visit in the current page of results. | [optional]
**pagination_key** | **str** | Request ID of the last visit in the current page of results. Use this value in the following request as the `paginationKey` parameter to get the next page of results. | [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)

4 changes: 2 additions & 2 deletions docs/ResponseVisits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**request_id** | **str** | Unique identifier of the user&#x27;s identification request. |
**request_id** | **str** | Unique identifier of the user's identification request. |
**browser_details** | [**BrowserDetails**](BrowserDetails.md) | |
**incognito** | **bool** | Flag if user used incognito session. |
**ip** | **str** | |
**ip_location** | [**IPLocation**](IPLocation.md) | |
**ip_location** | [**IPLocation**](IPLocation.md) | | [optional]
**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. |
**time** | **datetime** | Time expressed according to ISO 8601 in UTC format. |
**url** | **str** | Page URL from which identification request was sent. |
Expand Down
2 changes: 1 addition & 1 deletion docs/SignalResponseEmulatorData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Android specific emulator detection. There are 2 values: • &#x60;true&#x60; - Emulated environment detected (e.g. launch inside of AVD) • &#x60;false&#x60; - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional]
**result** | **bool** | Android specific emulator detection. There are 2 values: • `true` - Emulated environment detected (e.g. launch inside of AVD) • `false` - No signs of emulated environment detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [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)

2 changes: 1 addition & 1 deletion docs/SignalResponseIncognitoData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | &#x60;true&#x60; if we detected incognito mode used in the browser, &#x60;false&#x60; otherwise. | [optional]
**result** | **bool** | `true` if we detected incognito mode used in the browser, `false` otherwise. | [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)

2 changes: 1 addition & 1 deletion docs/SignalResponseProxyData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | &#x60;true&#x60; if the request IP address is used by a public proxy provider, &#x60;false&#x60; otherwise. | [optional]
**result** | **bool** | `true` if the request IP address is used by a public proxy provider, `false` otherwise. | [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)

2 changes: 1 addition & 1 deletion docs/SignalResponseRootAppsData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Android specific root management apps detection. There are 2 values: • &#x60;true&#x60; - Root Management Apps detected (e.g. Magisk) • &#x60;false&#x60; - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [optional]
**result** | **bool** | Android specific root management apps detection. There are 2 values: • `true` - Root Management Apps detected (e.g. Magisk) • `false` - No Root Management Apps detected Available only for events from Android client. The field will not be present for a browser or iOS event. | [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)

2 changes: 1 addition & 1 deletion docs/SignalResponseTorData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | &#x60;true&#x60; if the request IP address is a known tor exit node, &#x60;false&#x60; otherwise. | [optional]
**result** | **bool** | `true` if the request IP address is a known tor exit node, `false` otherwise. | [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)

2 changes: 1 addition & 1 deletion docs/TamperingResult.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | Flag indicating whether browser tampering was detected according to our internal thresholds. | [optional]
**anomaly_score** | **float** | Confidence score (&#x60;0.0 - 1.0&#x60;) for the tampering detection. Values above &#x60;0.5&#x60; suggest that we&#x27;re reasonably sure there was a tampering attempt. Values below &#x60;0.5&#x60; are genuine browsers. | [optional]
**anomaly_score** | **float** | Confidence score (`0.0 - 1.0`) for the tampering detection. Values above `0.5` suggest that we're reasonably sure there was a tampering attempt. Values below `0.5` are genuine browsers. | [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)

4 changes: 2 additions & 2 deletions docs/Visit.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**request_id** | **str** | Unique identifier of the user&#x27;s identification request. |
**request_id** | **str** | Unique identifier of the user's identification request. |
**browser_details** | [**BrowserDetails**](BrowserDetails.md) | |
**incognito** | **bool** | Flag if user used incognito session. |
**ip** | **str** | |
**ip_location** | [**IPLocation**](IPLocation.md) | |
**ip_location** | [**IPLocation**](IPLocation.md) | | [optional]
**timestamp** | **int** | Timestamp of the event with millisecond precision in Unix time. |
**time** | **datetime** | Time expressed according to ISO 8601 in UTC format. |
**url** | **str** | Page URL from which identification request was sent. |
Expand Down
Loading

0 comments on commit d501cfa

Please sign in to comment.