Skip to content

OpenAPI schema sync #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Mar 14, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/chubby-ducks-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fingerprint-pro-server-api-java-sdk': minor
---

**events-search**: Add 'pagination_key' parameter
2 changes: 1 addition & 1 deletion .schema-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.2.1
v2.3.0
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ public class FingerprintApiExample {
// Search events with custom filters
try {
// By visitorId
EventsGetResponse response = api.searchEvents(LIMIT, FPJS_VISITOR_ID, null, null, null, null, null, null, null);
SearchEventsResponse response = api.searchEvents(LIMIT, null, FPJS_VISITOR_ID, null, null, null, null, null, null, null);
// Next page
// SearchEventsResponse response = api.searchEvents(LIMIT, response.getPaginationKey(), FPJS_VISITOR_ID, null, null, null, null, null, null, null);
// Bad bot
// EventsGetResponse response = api.searchEvents(LIMIT, null, "bad", null, null, null, null, null, null);
// SearchEventsResponse response = api.searchEvents(LIMIT, null, null, "bad", null, null, null, null, null, null);
// Filtered by IP
// EventsGetResponse response = api.searchEvents(LIMIT, null, null, "192.168.0.1/32", null, null, null, null, null);
// SearchEventsResponse response = api.searchEvents(LIMIT, null, null, null, "192.168.0.1/32", null, null, null, null, null);
System.out.println(response.getProducts().toString());
} catch (ApiException e) {
System.err.println("Exception when calling FingerprintApi.getEvent:" + e.getMessage());
Expand Down
6 changes: 4 additions & 2 deletions docs/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ public class FingerprintApiExample {

## searchEvents

> SearchEventsResponse searchEvents(limit, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect)
> SearchEventsResponse searchEvents(limit, paginationKey, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect)

Get events via search

Expand Down Expand Up @@ -418,6 +418,7 @@ public class FingerprintApiExample {
ApiClient client = Configuration.getDefaultApiClient(FPJS_API_SECRET, Region.EUROPE);
FingerprintApi api = new FingerprintApi(client);
Integer limit = 10; // Integer | Limit the number of events returned.
String paginationKey = "paginationKey_example"; // String | 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`
String visitorId = "visitorId_example"; // String | Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`.
String bot = "all"; // String | 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.
String ipAddress = "ipAddress_example"; // String | 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
Expand All @@ -427,7 +428,7 @@ public class FingerprintApiExample {
Boolean reverse = true; // Boolean | Sort events in reverse timestamp order.
Boolean suspect = true; // Boolean | 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.
try {
SearchEventsResponse result = apiInstance.searchEvents(limit, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect);
SearchEventsResponse result = apiInstance.searchEvents(limit, paginationKey, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FingerprintApi.searchEvents:" + e.getMessage());
Expand All @@ -443,6 +444,7 @@ public class FingerprintApiExample {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **limit** | **Integer**| Limit the number of events returned. | |
| **paginationKey** | **String**| 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] |
| **visitorId** | **String**| Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. | [optional] |
| **bot** | **String**| 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] [enum: all, good, bad, none] |
| **ipAddress** | **String**| 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] |
Expand Down
2 changes: 1 addition & 1 deletion docs/SearchEventsResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Contains a list of all identification events matching the specified search crite
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**events** | [**List<SearchEventsResponseEventsInner>**](SearchEventsResponseEventsInner.md) | | [optional] |
|**paginationKey** | **String** | | [optional] |
|**paginationKey** | **String** | Use this value in the `pagination_key` parameter to request the next page of search results. | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static void main(String... args) {

// Search events
try {
final Object events = api.searchEvents(2, null, "bad", null, null, null, null, null, null);
final Object events = api.searchEvents(2, null, null, "bad", null, null, null, null, null, null);
System.out.println(events);
} catch (ApiException e) {
System.err.println("Exception when calling FingerprintApi.searchEvents:" + e.getMessage());
Expand Down
26 changes: 26 additions & 0 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,29 @@ paths:
example: 10
description: |
Limit the number of events returned.
- name: pagination_key
in: query
schema:
type: string
description: >
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`
- name: visitor_id
in: query
schema:
Expand Down Expand Up @@ -2023,6 +2046,9 @@ components:
$ref: '#/components/schemas/Products'
paginationKey:
type: string
description: >-
Use this value in the `pagination_key` parameter to request the next
page of search results.
Visit:
type: object
additionalProperties: false
Expand Down
9 changes: 6 additions & 3 deletions sdk/src/main/java/com/fingerprint/api/FingerprintApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ public ApiResponse<VisitorsGetResponse> getVisitsWithHttpInfo(String visitorId,
* Get events via search
* Search for identification events, including Smart Signals, using multiple filtering criteria. If you don't provide `start` or `end` parameters, the default search range is the last 7 days. Please note that events include mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. We recommend you **ignore** mobile signals for such requests.
* @param limit Limit the number of events returned. (required)
* @param paginationKey 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)
* @param visitorId Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. (optional)
* @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. (optional)
* @param ipAddress 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)
Expand All @@ -402,14 +403,15 @@ public ApiResponse<VisitorsGetResponse> getVisitsWithHttpInfo(String visitorId,
<tr><td> 403 </td><td> Forbidden. Access to this API is denied. </td><td> - </td></tr>
</table>
*/
public SearchEventsResponse searchEvents(Integer limit, String visitorId, String bot, String ipAddress, String linkedId, Long start, Long end, Boolean reverse, Boolean suspect) throws ApiException {
return searchEventsWithHttpInfo(limit, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect).getData();
public SearchEventsResponse searchEvents(Integer limit, String paginationKey, String visitorId, String bot, String ipAddress, String linkedId, Long start, Long end, Boolean reverse, Boolean suspect) throws ApiException {
return searchEventsWithHttpInfo(limit, paginationKey, visitorId, bot, ipAddress, linkedId, start, end, reverse, suspect).getData();
}

/**
* Get events via search
* Search for identification events, including Smart Signals, using multiple filtering criteria. If you don't provide `start` or `end` parameters, the default search range is the last 7 days. Please note that events include mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. We recommend you **ignore** mobile signals for such requests.
* @param limit Limit the number of events returned. (required)
* @param paginationKey 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)
* @param visitorId Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. (optional)
* @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. (optional)
* @param ipAddress 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)
Expand All @@ -428,7 +430,7 @@ public SearchEventsResponse searchEvents(Integer limit, String visitorId, String
<tr><td> 403 </td><td> Forbidden. Access to this API is denied. </td><td> - </td></tr>
</table>
*/
public ApiResponse<SearchEventsResponse> searchEventsWithHttpInfo(Integer limit, String visitorId, String bot, String ipAddress, String linkedId, Long start, Long end, Boolean reverse, Boolean suspect) throws ApiException {
public ApiResponse<SearchEventsResponse> searchEventsWithHttpInfo(Integer limit, String paginationKey, String visitorId, String bot, String ipAddress, String linkedId, Long start, Long end, Boolean reverse, Boolean suspect) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'limit' is set
Expand All @@ -448,6 +450,7 @@ public ApiResponse<SearchEventsResponse> searchEventsWithHttpInfo(Integer limit,
localVarQueryParams.add(new Pair("ii", INTEGRATION_INFO));

localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pagination_key", paginationKey));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "visitor_id", visitorId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "bot", bot));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ip_address", ipAddress));
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/Botd.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public Botd requestId(String requestId) {
}

/**
* Unique identifier of the user&#39;s request.
* Unique identifier of the user's request.
* @return requestId
**/
@jakarta.annotation.Nonnull
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/ClonedApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public ClonedApp result(Boolean result) {
}

/**
* Android specific cloned application detection. There are 2 values: * &#x60;true&#x60; - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * &#x60;false&#x60; - No signs of cloned application detected or the client is not Android.
* Android specific cloned application detection. There are 2 values: * `true` - Presence of app cloners work detected (e.g. fully cloned application found or launch of it inside of a not main working profile detected). * `false` - No signs of cloned application detected or the client is not Android.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public DeveloperTools result(Boolean result) {
}

/**
* &#x60;true&#x60; if the browser is Chrome with DevTools open or Firefox with Developer Tools open, &#x60;false&#x60; otherwise.
* `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/Emulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Emulator result(Boolean result) {
}

/**
* 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 or the client is not Android.
* 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 or the client is not Android.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public FactoryReset timestamp(Long timestamp) {
}

/**
* This field is just another representation of the value in the &#x60;time&#x60; field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time.
* This field is just another representation of the value in the `time` field. The time of the most recent factory reset that happened on the **mobile device** is expressed as Unix epoch time.
* @return timestamp
**/
@jakarta.annotation.Nonnull
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/Frida.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Frida result(Boolean result) {
}

/**
* [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * &#x60;true&#x60; - Frida detected * &#x60;false&#x60; - No signs of Frida or the client is not a mobile device.
* [Frida](https://frida.re/docs/) detection for Android and iOS devices. There are 2 values: * `true` - Frida detected * `false` - No signs of Frida or the client is not a mobile device.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/IPBlocklist.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public IPBlocklist result(Boolean result) {
}

/**
* &#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.
* `true` if request IP address is part of any database that we use to search for known malicious actors, `false` otherwise.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
6 changes: 3 additions & 3 deletions sdk/src/main/java/com/fingerprint/model/Identification.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public Identification visitorId(String visitorId) {
}

/**
* String of 20 characters that uniquely identifies the visitor&#39;s browser.
* String of 20 characters that uniquely identifies the visitor's browser.
* @return visitorId
**/
@jakarta.annotation.Nonnull
Expand All @@ -131,7 +131,7 @@ public Identification requestId(String requestId) {
}

/**
* Unique identifier of the user&#39;s request.
* Unique identifier of the user's request.
* @return requestId
**/
@jakarta.annotation.Nonnull
Expand Down Expand Up @@ -289,7 +289,7 @@ public Identification suspect(Boolean suspect) {
}

/**
* Field is &#x60;true&#x60; if you have previously set the &#x60;suspect&#x60; flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent).
* Field is `true` if you have previously set the `suspect` flag for this event using the [Server API Update event endpoint](https://dev.fingerprint.com/reference/updateevent).
* @return suspect
**/
@jakarta.annotation.Nullable
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/fingerprint/model/Incognito.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Incognito result(Boolean result) {
}

/**
* &#x60;true&#x60; if we detected incognito mode used in the browser, &#x60;false&#x60; otherwise.
* `true` if we detected incognito mode used in the browser, `false` otherwise.
* @return result
**/
@jakarta.annotation.Nonnull
Expand Down
Loading
Loading