diff --git a/.changeset/validate-id-path-parameters.md b/.changeset/validate-id-path-parameters.md new file mode 100644 index 00000000..8576e9f4 --- /dev/null +++ b/.changeset/validate-id-path-parameters.md @@ -0,0 +1,5 @@ +--- +'java-sdk': patch +--- + +**sdk**: `getEvent`, `updateEvent`, and `deleteVisitorData` now validate their ID path parameter and throw an `ApiException` without sending a request when the value is not a valid identifier. diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 74968f9d..325b6950 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -89,7 +89,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **visitorId** | **String**| The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. | | +| **visitorId** | **String**| The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. A value that is not a valid identifier is rejected before a request is sent. | | ### Return type @@ -171,7 +171,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **eventId** | **String**| The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). | | +| **eventId** | **String**| The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). A value that is not a valid identifier is rejected before a request is sent. | | | **getEventOptionalParams** | [**FingerprintApi.GetEventOptionalParams**](#fingerprintapigeteventoptionalparams) | | [optional] | #### FingerprintApi.GetEventOptionalParams @@ -541,7 +541,7 @@ public class FingerprintApiExample { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **eventId** | **String**| The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). | | +| **eventId** | **String**| The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). A value that is not a valid identifier is rejected before a request is sent. | | | **eventUpdate** | [**EventUpdate**](EventUpdate.md)| | | ### Return type diff --git a/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java b/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java index e335038b..07c8feec 100644 --- a/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java +++ b/sdk/src/main/java/com/fingerprint/v4/api/FingerprintApi.java @@ -70,7 +70,7 @@ public void setApiClient(ApiClient apiClient) { /** * Delete a visitor ID * Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). - * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) + * @param visitorId The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) A value that is not a valid identifier is rejected with an {@link ApiException} before a request is sent. * @throws ApiException if fails to make API call * @http.response.details *