diff --git a/.changeset/shiny-ghosts-sin.md b/.changeset/shiny-ghosts-sin.md new file mode 100644 index 0000000..14f07b3 --- /dev/null +++ b/.changeset/shiny-ghosts-sin.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-java-sdk': minor +--- + +**events-search**: Event search now supports two new filter parameters: `ip_blocklist`, `datacenter` diff --git a/.schema-version b/.schema-version index d80b4a8..7433fb3 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v2.5.0 \ No newline at end of file +v2.6.0 \ No newline at end of file diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 0e0c09b..3688ca2 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -439,8 +439,10 @@ public class FingerprintApiExample { Boolean clonedApp = true; // Boolean | 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. Boolean emulator = true; // Boolean | 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. Boolean rootApps = true; // Boolean | 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. - String vpnConfidence = "high,"; // String | 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. + String vpnConfidence = "high"; // String | 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. Float minSuspectScore = 3.4F; // 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. + Boolean ipBlocklist = true; // Boolean | Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. + Boolean datacenter = true; // Boolean | Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. try { SearchEventsResponse result = api.searchEvents(limit, new FingerprintApi.SearchEventsOptionalParams() .setPaginationKey(paginationKey) @@ -465,7 +467,9 @@ public class FingerprintApiExample { .setEmulator(emulator) .setRootApps(rootApps) .setVpnConfidence(vpnConfidence) - .setMinSuspectScore(minSuspectScore)); + .setMinSuspectScore(minSuspectScore) + .setIpBlocklist(ipBlocklist) + .setDatacenter(datacenter)); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FingerprintApi.searchEvents:" + e.getMessage()); @@ -510,8 +514,10 @@ Object containing optional parameters for API method. Supports a fluent interfac | **clonedApp** | **Boolean**| 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** | **Boolean**| 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] | | **rootApps** | **Boolean**| 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] | -| **vpnConfidence** | **String**| 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] [enum: high,, medium, low] | +| **vpnConfidence** | **String**| 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] [enum: high, medium, low] | | **minSuspectScore** | **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] | +| **ipBlocklist** | **Boolean**| Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. | [optional] | +| **datacenter** | **Boolean**| Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. | [optional] | ### Return type diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 3122979..ff281b2 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -414,7 +414,7 @@ paths: schema: type: string enum: - - high, + - high - medium - low description: > @@ -444,6 +444,29 @@ paths: exceeding your threshold are returned. Events without a `products.suspectScore` Smart Signal result are left out of the response. + - name: ip_blocklist + in: query + schema: + type: boolean + description: > + Filter events by IP Blocklist Detection result. + + > Note: When using this parameter, only events with the + `products.ipBlocklist.data.result` property set to `true` or `false` + are returned. Events without a `products.ipBlocklist` Smart Signal + result are left out of the response. + - name: datacenter + in: query + schema: + type: boolean + description: > + Filter events by Datacenter Detection result. + + > Note: When using this parameter, only events with the + `products.ipInfo.data.v4.datacenter.result` or + `products.ipInfo.data.v6.datacenter.result` property set to `true` + or `false` are returned. Events without a `products.ipInfo` Smart + Signal result are left out of the response. responses: '200': description: Events matching the filter(s). diff --git a/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java b/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java index 948cc16..b15120e 100644 --- a/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java +++ b/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java @@ -405,6 +405,8 @@ public static class SearchEventsOptionalParams { private Boolean rootApps; private String vpnConfidence; private Float minSuspectScore; + private Boolean ipBlocklist; + private Boolean datacenter; /** * getter for 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` @@ -751,6 +753,36 @@ public SearchEventsOptionalParams setMinSuspectScore(Float minSuspectScore) { return this; } + /** + * getter for ipBlocklist - Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. + */ + public Boolean getIpBlocklist() { + return ipBlocklist; + } + + /** + * setter for ipBlocklist - Filter events by IP Blocklist Detection result. > Note: When using this parameter, only events with the `products.ipBlocklist.data.result` property set to `true` or `false` are returned. Events without a `products.ipBlocklist` Smart Signal result are left out of the response. + */ + public SearchEventsOptionalParams setIpBlocklist(Boolean ipBlocklist) { + this.ipBlocklist = ipBlocklist; + return this; + } + + /** + * getter for datacenter - Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. + */ + public Boolean getDatacenter() { + return datacenter; + } + + /** + * setter for datacenter - Filter events by Datacenter Detection result. > Note: When using this parameter, only events with the `products.ipInfo.data.v4.datacenter.result` or `products.ipInfo.data.v6.datacenter.result` property set to `true` or `false` are returned. Events without a `products.ipInfo` Smart Signal result are left out of the response. + */ + public SearchEventsOptionalParams setDatacenter(Boolean datacenter) { + this.datacenter = datacenter; + return this; + } + } /** * Get events via search @@ -830,6 +862,8 @@ public ApiResponse searchEventsWithHttpInfo(Integer limit, localVarQueryParams.addAll(apiClient.parameterToPairs("", "root_apps", searchEventsOptionalParams.getRootApps())); localVarQueryParams.addAll(apiClient.parameterToPairs("", "vpn_confidence", searchEventsOptionalParams.getVpnConfidence())); localVarQueryParams.addAll(apiClient.parameterToPairs("", "min_suspect_score", searchEventsOptionalParams.getMinSuspectScore())); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "ip_blocklist", searchEventsOptionalParams.getIpBlocklist())); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "datacenter", searchEventsOptionalParams.getDatacenter())); } diff --git a/sdk/src/test/java/com/fingerprint/api/FingerprintApiTest.java b/sdk/src/test/java/com/fingerprint/api/FingerprintApiTest.java index 128168b..2525adc 100644 --- a/sdk/src/test/java/com/fingerprint/api/FingerprintApiTest.java +++ b/sdk/src/test/java/com/fingerprint/api/FingerprintApiTest.java @@ -580,6 +580,8 @@ public void searchEventsMaximumParamsTest() throws ApiException { final String VPN_CONFIDENCE = "medium"; final Boolean EMULATOR = true; final Boolean INCOGNITO = true; + final Boolean IP_BLOCKLIST = true; + final Boolean DATACENTER = true; Map expectedQueryParams = new HashMap<>(); expectedQueryParams.put("limit", String.valueOf(LIMIT)); @@ -606,6 +608,8 @@ public void searchEventsMaximumParamsTest() throws ApiException { expectedQueryParams.put("vpn_confidence", VPN_CONFIDENCE); expectedQueryParams.put("emulator", String.valueOf(EMULATOR)); expectedQueryParams.put("incognito", String.valueOf(INCOGNITO)); + expectedQueryParams.put("ip_blocklist", String.valueOf(IP_BLOCKLIST)); + expectedQueryParams.put("datacenter", String.valueOf(DATACENTER)); addMock("searchEvents", null, invocation -> { List queryParams = invocation.getArgument(3); @@ -638,7 +642,9 @@ public void searchEventsMaximumParamsTest() throws ApiException { .setVpn(VPN) .setVpnConfidence(VPN_CONFIDENCE) .setEmulator(EMULATOR) - .setIncognito(INCOGNITO)); + .setIncognito(INCOGNITO) + .setIpBlocklist(IP_BLOCKLIST) + .setDatacenter(DATACENTER)); List events = response.getEvents(); assertEquals(events.size(), 1); }