Skip to content

Commit 57615d6

Browse files
authored
Merge pull request #108 from fingerprintjs/feat/open-api-v2.3.0
OpenAPI schema sync
2 parents a97cbd4 + 6980fdd commit 57615d6

File tree

11 files changed

+59
-8
lines changed

11 files changed

+59
-8
lines changed

.changeset/chubby-ducks-cheer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-python-sdk': minor
3+
---
4+
5+
**events-search**: Add `pagination_key` parameter

.changeset/pre.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mode": "pre",
3+
"tag": "rc",
4+
"initialVersions": {
5+
"fingerprint-pro-server-api-python-sdk": "8.3.0"
6+
},
7+
"changesets": []
8+
}

.schema-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.2.1
1+
v2.3.0

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API
158158
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
159159

160160
limit = 20 # int | Limit the number of events returned.
161+
pagination_key = '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)
161162
visitor_id = '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)
162163
bot = 'good' # str | Filter events by the bot detection result, specifically: events where <'any'|'good'|'bad'|'none'> kind of bot was detected. (optional)
163164
ip_address = '192.168.0.1/32' # 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)
@@ -169,7 +170,7 @@ suspect = False # bool | Filter events previously tagged as suspi
169170

170171
try:
171172
# Get events via search
172-
api_response = api_instance.search_events(limit, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect)
173+
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)
173174
print(api_response)
174175

175176
except KnownApiException as e:

docs/FingerprintApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ Name | Type | Description | Notes
221221
[[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)
222222

223223
# **search_events**
224-
> SearchEventsResponse search_events(limit, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect)
224+
> 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)
225225
226226
Get events via search
227227

@@ -240,6 +240,7 @@ configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API
240240
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
241241

242242
limit = 56 # int | Limit the number of events returned.
243+
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)
243244
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)
244245
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)
245246
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)
@@ -251,7 +252,7 @@ suspect = true # bool | Filter events previously tagged as suspicious via the [U
251252

252253
try:
253254
# Get events via search
254-
api_response = api_instance.search_events(limit, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect)
255+
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)
255256
print(api_response)
256257
except ApiException as e:
257258
print("Exception when calling FingerprintApi->search_events: %s\n" % e)
@@ -262,6 +263,7 @@ except ApiException as e:
262263
Name | Type | Description | Notes
263264
------------- | ------------- | ------------- | -------------
264265
**limit** | **int**| Limit the number of events returned. |
266+
**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]
265267
**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]
266268
**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]
267269
**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]

docs/SearchEventsResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Contains a list of all identification events matching the specified search crite
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**events** | [**list[SearchEventsResponseEvents]**](SearchEventsResponseEvents.md) | | [optional]
9-
**pagination_key** | **str** | | [optional]
9+
**pagination_key** | **str** | Use this value in the `pagination_key` parameter to request the next page of search results. | [optional]
1010

1111
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1212

fingerprint_pro_server_api_sdk/api/fingerprint_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ def search_events(self, limit: int, **kwargs) -> Union[SearchEventsResponse, Asy
507507
508508
:param async_req bool
509509
:param limit: Limit the number of events returned. (required)
510+
: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`
510511
: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`.
511512
: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.
512513
: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
@@ -537,6 +538,7 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501
537538
538539
:param async_req bool
539540
:param int limit: Limit the number of events returned. (required)
541+
: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`
540542
: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`.
541543
: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.
542544
: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
@@ -552,6 +554,7 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501
552554

553555
all_params = [
554556
'limit',
557+
'pagination_key',
555558
'visitor_id',
556559
'bot',
557560
'ip_address',
@@ -585,6 +588,8 @@ def search_events_with_http_info(self, limit: int, **kwargs): # noqa: E501
585588
query_params = [('ii', 'fingerprint-pro-server-python-sdk/8.3.0')]
586589
if 'limit' in params:
587590
query_params.append(('limit', params['limit'])) # noqa: E501
591+
if 'pagination_key' in params:
592+
query_params.append(('pagination_key', params['pagination_key'])) # noqa: E501
588593
if 'visitor_id' in params:
589594
query_params.append(('visitor_id', params['visitor_id'])) # noqa: E501
590595
if 'bot' in params:

fingerprint_pro_server_api_sdk/models/search_events_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def events(self, events: Optional[List[SearchEventsResponseEvents]]):
7979
def pagination_key(self) -> Optional[str]:
8080
"""Gets the pagination_key of this SearchEventsResponse. # noqa: E501
8181
82+
Use this value in the `pagination_key` parameter to request the next page of search results. # noqa: E501
8283
8384
:return: The pagination_key of this SearchEventsResponse. # noqa: E501
8485
"""
@@ -88,6 +89,7 @@ def pagination_key(self) -> Optional[str]:
8889
def pagination_key(self, pagination_key: Optional[str]):
8990
"""Sets the pagination_key of this SearchEventsResponse.
9091
92+
Use this value in the `pagination_key` parameter to request the next page of search results. # noqa: E501
9193
9294
:param pagination_key: The pagination_key of this SearchEventsResponse. # noqa: E501
9395
"""

res/fingerprint-server-api.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,29 @@ paths:
168168
example: 10
169169
description: |
170170
Limit the number of events returned.
171+
- name: pagination_key
172+
in: query
173+
schema:
174+
type: string
175+
description: >
176+
Use `pagination_key` to get the next page of results.
177+
178+
179+
When more results are available (e.g., you requested up to 200
180+
results for your search using `limit`, but there are more than 200
181+
events total matching your request), the `paginationKey` top-level
182+
attribute is added to the response. The key corresponds to the
183+
`timestamp` of the last returned event. In the following request,
184+
use that value in the `pagination_key` parameter to get the next
185+
page of results:
186+
187+
188+
1. First request, returning most recent 200 events: `GET
189+
api-base-url/events/search?limit=200`
190+
191+
2. Use `response.paginationKey` to get the next page of results:
192+
`GET
193+
api-base-url/events/search?limit=200&pagination_key=1740815825085`
171194
- name: visitor_id
172195
in: query
173196
schema:
@@ -2023,6 +2046,9 @@ components:
20232046
$ref: '#/components/schemas/Products'
20242047
paginationKey:
20252048
type: string
2049+
description: >-
2050+
Use this value in the `pagination_key` parameter to request the next
2051+
page of search results.
20262052
Visit:
20272053
type: object
20282054
additionalProperties: false

template/README.mustache

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API
164164
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
165165

166166
limit = 20 # int | Limit the number of events returned.
167+
pagination_key = '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)
167168
visitor_id = '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)
168169
bot = 'good' # str | Filter events by the bot detection result, specifically: events where <'any'|'good'|'bad'|'none'> kind of bot was detected. (optional)
169170
ip_address = '192.168.0.1/32' # 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)
@@ -175,7 +176,7 @@ suspect = False # bool | Filter events previously tagged as suspi
175176

176177
try:
177178
# Get events via search
178-
api_response = api_instance.search_events(limit, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect)
179+
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)
179180
print(api_response)
180181

181182
except KnownApiException as e:

0 commit comments

Comments
 (0)