From 0cec95a7371808bb34f4b64e0e86570adfac8b65 Mon Sep 17 00:00:00 2001 From: TheUnderScorer Date: Fri, 4 Oct 2024 09:54:05 +0000 Subject: [PATCH] feat: update OpenAPI schema --- .changeset/orange-taxis-fetch.md | 5 + .changeset/wild-oranges-feel.md | 5 + .schema-version | 1 + README.md | 1 - docs/FingerprintApi.md | 28 +- docs/Visit.md | 26 - res/fingerprint-server-api.yaml | 2716 ++++++++--------- .../com/fingerprint/api/FingerprintApi.java | 4 +- .../java/com/fingerprint/model/Visit.java | 530 ---- .../get_related_visitors_200.json | 10 + .../get_related_visitors_200_empty.json | 3 + .../shared/400_error_empty_visitor_id.json | 6 + .../400_error_incorrect_visitor_id.json | 6 + .../shared/403_error_feature_not_enabled.json | 6 + .../shared/403_error_token_not_found.json | 6 + .../shared/403_error_token_required.json | 6 + .../mocks/shared/403_error_wrong_region.json | 6 + .../shared/404_error_visitor_not_found.json | 6 + .../shared/429_error_too_many_requests.json | 6 + 19 files changed, 1418 insertions(+), 1959 deletions(-) create mode 100644 .changeset/orange-taxis-fetch.md create mode 100644 .changeset/wild-oranges-feel.md create mode 100644 .schema-version delete mode 100644 docs/Visit.md delete mode 100644 sdk/src/main/java/com/fingerprint/model/Visit.java create mode 100644 sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200.json create mode 100644 sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200_empty.json create mode 100644 sdk/src/test/resources/mocks/shared/400_error_empty_visitor_id.json create mode 100644 sdk/src/test/resources/mocks/shared/400_error_incorrect_visitor_id.json create mode 100644 sdk/src/test/resources/mocks/shared/403_error_feature_not_enabled.json create mode 100644 sdk/src/test/resources/mocks/shared/403_error_token_not_found.json create mode 100644 sdk/src/test/resources/mocks/shared/403_error_token_required.json create mode 100644 sdk/src/test/resources/mocks/shared/403_error_wrong_region.json create mode 100644 sdk/src/test/resources/mocks/shared/404_error_visitor_not_found.json create mode 100644 sdk/src/test/resources/mocks/shared/429_error_too_many_requests.json diff --git a/.changeset/orange-taxis-fetch.md b/.changeset/orange-taxis-fetch.md new file mode 100644 index 00000000..71fca004 --- /dev/null +++ b/.changeset/orange-taxis-fetch.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-java-sdk': minor +--- + +**visitors**: Add the confidence field to the VPN Detection Smart Signal \ No newline at end of file diff --git a/.changeset/wild-oranges-feel.md b/.changeset/wild-oranges-feel.md new file mode 100644 index 00000000..a1864956 --- /dev/null +++ b/.changeset/wild-oranges-feel.md @@ -0,0 +1,5 @@ +--- +'fingerprint-pro-server-api-java-sdk': minor +--- + +**events**: Introduce `PUT` endpoint for `/events` API diff --git a/.schema-version b/.schema-version new file mode 100644 index 00000000..0408c30b --- /dev/null +++ b/.schema-version @@ -0,0 +1 @@ +v1.2.0 \ No newline at end of file diff --git a/README.md b/README.md index 137add97..0cd8ea7f 100644 --- a/README.md +++ b/README.md @@ -369,7 +369,6 @@ Class | Method | HTTP request | Description - [VelocityIntervals](docs/VelocityIntervals.md) - [VelocityResult](docs/VelocityResult.md) - [VirtualMachineResult](docs/VirtualMachineResult.md) - - [Visit](docs/Visit.md) - [VpnResult](docs/VpnResult.md) - [VpnResultMethods](docs/VpnResultMethods.md) - [WebhookVisit](docs/WebhookVisit.md) diff --git a/docs/FingerprintApi.md b/docs/FingerprintApi.md index 53223681..e193c4e8 100644 --- a/docs/FingerprintApi.md +++ b/docs/FingerprintApi.md @@ -19,12 +19,28 @@ All URIs are relative to *https://api.fpjs.io* Delete data by visitor ID Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. -All delete requests are queued: - -* Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. -* Data from older (11 days or more) identification events will be deleted after 90 days. - -If you are interested in using this API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. +### Which data is deleted? +- Browser (or device) properties +- Identification requests made from this browser (or device) + +#### Browser (or device) properties +- Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. +- Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). + +#### Identification requests made from this browser (or device) +- Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). +- Upon request to delete, the identification requests that were made by this browser + - Within the past 10 days are deleted within 24 hrs. + - Outside of 10 days are allowed to purge as per your data retention period. + +### Corollary +After requesting to delete a visitor ID, +- If the same browser (or device) requests to identify, it will receive a different visitor ID. +- If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. +- If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. + +### Interested? +Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. ### Example diff --git a/docs/Visit.md b/docs/Visit.md deleted file mode 100644 index 6b504951..00000000 --- a/docs/Visit.md +++ /dev/null @@ -1,26 +0,0 @@ - - -# Visit - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**requestId** | **String** | Unique identifier of the user's identification request. | | -|**browserDetails** | [**BrowserDetails**](BrowserDetails.md) | | | -|**incognito** | **Boolean** | Flag if user used incognito session. | | -|**ip** | **String** | | | -|**ipLocation** | [**DeprecatedIPLocation**](DeprecatedIPLocation.md) | | [optional] | -|**timestamp** | **Long** | Timestamp of the event with millisecond precision in Unix time. | | -|**time** | **OffsetDateTime** | Time expressed according to ISO 8601 in UTC format. | | -|**url** | **String** | Page URL from which the identification request was sent. | | -|**tag** | **Map<String, Object>** | A customer-provided value or an object that was sent with identification request. | [optional] | -|**linkedId** | **String** | A customer-provided id that was sent with identification request. | [optional] | -|**confidence** | [**Confidence**](Confidence.md) | | [optional] | -|**visitorFound** | **Boolean** | Attribute represents if a visitor had been identified before. | | -|**firstSeenAt** | [**SeenAt**](SeenAt.md) | | | -|**lastSeenAt** | [**SeenAt**](SeenAt.md) | | | - - - diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index f6e6d701..0281bdce 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -290,19 +290,58 @@ paths: Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. - All delete requests are queued: + ### Which data is deleted? + - Browser (or device) properties - * Recent data (10 days or newer) belonging to the specified visitor will - be deleted within 24 hours. + - Identification requests made from this browser (or device) - * Data from older (11 days or more) identification events will be - deleted after 90 days. + #### Browser (or device) properties - If you are interested in using this API, please [contact our support - team](https://fingerprint.com/support/) to enable it for you. Otherwise, - you will receive a 403. + - Represents the data that Fingerprint collected from this specific + browser (or device) and everything inferred and derived from it. + + - Upon request to delete, this data is deleted asynchronously (typically + within a few minutes) and it will no longer be used to identify this + browser (or device) for your [Fingerprint + Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). + + + #### Identification requests made from this browser (or device) + + - Fingerprint stores the identification requests made from a browser (or + device) for up to 30 (or 90) days depending on your plan. To learn more, + see [Data + Retention](https://dev.fingerprint.com/docs/regions#data-retention). + + - Upon request to delete, the identification requests that were made by + this browser + - Within the past 10 days are deleted within 24 hrs. + - Outside of 10 days are allowed to purge as per your data retention period. + + ### Corollary + + After requesting to delete a visitor ID, + + - If the same browser (or device) requests to identify, it will receive + a different visitor ID. + + - If you request [`/events` + API](https://dev.fingerprint.com/reference/getevent) with a `request_id` + that was made outside of the 10 days, you will still receive a valid + response. + + - If you request [`/visitors` + API](https://dev.fingerprint.com/reference/getvisits) for the deleted + visitor ID, the response will include identification requests that were + made outside of those 10 days. + + + ### Interested? + + Please [contact our support team](https://fingerprint.com/support/) to + enable it for you. Otherwise, you will receive a 403. parameters: - name: visitor_id in: path @@ -548,1264 +587,511 @@ components: in: query name: api_key schemas: - Response: + BrowserDetails: type: object additionalProperties: false properties: - visitorId: + browserName: type: string - visits: - type: array - items: - title: ResponseVisits - type: object - properties: - requestId: - description: Unique identifier of the user's identification request. - type: string - example: 1654815516083.OX6kx8 - browserDetails: - $ref: '#/components/schemas/BrowserDetails' - incognito: - description: Flag if user used incognito session. - type: boolean - ip: - type: string - format: ipv4 - example: 8.8.8.8 - ipLocation: - type: object - additionalProperties: false - deprecated: true - description: >- - This field is **deprecated** and will not return a result for - **applications created after January 23rd, 2024**. Please use - the [IP Geolocation Smart - signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) - for geolocation information. - properties: - accuracyRadius: - description: >- - The IP address is likely to be within this radius (in km) - of the specified location. - type: integer - minimum: 0 - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 - postalCode: - type: string - timezone: - type: string - format: timezone - city: - type: object - additionalProperties: false - title: DeprecatedIPLocationCity - properties: - name: - type: string - country: - $ref: '#/components/schemas/Location' - continent: - $ref: '#/components/schemas/Location' - subdivisions: - type: array - items: - $ref: '#/components/schemas/Subdivision' - title: DeprecatedIPLocation - timestamp: - description: >- - Timestamp of the event with millisecond precision in Unix - time. - type: integer - format: int64 - example: 1654815516086 - time: - title: Time - description: Time expressed according to ISO 8601 in UTC format. - type: string - format: date-time - example: '2022-06-09T22:58:36Z' - url: - description: Page URL from which the identification request was sent. - type: string - example: https://some.website/path?query=params - tag: - description: >- - A customer-provided value or an object that was sent with - identification request. - type: object - additionalProperties: true - linkedId: - description: >- - A customer-provided id that was sent with identification - request. - type: string - example: someID - confidence: - $ref: '#/components/schemas/Confidence' - visitorFound: - description: Attribute represents if a visitor had been identified before. - type: boolean - firstSeenAt: - $ref: '#/components/schemas/SeenAt' - lastSeenAt: - $ref: '#/components/schemas/SeenAt' - additionalProperties: false - required: - - browserDetails - - firstSeenAt - - incognito - - ip - - lastSeenAt - - requestId - - time - - timestamp - - url - - visitorFound - - tag - lastTimestamp: - description: > - ⚠️ Deprecated paging attribute, please use `paginationKey` instead. - Timestamp of the last visit in the current page of results. - type: integer - format: int64 - example: 1654815517198 - paginationKey: - description: >- - 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. + example: Chrome + browserMajorVersion: type: string - example: 1654815517198.azN4IZ + example: '101' + browserFullVersion: + type: string + example: 101.0.4951 + os: + type: string + example: Windows + osVersion: + type: string + example: '10' + device: + type: string + example: Other + userAgent: + type: string + example: >- + Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, + like Gecko) Chrome/101.0.4951.41 Safari/537.36 + botProbability: + type: integer required: - - visitorId - - visits - title: PaginatedResponse - description: >- - Fields `lastTimestamp` and `paginationKey` added when `limit` or - `before` parameter provided and there is more data to show - ErrorCommon403Response: + - browserFullVersion + - browserMajorVersion + - browserName + - device + - os + - osVersion + - userAgent + title: BrowserDetails + Location: type: object additionalProperties: false properties: - error: - type: object - additionalProperties: false - title: Common403ErrorResponse - properties: - code: - type: string - description: | - Error code: - * `TokenRequired` - `Auth-API-Key` header is missing or empty - * `TokenNotFound` - No Fingerprint application found for specified secret key - * `SubscriptionNotActive` - Fingerprint application is not active - * `WrongRegion` - server and application region differ - * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application - enum: - - TokenRequired - - TokenNotFound - - SubscriptionNotActive - - WrongRegion - - FeatureNotEnabled - example: TokenRequired - message: - type: string - example: secret key is required - required: - - code - - message - ErrorCommon429Response: + code: + type: string + minLength: 2 + maxLength: 2 + example: US + name: + type: string + example: United States + required: + - code + - name + title: Location + Subdivision: type: object additionalProperties: false properties: - error: - type: object - additionalProperties: false - properties: - code: - type: string - description: | - Error code: * `TooManyRequests` - The request is throttled. - enum: - - TooManyRequests - example: TooManyRequests - message: - type: string - example: request throttled - required: - - code - - message - ErrorEvent404Response: + isoCode: + type: string + example: '10' + name: + type: string + example: Hlavni mesto Praha + Confidence: type: object additionalProperties: false properties: - error: - type: object - additionalProperties: false - title: ErrorEvent404ResponseError - properties: - code: - type: string - description: | - Error code: - * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. - enum: - - RequestNotFound - example: RequestNotFound - message: - type: string - example: request id is not found - required: - - code - - message - ErrorVisits403: + score: + description: >- + The confidence score is a floating-point number between 0 and 1 that + represents the probability of accurate identification. + type: number + format: float + minimum: 0 + maximum: 1 + revision: + description: >- + The revision name of the method used to calculate the Confidence + score. This field is only present for customers who opted in to an + alternative calculation method. + type: string + required: + - score + title: Confidence + SeenAt: type: object additionalProperties: false properties: - error: + global: type: string - description: Error text. - example: Forbidden (HTTP 403) + nullable: true + format: date-time + example: '2022-05-05T18:28:54.535Z' + subscription: + type: string + nullable: true + format: date-time + example: '2022-06-09T22:58:05.576Z' required: - - error - TooManyRequestsResponse: + - global + - subscription + title: SeenAt + example: + global: '2022-05-05T18:28:54.535Z' + subscription: null + IdentificationError: type: object additionalProperties: false properties: - error: + code: type: string - description: Error text. - example: request throttled + description: | + Error code: + * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded + * `Failed` - internal server error + enum: + - 429 Too Many Requests + - Failed + example: 429 Too Many Requests + message: + type: string + example: too many requests required: - - error - ErrorVisitor404Response: + - code + - message + BotdDetectionResult: type: object additionalProperties: false + description: Stores bot detection result properties: - error: - type: object - additionalProperties: false - title: ErrorVisitor404ResponseError - properties: - code: - type: string - description: > - Error code: * `VisitorNotFound` - The specified visitor ID was - not found. It never existed or it may have already been deleted. - enum: - - VisitorNotFound - example: VisitorNotFound - message: - type: string - example: visitor not found - required: - - code - - message - ErrorVisitor400Response: + result: + type: string + description: | + 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 + enum: + - notDetected + - good + - bad + example: bad + type: + type: string + example: selenium + required: + - result + BotdResult: type: object additionalProperties: false + description: Contains all the information from Bot Detection product properties: - error: - type: object - additionalProperties: false - properties: - code: - type: string - description: > - Error code: * `RequestCannotBeParsed` - The visitor ID parameter - is missing or in the wrong format. - enum: - - RequestCannotBeParsed - example: RequestCannotBeParsed - message: - type: string - example: invalid visitor id - required: - - code - - message - WebhookVisit: - type: object - properties: - visitorId: + ip: type: string - example: 3HNey93AkBW6CRbxV6xP - clientReferrer: + format: ipv4 + example: 8.8.8.8 + description: IP address of the requesting browser or bot. + time: + title: Time + description: >- + Time in UTC when the request from the JS agent was made. We + recommend to treat requests that are older than 2 minutes as + malicious. Otherwise, request replay attacks are possible type: string - example: https://google.com?search=banking+services + format: date-time + example: '2022-06-09T22:58:36Z' + url: + description: Page URL from which identification request was sent. + type: string + example: https://example.com/login userAgent: type: string example: >- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 + requestId: + type: string + example: 1681392853693.lRiBBD + linkedId: + type: string + example: Automatic tests bot bot: $ref: '#/components/schemas/BotdDetectionResult' - ipInfo: - $ref: '#/components/schemas/IpInfoResult' - incognito: - description: Flag if user used incognito session. - type: boolean - rootApps: - $ref: '#/components/schemas/RootAppsResult' - emulator: - $ref: '#/components/schemas/EmulatorResult' - clonedApp: - $ref: '#/components/schemas/ClonedAppResult' - factoryReset: - $ref: '#/components/schemas/FactoryResetResult' - jailbroken: - $ref: '#/components/schemas/JailbrokenResult' - frida: - $ref: '#/components/schemas/FridaResult' - ipBlocklist: - $ref: '#/components/schemas/IpBlockListResult' - tor: - $ref: '#/components/schemas/TorResult' - privacySettings: - $ref: '#/components/schemas/PrivacySettingsResult' - virtualMachine: - $ref: '#/components/schemas/VirtualMachineResult' - vpn: - $ref: '#/components/schemas/VpnResult' - proxy: - $ref: '#/components/schemas/ProxyResult' - tampering: - $ref: '#/components/schemas/TamperingResult' - rawDeviceAttributes: - $ref: '#/components/schemas/RawDeviceAttributesResult' - highActivity: - $ref: '#/components/schemas/HighActivityResult' - locationSpoofing: - $ref: '#/components/schemas/LocationSpoofingResult' - suspectScore: - $ref: '#/components/schemas/SuspectScoreResult' - remoteControl: - $ref: '#/components/schemas/RemoteControlResult' - velocity: - $ref: '#/components/schemas/VelocityResult' - developerTools: - $ref: '#/components/schemas/DeveloperToolsResult' - requestId: - description: Unique identifier of the user's identification request. + required: + - bot + - url + - ip + - time + - userAgent + - requestId + ProductError: + type: object + additionalProperties: false + properties: + code: type: string - example: 1654815516083.OX6kx8 - browserDetails: - $ref: '#/components/schemas/BrowserDetails' - ip: + description: | + Error code: + * `TooManyRequests` - the limit on secret API key requests per second has been exceeded + * `Failed` - internal server error + enum: + - TooManyRequests + - Failed + example: TooManyRequests + message: type: string - format: ipv4 - example: 8.8.8.8 - ipLocation: - type: object - additionalProperties: false - deprecated: true + example: too many requests + required: + - code + - message + IPLocation: + type: object + additionalProperties: false + properties: + accuracyRadius: description: >- - This field is **deprecated** and will not return a result for - **applications created after January 23rd, 2024**. Please use the - [IP Geolocation Smart - signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) - for geolocation information. - properties: - accuracyRadius: - description: >- - The IP address is likely to be within this radius (in km) of the - specified location. - type: integer - minimum: 0 - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 - postalCode: - type: string - timezone: - type: string - format: timezone - city: - type: object - additionalProperties: false - title: DeprecatedIPLocationCity - properties: - name: - type: string - country: - $ref: '#/components/schemas/Location' - continent: - $ref: '#/components/schemas/Location' - subdivisions: - type: array - items: - $ref: '#/components/schemas/Subdivision' - title: DeprecatedIPLocation - timestamp: - description: Timestamp of the event with millisecond precision in Unix time. + The IP address is likely to be within this radius (in km) of the + specified location. type: integer - format: int64 - example: 1654815516086 - time: - title: Time - description: Time expressed according to ISO 8601 in UTC format. + minimum: 0 + example: 1000 + latitude: + type: number + format: double + minimum: -90 + maximum: 90 + example: 37.75 + longitude: + type: number + format: double + minimum: -180 + maximum: 180 + example: -97.82 + postalCode: type: string - format: date-time - example: '2022-06-09T22:58:36Z' - url: - description: Page URL from which the identification request was sent. + example: 130 00 + timezone: type: string - example: https://some.website/path?query=params - tag: - description: >- - A customer-provided value or an object that was sent with - identification request. + format: timezone + example: America/Chicago + city: type: object - additionalProperties: true - linkedId: - description: A customer-provided id that was sent with identification request. - type: string - example: someID - confidence: - $ref: '#/components/schemas/Confidence' - visitorFound: - description: Attribute represents if a visitor had been identified before. - type: boolean - firstSeenAt: - $ref: '#/components/schemas/SeenAt' - lastSeenAt: - $ref: '#/components/schemas/SeenAt' + additionalProperties: false + title: IPLocationCity + properties: + name: + type: string + example: Prague + country: + $ref: '#/components/schemas/Location' + continent: + $ref: '#/components/schemas/Location' + subdivisions: + type: array + items: + $ref: '#/components/schemas/Subdivision' + title: IPLocation + ASN: + type: object additionalProperties: false + properties: + asn: + type: string + example: '7922' + network: + type: string + example: 73.136.0.0/13 + name: + type: string + example: COMCAST-7922 required: - - visitorId - - browserDetails - - firstSeenAt - - incognito - - ip - - lastSeenAt - - requestId - - time - - timestamp - - url - - visitorFound - Visit: + - asn + - network + title: ASN + DataCenter: type: object additionalProperties: false properties: - requestId: - description: Unique identifier of the user's identification request. - type: string - example: 1654815516083.OX6kx8 - browserDetails: - $ref: '#/components/schemas/BrowserDetails' - incognito: - description: Flag if user used incognito session. + result: type: boolean - ip: + name: type: string - format: ipv4 - example: 8.8.8.8 - ipLocation: + example: DediPath + required: + - result + title: DataCenter + IpInfoResult: + type: object + description: >- + Details about the request IP address. Has separate fields for v4 and v6 + IP address versions. + additionalProperties: false + properties: + v4: type: object additionalProperties: false - deprecated: true - description: >- - This field is **deprecated** and will not return a result for - **applications created after January 23rd, 2024**. Please use the - [IP Geolocation Smart - signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) - for geolocation information. properties: - accuracyRadius: - description: >- - The IP address is likely to be within this radius (in km) of the - specified location. - type: integer - minimum: 0 - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 - postalCode: - type: string - timezone: + address: type: string - format: timezone - city: - type: object - additionalProperties: false - title: DeprecatedIPLocationCity - properties: - name: - type: string - country: - $ref: '#/components/schemas/Location' - continent: - $ref: '#/components/schemas/Location' - subdivisions: - type: array - items: - $ref: '#/components/schemas/Subdivision' - title: DeprecatedIPLocation - timestamp: - description: Timestamp of the event with millisecond precision in Unix time. - type: integer - format: int64 - example: 1654815516086 - time: - title: Time - description: Time expressed according to ISO 8601 in UTC format. - type: string - format: date-time - example: '2022-06-09T22:58:36Z' - url: - description: Page URL from which the identification request was sent. - type: string - example: https://some.website/path?query=params - tag: - description: >- - A customer-provided value or an object that was sent with - identification request. + format: ipv4 + example: 94.142.239.124 + geolocation: + $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenter' + required: + - address + - geolocation + v6: type: object - additionalProperties: true - linkedId: - description: A customer-provided id that was sent with identification request. - type: string - example: someID - confidence: - $ref: '#/components/schemas/Confidence' - visitorFound: - description: Attribute represents if a visitor had been identified before. - type: boolean - firstSeenAt: - $ref: '#/components/schemas/SeenAt' - lastSeenAt: - $ref: '#/components/schemas/SeenAt' - required: - - browserDetails - - firstSeenAt - - incognito - - ip - - lastSeenAt - - requestId - - time - - timestamp - - url - - visitorFound - title: Visit - BrowserDetails: + additionalProperties: false + properties: + address: + type: string + format: ipv6 + example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 + geolocation: + $ref: '#/components/schemas/IPLocation' + asn: + $ref: '#/components/schemas/ASN' + datacenter: + $ref: '#/components/schemas/DataCenter' + required: + - address + - geolocation + IncognitoResult: type: object additionalProperties: false properties: - browserName: - type: string - example: Chrome - browserMajorVersion: - type: string - example: '101' - browserFullVersion: - type: string - example: 101.0.4951 - os: - type: string - example: Windows - osVersion: - type: string - example: '10' - device: - type: string - example: Other - userAgent: - type: string - example: >- - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, - like Gecko) Chrome/101.0.4951.41 Safari/537.36 - botProbability: - type: integer + result: + type: boolean + description: > + `true` if we detected incognito mode used in the browser, `false` + otherwise. + example: false required: - - browserFullVersion - - browserMajorVersion - - browserName - - device - - os - - osVersion - - userAgent - title: BrowserDetails - Confidence: + - result + RootAppsResult: type: object additionalProperties: false properties: - score: - description: >- - The confidence score is a floating-point number between 0 and 1 that - represents the probability of accurate identification. - type: number - format: float - minimum: 0 - maximum: 1 - revision: - description: >- - The revision name of the method used to calculate the Confidence - score. This field is only present for customers who opted in to an - alternative calculation method. - type: string + result: + type: boolean + description: > + Android specific root management apps detection. There are 2 values: + • `true` - Root Management Apps detected (e.g. Magisk) • `false` - + No Root Management Apps detected or the client isn't Android. + example: false required: - - score - title: Confidence - SeenAt: + - result + EmulatorResult: type: object additionalProperties: false properties: - global: - type: string - nullable: true - format: date-time - example: '2022-05-05T18:28:54.535Z' - subscription: + result: + type: boolean + description: > + 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. + example: false + required: + - result + ClonedAppResult: + type: object + additionalProperties: false + properties: + result: + type: boolean + description: > + 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. + example: false + required: + - result + FactoryResetResult: + type: object + additionalProperties: false + properties: + time: + description: > + Indicates the time (in UTC) of the most recent factory reset that + happened on the **mobile device**. + + When a factory reset cannot be detected on the mobile device or when + the request is initiated from a browser, this field will correspond + to the *epoch* time (i.e 1 Jan 1970 UTC). + + See [Factory Reset + Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) + to learn more about this Smart Signal. type: string - nullable: true format: date-time - example: '2022-06-09T22:58:05.576Z' + example: '2022-06-09T22:58:36Z' + timestamp: + description: > + 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. + type: integer + format: int64 + example: 1654815517198 required: - - global - - subscription - title: SeenAt - example: - global: '2022-05-05T18:28:54.535Z' - subscription: null - ASN: + - time + - timestamp + JailbrokenResult: type: object additionalProperties: false properties: - asn: - type: string - example: '7922' - network: - type: string - example: 73.136.0.0/13 - name: - type: string - example: COMCAST-7922 + result: + type: boolean + description: > + iOS specific jailbreak detection. There are 2 values: • `true` - + Jailbreak detected • `false` - No signs of jailbreak or the client + is not iOS. + example: false required: - - asn - - network - title: ASN - DataCenter: + - result + FridaResult: type: object additionalProperties: false properties: result: type: boolean - name: - type: string - example: DediPath + description: > + [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. + example: false required: - result - title: DataCenter - IPLocation: + IpBlockListResult: type: object additionalProperties: false properties: - accuracyRadius: - description: >- - The IP address is likely to be within this radius (in km) of the - specified location. - type: integer - minimum: 0 - example: 1000 - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - example: 37.75 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 - example: -97.82 - postalCode: - type: string - example: 130 00 - timezone: - type: string - format: timezone - example: America/Chicago - city: + result: + type: boolean + description: > + `true` if request IP address is part of any database that we use to + search for known malicious actors, `false` otherwise. + example: false + details: type: object additionalProperties: false - title: IPLocationCity properties: - name: - type: string - example: Prague - country: - $ref: '#/components/schemas/Location' - continent: - $ref: '#/components/schemas/Location' - subdivisions: - type: array - items: - $ref: '#/components/schemas/Subdivision' - title: IPLocation - Location: + emailSpam: + type: boolean + description: IP address was part of a known email spam attack (SMTP). + example: false + attackSource: + type: boolean + description: IP address was part of a known network attack (SSH/HTTPS). + example: false + required: + - emailSpam + - attackSource + required: + - result + - details + TorResult: type: object additionalProperties: false properties: - code: - type: string - minLength: 2 - maxLength: 2 - example: US - name: - type: string - example: United States - required: - - code - - name - title: Location - Subdivision: - type: object - additionalProperties: false - properties: - isoCode: - type: string - example: '10' - name: - type: string - example: Hlavni mesto Praha - ProductsResponse: - type: object - description: >- - Contains all information about the request identified by `requestId`, - depending on the pricing plan (Pro, Pro Plus, Enterprise) - additionalProperties: false - properties: - identification: - type: object - additionalProperties: false - title: ProductsResponseIdentification - properties: - data: - title: ProductsResponseIdentificationData - type: object - properties: - requestId: - description: Unique identifier of the user's identification request. - type: string - example: 1654815516083.OX6kx8 - browserDetails: - $ref: '#/components/schemas/BrowserDetails' - incognito: - description: Flag if user used incognito session. - type: boolean - ip: - type: string - format: ipv4 - example: 8.8.8.8 - ipLocation: - type: object - additionalProperties: false - deprecated: true - description: >- - This field is **deprecated** and will not return a result - for **applications created after January 23rd, 2024**. - Please use the [IP Geolocation Smart - signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) - for geolocation information. - properties: - accuracyRadius: - description: >- - The IP address is likely to be within this radius (in - km) of the specified location. - type: integer - minimum: 0 - latitude: - type: number - format: double - minimum: -90 - maximum: 90 - longitude: - type: number - format: double - minimum: -180 - maximum: 180 - postalCode: - type: string - timezone: - type: string - format: timezone - city: - type: object - additionalProperties: false - title: DeprecatedIPLocationCity - properties: - name: - type: string - country: - $ref: '#/components/schemas/Location' - continent: - $ref: '#/components/schemas/Location' - subdivisions: - type: array - items: - $ref: '#/components/schemas/Subdivision' - title: DeprecatedIPLocation - timestamp: - description: >- - Timestamp of the event with millisecond precision in Unix - time. - type: integer - format: int64 - example: 1654815516086 - time: - title: Time - description: Time expressed according to ISO 8601 in UTC format. - type: string - format: date-time - example: '2022-06-09T22:58:36Z' - url: - description: Page URL from which the identification request was sent. - type: string - example: https://some.website/path?query=params - tag: - description: >- - A customer-provided value or an object that was sent with - identification request. - type: object - additionalProperties: true - linkedId: - description: >- - A customer-provided id that was sent with identification - request. - type: string - example: someID - confidence: - $ref: '#/components/schemas/Confidence' - visitorFound: - description: >- - Attribute represents if a visitor had been identified - before. - type: boolean - firstSeenAt: - $ref: '#/components/schemas/SeenAt' - lastSeenAt: - $ref: '#/components/schemas/SeenAt' - visitorId: - type: string - description: > - String of 20 characters that uniquely identifies the - visitor's browser. - example: - - Ibk1527CUFmcnjLwIs4A - additionalProperties: false - required: - - browserDetails - - firstSeenAt - - incognito - - ip - - lastSeenAt - - requestId - - time - - timestamp - - url - - visitorFound - - visitorId - - tag - error: - $ref: '#/components/schemas/IdentificationError' - botd: - title: ProductsResponseBotd - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/BotdResult' - error: - $ref: '#/components/schemas/ProductError' - ipInfo: - title: SignalResponseIpInfo - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/IpInfoResult' - error: - $ref: '#/components/schemas/ProductError' - incognito: - title: SignalResponseIncognito - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/IncognitoResult' - error: - $ref: '#/components/schemas/IdentificationError' - rootApps: - title: SignalResponseRootApps - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/RootAppsResult' - error: - $ref: '#/components/schemas/ProductError' - emulator: - title: SignalResponseEmulator - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/EmulatorResult' - error: - $ref: '#/components/schemas/ProductError' - clonedApp: - title: SignalResponseClonedApp - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/ClonedAppResult' - error: - $ref: '#/components/schemas/ProductError' - factoryReset: - title: SignalResponseFactoryReset - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/FactoryResetResult' - error: - $ref: '#/components/schemas/ProductError' - jailbroken: - title: SignalResponseJailbroken - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/JailbrokenResult' - error: - $ref: '#/components/schemas/ProductError' - frida: - title: SignalResponseFrida - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/FridaResult' - error: - $ref: '#/components/schemas/ProductError' - ipBlocklist: - title: SignalResponseIpBlocklist - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/IpBlockListResult' - error: - $ref: '#/components/schemas/ProductError' - tor: - title: SignalResponseTor - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/TorResult' - error: - $ref: '#/components/schemas/ProductError' - privacySettings: - title: SignalResponsePrivacySettings - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/PrivacySettingsResult' - error: - $ref: '#/components/schemas/ProductError' - virtualMachine: - title: SignalResponseVirtualMachine - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/VirtualMachineResult' - error: - $ref: '#/components/schemas/ProductError' - vpn: - title: SignalResponseVpn - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/VpnResult' - error: - $ref: '#/components/schemas/ProductError' - proxy: - title: SignalResponseProxy - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/ProxyResult' - error: - $ref: '#/components/schemas/ProductError' - tampering: - title: SignalResponseTampering - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/TamperingResult' - error: - $ref: '#/components/schemas/IdentificationError' - highActivity: - title: SignalResponseHighActivity - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/HighActivityResult' - error: - $ref: '#/components/schemas/ProductError' - locationSpoofing: - title: SignalResponseLocationSpoofing - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/LocationSpoofingResult' - error: - $ref: '#/components/schemas/ProductError' - suspectScore: - title: SignalResponseSuspectScore - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/SuspectScoreResult' - error: - $ref: '#/components/schemas/ProductError' - rawDeviceAttributes: - title: SignalResponseRawDeviceAttributes - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/RawDeviceAttributesResult' - error: - $ref: '#/components/schemas/IdentificationError' - remoteControl: - title: SignalResponseRemoteControl - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/RemoteControlResult' - error: - $ref: '#/components/schemas/ProductError' - velocity: - title: SignalResponseVelocity - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/VelocityResult' - error: - $ref: '#/components/schemas/ProductError' - developerTools: - title: SignalResponseDeveloperTools - type: object - additionalProperties: false - properties: - data: - $ref: '#/components/schemas/DeveloperToolsResult' - error: - $ref: '#/components/schemas/ProductError' - EventResponse: - description: >- - Contains results from all activated products - Fingerprint Pro, Bot - Detection, and others. - type: object - additionalProperties: false - properties: - products: - $ref: '#/components/schemas/ProductsResponse' - error: - $ref: '#/components/schemas/ProductError' - required: - - products - IdentificationError: - type: object - additionalProperties: false - properties: - code: - type: string - description: | - Error code: - * `429 Too Many Requests` - the limit on secret API key requests per second has been exceeded - * `Failed` - internal server error - enum: - - 429 Too Many Requests - - Failed - example: 429 Too Many Requests - message: - type: string - example: too many requests - required: - - code - - message - BotdResult: - type: object - additionalProperties: false - description: Contains all the information from Bot Detection product - properties: - ip: - type: string - format: ipv4 - example: 8.8.8.8 - description: IP address of the requesting browser or bot. - time: - title: Time - description: >- - Time in UTC when the request from the JS agent was made. We - recommend to treat requests that are older than 2 minutes as - malicious. Otherwise, request replay attacks are possible - type: string - format: date-time - example: '2022-06-09T22:58:36Z' - url: - description: Page URL from which identification request was sent. - type: string - example: https://example.com/login - userAgent: - type: string - example: >- - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 - (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 - requestId: - type: string - example: 1681392853693.lRiBBD - linkedId: - type: string - example: Automatic tests bot - bot: - $ref: '#/components/schemas/BotdDetectionResult' + result: + type: boolean + description: > + `true` if the request IP address is a known tor exit node, `false` + otherwise. + example: false required: - - bot - - url - - ip - - time - - userAgent - - requestId - BotdDetectionResult: + - result + PrivacySettingsResult: type: object additionalProperties: false - description: Stores bot detection result properties: result: - type: string - description: | - 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 - enum: - - notDetected - - good - - bad - example: bad - type: - type: string - example: selenium + type: boolean + description: > + `true` if the request is from a privacy aware browser (e.g. Tor) or + from a browser in which fingerprinting is blocked. Otherwise + `false`. + example: false required: - result - IpInfoResult: - type: object - description: >- - Details about the request IP address. Has separate fields for v4 and v6 - IP address versions. - additionalProperties: false - properties: - v4: - type: object - additionalProperties: false - properties: - address: - type: string - format: ipv4 - example: 94.142.239.124 - geolocation: - $ref: '#/components/schemas/IPLocation' - asn: - $ref: '#/components/schemas/ASN' - datacenter: - $ref: '#/components/schemas/DataCenter' - required: - - address - - geolocation - v6: - type: object - additionalProperties: false - properties: - address: - type: string - format: ipv6 - example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - geolocation: - $ref: '#/components/schemas/IPLocation' - asn: - $ref: '#/components/schemas/ASN' - datacenter: - $ref: '#/components/schemas/DataCenter' - required: - - address - - geolocation - IpBlockListResult: + VirtualMachineResult: type: object additionalProperties: false properties: result: type: boolean description: > - `true` if request IP address is part of any database that we use to - search for known malicious actors, `false` otherwise. + `true` if the request came from a browser running inside a virtual + machine (e.g. VMWare), `false` otherwise. example: false - details: - type: object - additionalProperties: false - properties: - emailSpam: - type: boolean - description: IP address was part of a known email spam attack (SMTP). - example: false - attackSource: - type: boolean - description: IP address was part of a known network attack (SSH/HTTPS). - example: false - required: - - emailSpam - - attackSource required: - result - - details VpnResult: type: object additionalProperties: false @@ -1863,6 +1149,18 @@ components: - result - originTimezone - methods + ProxyResult: + type: object + additionalProperties: false + properties: + result: + type: boolean + description: > + `true` if the request IP address is used by a public proxy provider, + `false` otherwise. + example: false + required: + - result TamperingResult: type: object additionalProperties: false @@ -1930,36 +1228,6 @@ components: example: 0 required: - result - VelocityResult: - type: object - description: > - Sums key data points for a specific `visitorId` at three distinct time - intervals: 5 minutes, 1 hour, and 24 hours as follows: - - - Number of identification events attributed to the visitor ID - Number - of distinct IP addresses associated to the visitor ID. - Number of - distinct countries associated with the visitor ID. - Number of distinct - `linkedId`s associated with the visitor ID. - - The `24h` interval of `distinctIp`, `distinctLinkedId`, and - `distinctCountry` will be omitted if the number of `events` for the - visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher - than 20.000. - additionalProperties: false - properties: - distinctIp: - $ref: '#/components/schemas/VelocityIntervals' - distinctLinkedId: - $ref: '#/components/schemas/VelocityIntervals' - distinctCountry: - $ref: '#/components/schemas/VelocityIntervals' - events: - $ref: '#/components/schemas/VelocityIntervals' - required: - - distinctIp - - distinctLinkedId - - distinctCountry - - events RawDeviceAttributesResult: type: object description: > @@ -1990,309 +1258,969 @@ components: - message title: error type: object - value: - title: value - FactoryResetResult: - type: object - additionalProperties: false - properties: - time: - description: > - Indicates the time (in UTC) of the most recent factory reset that - happened on the **mobile device**. - - When a factory reset cannot be detected on the mobile device or when - the request is initiated from a browser, this field will correspond - to the *epoch* time (i.e 1 Jan 1970 UTC). - - See [Factory Reset - Detection](https://dev.fingerprint.com/docs/smart-signals-overview#factory-reset-detection) - to learn more about this Smart Signal. - type: string - format: date-time - example: '2022-06-09T22:58:36Z' - timestamp: - description: > - 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. - type: integer - format: int64 - example: 1654815517198 - required: - - time - - timestamp - ClonedAppResult: - type: object - additionalProperties: false - properties: - result: - type: boolean - description: > - 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. - example: false - required: - - result - EmulatorResult: + value: + title: value + RemoteControlResult: type: object additionalProperties: false properties: result: type: boolean description: > - 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. + `true` if the request came from a machine being remotely controlled + (e.g. TeamViewer), `false` otherwise. example: false required: - result - RootAppsResult: + VelocityIntervalResult: type: object + description: > + Is absent if the velocity data could not be generated for the visitor + ID. additionalProperties: false properties: - result: - type: boolean + 5m: + type: integer + example: 1 + 1h: + type: integer + example: 1 + 24h: + type: integer description: > - Android specific root management apps detection. There are 2 values: - • `true` - Root Management Apps detected (e.g. Magisk) • `false` - - No Root Management Apps detected or the client isn't Android. - example: false + The `24h` interval of `distinctIp`, `distinctLinkedId`, and + `distinctCountry` will be omitted if the number of `events`` for the + visitor ID in the last 24 hours (`events.intervals.['24h']`) is + higher than 20.000. + example: 1 required: - - result - IncognitoResult: + - 5m + - 1h + VelocityIntervals: type: object additionalProperties: false properties: - result: - type: boolean - description: > - `true` if we detected incognito mode used in the browser, `false` - otherwise. - example: false + intervals: + $ref: '#/components/schemas/VelocityIntervalResult' + VelocityResult: + type: object + description: > + Sums key data points for a specific `visitorId` at three distinct time + intervals: 5 minutes, 1 hour, and 24 hours as follows: + + - Number of identification events attributed to the visitor ID - Number + of distinct IP addresses associated to the visitor ID. - Number of + distinct countries associated with the visitor ID. - Number of distinct + `linkedId`s associated with the visitor ID. + + The `24h` interval of `distinctIp`, `distinctLinkedId`, and + `distinctCountry` will be omitted if the number of `events` for the + visitor ID in the last 24 hours (`events.intervals.['24h']`) is higher + than 20.000. + additionalProperties: false + properties: + distinctIp: + $ref: '#/components/schemas/VelocityIntervals' + distinctLinkedId: + $ref: '#/components/schemas/VelocityIntervals' + distinctCountry: + $ref: '#/components/schemas/VelocityIntervals' + events: + $ref: '#/components/schemas/VelocityIntervals' required: - - result - JailbrokenResult: + - distinctIp + - distinctLinkedId + - distinctCountry + - events + DeveloperToolsResult: type: object additionalProperties: false properties: result: type: boolean description: > - iOS specific jailbreak detection. There are 2 values: • `true` - - Jailbreak detected • `false` - No signs of jailbreak or the client - is not iOS. + `true` if the browser is Chrome with DevTools open or Firefox with + Developer Tools open, `false` otherwise. example: false required: - result - FridaResult: + ProductsResponse: + type: object + description: >- + Contains all information about the request identified by `requestId`, + depending on the pricing plan (Pro, Pro Plus, Enterprise) + additionalProperties: false + properties: + identification: + type: object + additionalProperties: false + title: ProductsResponseIdentification + properties: + data: + title: ProductsResponseIdentificationData + type: object + properties: + requestId: + description: Unique identifier of the user's identification request. + type: string + example: 1654815516083.OX6kx8 + browserDetails: + $ref: '#/components/schemas/BrowserDetails' + incognito: + description: Flag if user used incognito session. + type: boolean + ip: + type: string + format: ipv4 + example: 8.8.8.8 + ipLocation: + type: object + additionalProperties: false + deprecated: true + description: >- + This field is **deprecated** and will not return a result + for **applications created after January 23rd, 2024**. + Please use the [IP Geolocation Smart + signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) + for geolocation information. + properties: + accuracyRadius: + description: >- + The IP address is likely to be within this radius (in + km) of the specified location. + type: integer + minimum: 0 + latitude: + type: number + format: double + minimum: -90 + maximum: 90 + longitude: + type: number + format: double + minimum: -180 + maximum: 180 + postalCode: + type: string + timezone: + type: string + format: timezone + city: + type: object + additionalProperties: false + title: DeprecatedIPLocationCity + properties: + name: + type: string + country: + $ref: '#/components/schemas/Location' + continent: + $ref: '#/components/schemas/Location' + subdivisions: + type: array + items: + $ref: '#/components/schemas/Subdivision' + title: DeprecatedIPLocation + timestamp: + description: >- + Timestamp of the event with millisecond precision in Unix + time. + type: integer + format: int64 + example: 1654815516086 + time: + title: Time + description: Time expressed according to ISO 8601 in UTC format. + type: string + format: date-time + example: '2022-06-09T22:58:36Z' + url: + description: Page URL from which the identification request was sent. + type: string + example: https://some.website/path?query=params + tag: + description: >- + A customer-provided value or an object that was sent with + identification request. + type: object + additionalProperties: true + linkedId: + description: >- + A customer-provided id that was sent with identification + request. + type: string + example: someID + confidence: + $ref: '#/components/schemas/Confidence' + visitorFound: + description: >- + Attribute represents if a visitor had been identified + before. + type: boolean + firstSeenAt: + $ref: '#/components/schemas/SeenAt' + lastSeenAt: + $ref: '#/components/schemas/SeenAt' + visitorId: + type: string + description: > + String of 20 characters that uniquely identifies the + visitor's browser. + example: + - Ibk1527CUFmcnjLwIs4A + additionalProperties: false + required: + - browserDetails + - firstSeenAt + - incognito + - ip + - lastSeenAt + - requestId + - time + - timestamp + - url + - visitorFound + - visitorId + - tag + error: + $ref: '#/components/schemas/IdentificationError' + botd: + title: ProductsResponseBotd + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/BotdResult' + error: + $ref: '#/components/schemas/ProductError' + ipInfo: + title: SignalResponseIpInfo + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/IpInfoResult' + error: + $ref: '#/components/schemas/ProductError' + incognito: + title: SignalResponseIncognito + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/IncognitoResult' + error: + $ref: '#/components/schemas/IdentificationError' + rootApps: + title: SignalResponseRootApps + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/RootAppsResult' + error: + $ref: '#/components/schemas/ProductError' + emulator: + title: SignalResponseEmulator + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/EmulatorResult' + error: + $ref: '#/components/schemas/ProductError' + clonedApp: + title: SignalResponseClonedApp + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/ClonedAppResult' + error: + $ref: '#/components/schemas/ProductError' + factoryReset: + title: SignalResponseFactoryReset + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FactoryResetResult' + error: + $ref: '#/components/schemas/ProductError' + jailbroken: + title: SignalResponseJailbroken + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/JailbrokenResult' + error: + $ref: '#/components/schemas/ProductError' + frida: + title: SignalResponseFrida + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/FridaResult' + error: + $ref: '#/components/schemas/ProductError' + ipBlocklist: + title: SignalResponseIpBlocklist + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/IpBlockListResult' + error: + $ref: '#/components/schemas/ProductError' + tor: + title: SignalResponseTor + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/TorResult' + error: + $ref: '#/components/schemas/ProductError' + privacySettings: + title: SignalResponsePrivacySettings + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/PrivacySettingsResult' + error: + $ref: '#/components/schemas/ProductError' + virtualMachine: + title: SignalResponseVirtualMachine + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/VirtualMachineResult' + error: + $ref: '#/components/schemas/ProductError' + vpn: + title: SignalResponseVpn + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/VpnResult' + error: + $ref: '#/components/schemas/ProductError' + proxy: + title: SignalResponseProxy + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/ProxyResult' + error: + $ref: '#/components/schemas/ProductError' + tampering: + title: SignalResponseTampering + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/TamperingResult' + error: + $ref: '#/components/schemas/IdentificationError' + highActivity: + title: SignalResponseHighActivity + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/HighActivityResult' + error: + $ref: '#/components/schemas/ProductError' + locationSpoofing: + title: SignalResponseLocationSpoofing + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/LocationSpoofingResult' + error: + $ref: '#/components/schemas/ProductError' + suspectScore: + title: SignalResponseSuspectScore + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/SuspectScoreResult' + error: + $ref: '#/components/schemas/ProductError' + rawDeviceAttributes: + title: SignalResponseRawDeviceAttributes + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/RawDeviceAttributesResult' + error: + $ref: '#/components/schemas/IdentificationError' + remoteControl: + title: SignalResponseRemoteControl + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/RemoteControlResult' + error: + $ref: '#/components/schemas/ProductError' + velocity: + title: SignalResponseVelocity + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/VelocityResult' + error: + $ref: '#/components/schemas/ProductError' + developerTools: + title: SignalResponseDeveloperTools + type: object + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/DeveloperToolsResult' + error: + $ref: '#/components/schemas/ProductError' + EventResponse: + description: >- + Contains results from all activated products - Fingerprint Pro, Bot + Detection, and others. type: object additionalProperties: false properties: - result: - type: boolean - description: > - [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. - example: false + products: + $ref: '#/components/schemas/ProductsResponse' + error: + $ref: '#/components/schemas/ProductError' required: - - result - TorResult: + - products + ErrorCommon403Response: type: object additionalProperties: false properties: - result: - type: boolean - description: > - `true` if the request IP address is a known tor exit node, `false` - otherwise. - example: false - required: - - result - PrivacySettingsResult: + error: + type: object + additionalProperties: false + title: Common403ErrorResponse + properties: + code: + type: string + description: | + Error code: + * `TokenRequired` - `Auth-API-Key` header is missing or empty + * `TokenNotFound` - No Fingerprint application found for specified secret key + * `SubscriptionNotActive` - Fingerprint application is not active + * `WrongRegion` - server and application region differ + * `FeatureNotEnabled` - this feature (for example, Delete API) is not enabled for your application + enum: + - TokenRequired + - TokenNotFound + - SubscriptionNotActive + - WrongRegion + - FeatureNotEnabled + example: TokenRequired + message: + type: string + example: secret key is required + required: + - code + - message + ErrorEvent404Response: type: object additionalProperties: false properties: - result: - type: boolean - description: > - `true` if the request is from a privacy aware browser (e.g. Tor) or - from a browser in which fingerprinting is blocked. Otherwise - `false`. - example: false - required: - - result - VirtualMachineResult: + error: + type: object + additionalProperties: false + title: ErrorEvent404ResponseError + properties: + code: + type: string + description: | + Error code: + * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. + enum: + - RequestNotFound + example: RequestNotFound + message: + type: string + example: request id is not found + required: + - code + - message + EventUpdateRequest: type: object - additionalProperties: false properties: - result: + linkedId: + type: string + description: LinkedID value to assign to the existing event + tag: + type: object + description: >- + Full `tag` value to be set to the existing event. Replaces any + existing `tag` payload completely. + suspect: type: boolean - description: > - `true` if the request came from a browser running inside a virtual - machine (e.g. VMWare), `false` otherwise. - example: false - required: - - result - ProxyResult: + description: Suspect flag indicating observed suspicious or fraudulent event + ErrorUpdateEvent400Response: type: object additionalProperties: false properties: - result: - type: boolean - description: > - `true` if the request IP address is used by a public proxy provider, - `false` otherwise. - example: false - required: - - result - ProductError: + error: + type: object + additionalProperties: false + title: ErrorUpdateEvent400ResponseError + properties: + code: + type: string + description: > + Error code: * `RequestCannotBeParsed` - the JSON content of the + request contains some errors that prevented us from parsing it + (wrong type/surpassed limits) * `Failed` - the event is more + than 10 days old and cannot be updated + enum: + - RequestCannotBeParsed + - Failed + example: RequestCannotBeParsed + message: + type: string + description: Details about the underlying issue with the input payload + example: suspect flag must be a boolean + required: + - code + - message + ErrorUpdateEvent409Response: type: object additionalProperties: false properties: - code: - type: string - description: | - Error code: - * `TooManyRequests` - the limit on secret API key requests per second has been exceeded - * `Failed` - internal server error - enum: - - TooManyRequests - - Failed - example: TooManyRequests - message: - type: string - example: too many requests - required: - - code - - message - RemoteControlResult: + error: + type: object + additionalProperties: false + title: ErrorUpdateEvent409ResponseError + properties: + code: + type: string + description: > + Error code: * `StateNotReady` - The event specified with request + id is not ready for updates yet. Try again. + + This error happens in rare cases when update API is called + immediately after receiving the request id on the client. In + case you need to send information right away, we recommend using + the JS agent API instead. + enum: + - StateNotReady + example: StateNotReady + message: + type: string + example: resource is not mutable yet, try again + required: + - code + - message + Response: type: object additionalProperties: false properties: - result: - type: boolean + visitorId: + type: string + visits: + type: array + items: + title: ResponseVisits + type: object + properties: + requestId: + description: Unique identifier of the user's identification request. + type: string + example: 1654815516083.OX6kx8 + browserDetails: + $ref: '#/components/schemas/BrowserDetails' + incognito: + description: Flag if user used incognito session. + type: boolean + ip: + type: string + format: ipv4 + example: 8.8.8.8 + ipLocation: + type: object + additionalProperties: false + deprecated: true + description: >- + This field is **deprecated** and will not return a result for + **applications created after January 23rd, 2024**. Please use + the [IP Geolocation Smart + signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) + for geolocation information. + properties: + accuracyRadius: + description: >- + The IP address is likely to be within this radius (in km) + of the specified location. + type: integer + minimum: 0 + latitude: + type: number + format: double + minimum: -90 + maximum: 90 + longitude: + type: number + format: double + minimum: -180 + maximum: 180 + postalCode: + type: string + timezone: + type: string + format: timezone + city: + type: object + additionalProperties: false + title: DeprecatedIPLocationCity + properties: + name: + type: string + country: + $ref: '#/components/schemas/Location' + continent: + $ref: '#/components/schemas/Location' + subdivisions: + type: array + items: + $ref: '#/components/schemas/Subdivision' + title: DeprecatedIPLocation + timestamp: + description: >- + Timestamp of the event with millisecond precision in Unix + time. + type: integer + format: int64 + example: 1654815516086 + time: + title: Time + description: Time expressed according to ISO 8601 in UTC format. + type: string + format: date-time + example: '2022-06-09T22:58:36Z' + url: + description: Page URL from which the identification request was sent. + type: string + example: https://some.website/path?query=params + tag: + description: >- + A customer-provided value or an object that was sent with + identification request. + type: object + additionalProperties: true + linkedId: + description: >- + A customer-provided id that was sent with identification + request. + type: string + example: someID + confidence: + $ref: '#/components/schemas/Confidence' + visitorFound: + description: Attribute represents if a visitor had been identified before. + type: boolean + firstSeenAt: + $ref: '#/components/schemas/SeenAt' + lastSeenAt: + $ref: '#/components/schemas/SeenAt' + additionalProperties: false + required: + - browserDetails + - firstSeenAt + - incognito + - ip + - lastSeenAt + - requestId + - time + - timestamp + - url + - visitorFound + - tag + lastTimestamp: description: > - `true` if the request came from a machine being remotely controlled - (e.g. TeamViewer), `false` otherwise. - example: false + ⚠️ Deprecated paging attribute, please use `paginationKey` instead. + Timestamp of the last visit in the current page of results. + type: integer + format: int64 + example: 1654815517198 + paginationKey: + description: >- + 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. + type: string + example: 1654815517198.azN4IZ required: - - result - DeveloperToolsResult: + - visitorId + - visits + title: PaginatedResponse + description: >- + Fields `lastTimestamp` and `paginationKey` added when `limit` or + `before` parameter provided and there is more data to show + ErrorVisits403: type: object additionalProperties: false properties: - result: - type: boolean - description: > - `true` if the browser is Chrome with DevTools open or Firefox with - Developer Tools open, `false` otherwise. - example: false + error: + type: string + description: Error text. + example: Forbidden (HTTP 403) required: - - result - EventUpdateRequest: + - error + TooManyRequestsResponse: type: object + additionalProperties: false properties: - linkedId: + error: type: string - description: LinkedID value to assign to the existing event - tag: - type: object - description: >- - Full `tag` value to be set to the existing event. Replaces any - existing `tag` payload completely. - suspect: - type: boolean - description: Suspect flag indicating observed suspicious or fraudulent event - ErrorUpdateEvent400Response: + description: Error text. + example: request throttled + required: + - error + ErrorVisitor400Response: type: object additionalProperties: false properties: error: type: object additionalProperties: false - title: ErrorUpdateEvent400ResponseError properties: code: type: string description: > - Error code: * `RequestCannotBeParsed` - the JSON content of the - request contains some errors that prevented us from parsing it - (wrong type/surpassed limits) * `Failed` - the event is more - than 10 days old and cannot be updated + Error code: * `RequestCannotBeParsed` - The visitor ID parameter + is missing or in the wrong format. enum: - RequestCannotBeParsed - - Failed example: RequestCannotBeParsed message: type: string - description: Details about the underlying issue with the input payload - example: suspect flag must be a boolean + example: invalid visitor id required: - code - message - ErrorUpdateEvent409Response: + ErrorVisitor404Response: type: object additionalProperties: false properties: error: type: object additionalProperties: false - title: ErrorUpdateEvent409ResponseError + title: ErrorVisitor404ResponseError properties: code: type: string description: > - Error code: * `StateNotReady` - The event specified with request - id is not ready for updates yet. Try again. - - This error happens in rare cases when update API is called - immediately after receiving the request id on the client. In - case you need to send information right away, we recommend using - the JS agent API instead. + Error code: * `VisitorNotFound` - The specified visitor ID was + not found. It never existed or it may have already been deleted. enum: - - StateNotReady - example: StateNotReady + - VisitorNotFound + example: VisitorNotFound message: type: string - example: resource is not mutable yet, try again + example: visitor not found required: - code - message - VelocityIntervals: + ErrorCommon429Response: type: object additionalProperties: false properties: - intervals: - $ref: '#/components/schemas/VelocityIntervalResult' - VelocityIntervalResult: + error: + type: object + additionalProperties: false + properties: + code: + type: string + description: | + Error code: * `TooManyRequests` - The request is throttled. + enum: + - TooManyRequests + example: TooManyRequests + message: + type: string + example: request throttled + required: + - code + - message + WebhookVisit: type: object - description: > - Is absent if the velocity data could not be generated for the visitor - ID. - additionalProperties: false properties: - 5m: - type: integer - example: 1 - 1h: - type: integer - example: 1 - 24h: + visitorId: + type: string + example: 3HNey93AkBW6CRbxV6xP + clientReferrer: + type: string + example: https://google.com?search=banking+services + userAgent: + type: string + example: >- + Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 + (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 + bot: + $ref: '#/components/schemas/BotdDetectionResult' + ipInfo: + $ref: '#/components/schemas/IpInfoResult' + incognito: + description: Flag if user used incognito session. + type: boolean + rootApps: + $ref: '#/components/schemas/RootAppsResult' + emulator: + $ref: '#/components/schemas/EmulatorResult' + clonedApp: + $ref: '#/components/schemas/ClonedAppResult' + factoryReset: + $ref: '#/components/schemas/FactoryResetResult' + jailbroken: + $ref: '#/components/schemas/JailbrokenResult' + frida: + $ref: '#/components/schemas/FridaResult' + ipBlocklist: + $ref: '#/components/schemas/IpBlockListResult' + tor: + $ref: '#/components/schemas/TorResult' + privacySettings: + $ref: '#/components/schemas/PrivacySettingsResult' + virtualMachine: + $ref: '#/components/schemas/VirtualMachineResult' + vpn: + $ref: '#/components/schemas/VpnResult' + proxy: + $ref: '#/components/schemas/ProxyResult' + tampering: + $ref: '#/components/schemas/TamperingResult' + rawDeviceAttributes: + $ref: '#/components/schemas/RawDeviceAttributesResult' + highActivity: + $ref: '#/components/schemas/HighActivityResult' + locationSpoofing: + $ref: '#/components/schemas/LocationSpoofingResult' + suspectScore: + $ref: '#/components/schemas/SuspectScoreResult' + remoteControl: + $ref: '#/components/schemas/RemoteControlResult' + velocity: + $ref: '#/components/schemas/VelocityResult' + developerTools: + $ref: '#/components/schemas/DeveloperToolsResult' + requestId: + description: Unique identifier of the user's identification request. + type: string + example: 1654815516083.OX6kx8 + browserDetails: + $ref: '#/components/schemas/BrowserDetails' + ip: + type: string + format: ipv4 + example: 8.8.8.8 + ipLocation: + type: object + additionalProperties: false + deprecated: true + description: >- + This field is **deprecated** and will not return a result for + **applications created after January 23rd, 2024**. Please use the + [IP Geolocation Smart + signal](https://dev.fingerprint.com/docs/smart-signals-overview#ip-geolocation) + for geolocation information. + properties: + accuracyRadius: + description: >- + The IP address is likely to be within this radius (in km) of the + specified location. + type: integer + minimum: 0 + latitude: + type: number + format: double + minimum: -90 + maximum: 90 + longitude: + type: number + format: double + minimum: -180 + maximum: 180 + postalCode: + type: string + timezone: + type: string + format: timezone + city: + type: object + additionalProperties: false + title: DeprecatedIPLocationCity + properties: + name: + type: string + country: + $ref: '#/components/schemas/Location' + continent: + $ref: '#/components/schemas/Location' + subdivisions: + type: array + items: + $ref: '#/components/schemas/Subdivision' + title: DeprecatedIPLocation + timestamp: + description: Timestamp of the event with millisecond precision in Unix time. type: integer - description: > - The `24h` interval of `distinctIp`, `distinctLinkedId`, and - `distinctCountry` will be omitted if the number of `events`` for the - visitor ID in the last 24 hours (`events.intervals.['24h']`) is - higher than 20.000. - example: 1 + format: int64 + example: 1654815516086 + time: + title: Time + description: Time expressed according to ISO 8601 in UTC format. + type: string + format: date-time + example: '2022-06-09T22:58:36Z' + url: + description: Page URL from which the identification request was sent. + type: string + example: https://some.website/path?query=params + tag: + description: >- + A customer-provided value or an object that was sent with + identification request. + type: object + additionalProperties: true + linkedId: + description: A customer-provided id that was sent with identification request. + type: string + example: someID + confidence: + $ref: '#/components/schemas/Confidence' + visitorFound: + description: Attribute represents if a visitor had been identified before. + type: boolean + firstSeenAt: + $ref: '#/components/schemas/SeenAt' + lastSeenAt: + $ref: '#/components/schemas/SeenAt' + additionalProperties: false required: - - 5m - - 1h + - visitorId + - browserDetails + - firstSeenAt + - incognito + - ip + - lastSeenAt + - requestId + - time + - timestamp + - url + - visitorFound diff --git a/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java b/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java index 4670354e..23008e80 100644 --- a/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java +++ b/sdk/src/main/java/com/fingerprint/api/FingerprintApi.java @@ -68,7 +68,7 @@ public void setApiClient(ApiClient apiClient) { /** * Delete data by visitor ID - * Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. All delete requests are queued: * Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. * Data from older (11 days or more) identification events will be deleted after 90 days. If you are interested in using this API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. + * Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. * @param visitorId The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) * @throws ApiException if fails to make API call * @http.response.details @@ -87,7 +87,7 @@ public void deleteVisitorData(String visitorId) throws ApiException { /** * Delete data by visitor ID - * Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. All delete requests are queued: * Recent data (10 days or newer) belonging to the specified visitor will be deleted within 24 hours. * Data from older (11 days or more) identification events will be deleted after 90 days. If you are interested in using this API, please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. + * Request deleting all data associated with the specified visitor ID. This API is useful for compliance with privacy regulations. ### Which data is deleted? - Browser (or device) properties - Identification requests made from this browser (or device) #### Browser (or device) properties - Represents the data that Fingerprint collected from this specific browser (or device) and everything inferred and derived from it. - Upon request to delete, this data is deleted asynchronously (typically within a few minutes) and it will no longer be used to identify this browser (or device) for your [Fingerprint Application](https://dev.fingerprint.com/docs/glossary#fingerprint-application). #### Identification requests made from this browser (or device) - Fingerprint stores the identification requests made from a browser (or device) for up to 30 (or 90) days depending on your plan. To learn more, see [Data Retention](https://dev.fingerprint.com/docs/regions#data-retention). - Upon request to delete, the identification requests that were made by this browser - Within the past 10 days are deleted within 24 hrs. - Outside of 10 days are allowed to purge as per your data retention period. ### Corollary After requesting to delete a visitor ID, - If the same browser (or device) requests to identify, it will receive a different visitor ID. - If you request [`/events` API](https://dev.fingerprint.com/reference/getevent) with a `request_id` that was made outside of the 10 days, you will still receive a valid response. - If you request [`/visitors` API](https://dev.fingerprint.com/reference/getvisits) for the deleted visitor ID, the response will include identification requests that were made outside of those 10 days. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. * @param visitorId The [visitor ID](https://dev.fingerprint.com/docs/js-agent#visitorid) you want to delete. (required) * @return ApiResponse<Void> * @throws ApiException if fails to make API call diff --git a/sdk/src/main/java/com/fingerprint/model/Visit.java b/sdk/src/main/java/com/fingerprint/model/Visit.java deleted file mode 100644 index f752af31..00000000 --- a/sdk/src/main/java/com/fingerprint/model/Visit.java +++ /dev/null @@ -1,530 +0,0 @@ -package com.fingerprint.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fingerprint.model.BrowserDetails; -import com.fingerprint.model.Confidence; -import com.fingerprint.model.DeprecatedIPLocation; -import com.fingerprint.model.SeenAt; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fingerprint.sdk.JSON; -import io.swagger.v3.oas.annotations.media.Schema; - -/** - * Visit - */ - - -@JsonPropertyOrder({ - Visit.JSON_PROPERTY_REQUEST_ID, - Visit.JSON_PROPERTY_BROWSER_DETAILS, - Visit.JSON_PROPERTY_INCOGNITO, - Visit.JSON_PROPERTY_IP, - Visit.JSON_PROPERTY_IP_LOCATION, - Visit.JSON_PROPERTY_TIMESTAMP, - Visit.JSON_PROPERTY_TIME, - Visit.JSON_PROPERTY_URL, - Visit.JSON_PROPERTY_TAG, - Visit.JSON_PROPERTY_LINKED_ID, - Visit.JSON_PROPERTY_CONFIDENCE, - Visit.JSON_PROPERTY_VISITOR_FOUND, - Visit.JSON_PROPERTY_FIRST_SEEN_AT, - Visit.JSON_PROPERTY_LAST_SEEN_AT -}) -@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") -public class Visit { - public static final String JSON_PROPERTY_REQUEST_ID = "requestId"; - private String requestId; - - public static final String JSON_PROPERTY_BROWSER_DETAILS = "browserDetails"; - private BrowserDetails browserDetails; - - public static final String JSON_PROPERTY_INCOGNITO = "incognito"; - private Boolean incognito; - - public static final String JSON_PROPERTY_IP = "ip"; - private String ip; - - public static final String JSON_PROPERTY_IP_LOCATION = "ipLocation"; - private DeprecatedIPLocation ipLocation; - - public static final String JSON_PROPERTY_TIMESTAMP = "timestamp"; - private Long timestamp; - - public static final String JSON_PROPERTY_TIME = "time"; - private OffsetDateTime time; - - public static final String JSON_PROPERTY_URL = "url"; - private String url; - - public static final String JSON_PROPERTY_TAG = "tag"; - private Map tag = null; - - public static final String JSON_PROPERTY_LINKED_ID = "linkedId"; - private String linkedId; - - public static final String JSON_PROPERTY_CONFIDENCE = "confidence"; - private Confidence confidence; - - public static final String JSON_PROPERTY_VISITOR_FOUND = "visitorFound"; - private Boolean visitorFound; - - public static final String JSON_PROPERTY_FIRST_SEEN_AT = "firstSeenAt"; - private SeenAt firstSeenAt; - - public static final String JSON_PROPERTY_LAST_SEEN_AT = "lastSeenAt"; - private SeenAt lastSeenAt; - - public Visit() { - } - - public Visit requestId(String requestId) { - this.requestId = requestId; - return this; - } - - /** - * Unique identifier of the user's identification request. - * @return requestId - **/ - @jakarta.annotation.Nonnull - @Schema(example = "1654815516083.OX6kx8", required = true, description = "Unique identifier of the user's identification request.") - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getRequestId() { - return requestId; - } - - - @JsonProperty(JSON_PROPERTY_REQUEST_ID) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setRequestId(String requestId) { - this.requestId = requestId; - } - - - public Visit browserDetails(BrowserDetails browserDetails) { - this.browserDetails = browserDetails; - return this; - } - - /** - * Get browserDetails - * @return browserDetails - **/ - @jakarta.annotation.Nonnull - @Schema(required = true, description = "") - @JsonProperty(JSON_PROPERTY_BROWSER_DETAILS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BrowserDetails getBrowserDetails() { - return browserDetails; - } - - - @JsonProperty(JSON_PROPERTY_BROWSER_DETAILS) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setBrowserDetails(BrowserDetails browserDetails) { - this.browserDetails = browserDetails; - } - - - public Visit incognito(Boolean incognito) { - this.incognito = incognito; - return this; - } - - /** - * Flag if user used incognito session. - * @return incognito - **/ - @jakarta.annotation.Nonnull - @Schema(required = true, description = "Flag if user used incognito session.") - @JsonProperty(JSON_PROPERTY_INCOGNITO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getIncognito() { - return incognito; - } - - - @JsonProperty(JSON_PROPERTY_INCOGNITO) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIncognito(Boolean incognito) { - this.incognito = incognito; - } - - - public Visit ip(String ip) { - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - **/ - @jakarta.annotation.Nonnull - @Schema(example = "8.8.8.8", required = true, description = "") - @JsonProperty(JSON_PROPERTY_IP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getIp() { - return ip; - } - - - @JsonProperty(JSON_PROPERTY_IP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setIp(String ip) { - this.ip = ip; - } - - - public Visit ipLocation(DeprecatedIPLocation ipLocation) { - this.ipLocation = ipLocation; - return this; - } - - /** - * Get ipLocation - * @return ipLocation - * @deprecated - **/ - @Deprecated - @jakarta.annotation.Nullable - @Schema(description = "") - @JsonProperty(JSON_PROPERTY_IP_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DeprecatedIPLocation getIpLocation() { - return ipLocation; - } - - - @JsonProperty(JSON_PROPERTY_IP_LOCATION) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIpLocation(DeprecatedIPLocation ipLocation) { - this.ipLocation = ipLocation; - } - - - public Visit timestamp(Long timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * Timestamp of the event with millisecond precision in Unix time. - * @return timestamp - **/ - @jakarta.annotation.Nonnull - @Schema(example = "1654815516086", required = true, description = "Timestamp of the event with millisecond precision in Unix time.") - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Long getTimestamp() { - return timestamp; - } - - - @JsonProperty(JSON_PROPERTY_TIMESTAMP) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTimestamp(Long timestamp) { - this.timestamp = timestamp; - } - - - public Visit time(OffsetDateTime time) { - this.time = time; - return this; - } - - /** - * Time expressed according to ISO 8601 in UTC format. - * @return time - **/ - @jakarta.annotation.Nonnull - @Schema(example = "2022-06-09T22:58:36Z", required = true, description = "Time expressed according to ISO 8601 in UTC format.") - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public OffsetDateTime getTime() { - return time; - } - - - @JsonProperty(JSON_PROPERTY_TIME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setTime(OffsetDateTime time) { - this.time = time; - } - - - public Visit url(String url) { - this.url = url; - return this; - } - - /** - * Page URL from which the identification request was sent. - * @return url - **/ - @jakarta.annotation.Nonnull - @Schema(example = "https://some.website/path?query=params", required = true, description = "Page URL from which the identification request was sent.") - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getUrl() { - return url; - } - - - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setUrl(String url) { - this.url = url; - } - - - public Visit tag(Map tag) { - this.tag = tag; - return this; - } - - public Visit puttagItem(String key, Object tagItem) { - if (this.tag == null) { - this.tag = new HashMap<>(); - } - this.tag.put(key, tagItem); - return this; - } - - /** - * A customer-provided value or an object that was sent with identification request. - * @return tag - **/ - @jakarta.annotation.Nullable - @Schema(description = "A customer-provided value or an object that was sent with identification request.") - @JsonProperty(JSON_PROPERTY_TAG) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - - public Map getTag() { - return tag; - } - - - @JsonProperty(JSON_PROPERTY_TAG) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setTag(Map tag) { - this.tag = tag; - } - - - public Visit linkedId(String linkedId) { - this.linkedId = linkedId; - return this; - } - - /** - * A customer-provided id that was sent with identification request. - * @return linkedId - **/ - @jakarta.annotation.Nullable - @Schema(example = "someID", description = "A customer-provided id that was sent with identification request.") - @JsonProperty(JSON_PROPERTY_LINKED_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLinkedId() { - return linkedId; - } - - - @JsonProperty(JSON_PROPERTY_LINKED_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLinkedId(String linkedId) { - this.linkedId = linkedId; - } - - - public Visit confidence(Confidence confidence) { - this.confidence = confidence; - return this; - } - - /** - * Get confidence - * @return confidence - **/ - @jakarta.annotation.Nullable - @Schema(description = "") - @JsonProperty(JSON_PROPERTY_CONFIDENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Confidence getConfidence() { - return confidence; - } - - - @JsonProperty(JSON_PROPERTY_CONFIDENCE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setConfidence(Confidence confidence) { - this.confidence = confidence; - } - - - public Visit visitorFound(Boolean visitorFound) { - this.visitorFound = visitorFound; - return this; - } - - /** - * Attribute represents if a visitor had been identified before. - * @return visitorFound - **/ - @jakarta.annotation.Nonnull - @Schema(required = true, description = "Attribute represents if a visitor had been identified before.") - @JsonProperty(JSON_PROPERTY_VISITOR_FOUND) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Boolean getVisitorFound() { - return visitorFound; - } - - - @JsonProperty(JSON_PROPERTY_VISITOR_FOUND) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setVisitorFound(Boolean visitorFound) { - this.visitorFound = visitorFound; - } - - - public Visit firstSeenAt(SeenAt firstSeenAt) { - this.firstSeenAt = firstSeenAt; - return this; - } - - /** - * Get firstSeenAt - * @return firstSeenAt - **/ - @jakarta.annotation.Nonnull - @Schema(required = true, description = "") - @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public SeenAt getFirstSeenAt() { - return firstSeenAt; - } - - - @JsonProperty(JSON_PROPERTY_FIRST_SEEN_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setFirstSeenAt(SeenAt firstSeenAt) { - this.firstSeenAt = firstSeenAt; - } - - - public Visit lastSeenAt(SeenAt lastSeenAt) { - this.lastSeenAt = lastSeenAt; - return this; - } - - /** - * Get lastSeenAt - * @return lastSeenAt - **/ - @jakarta.annotation.Nonnull - @Schema(required = true, description = "") - @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public SeenAt getLastSeenAt() { - return lastSeenAt; - } - - - @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setLastSeenAt(SeenAt lastSeenAt) { - this.lastSeenAt = lastSeenAt; - } - - - /** - * Return true if this Visit object is equal to o. - */ - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Visit visit = (Visit) o; - return Objects.equals(this.requestId, visit.requestId) && - Objects.equals(this.browserDetails, visit.browserDetails) && - Objects.equals(this.incognito, visit.incognito) && - Objects.equals(this.ip, visit.ip) && - Objects.equals(this.ipLocation, visit.ipLocation) && - Objects.equals(this.timestamp, visit.timestamp) && - Objects.equals(this.time, visit.time) && - Objects.equals(this.url, visit.url) && - Objects.equals(this.tag, visit.tag) && - Objects.equals(this.linkedId, visit.linkedId) && - Objects.equals(this.confidence, visit.confidence) && - Objects.equals(this.visitorFound, visit.visitorFound) && - Objects.equals(this.firstSeenAt, visit.firstSeenAt) && - Objects.equals(this.lastSeenAt, visit.lastSeenAt); - } - - @Override - public int hashCode() { - return Objects.hash(requestId, browserDetails, incognito, ip, ipLocation, timestamp, time, url, tag, linkedId, confidence, visitorFound, firstSeenAt, lastSeenAt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Visit {\n"); - sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n"); - sb.append(" browserDetails: ").append(toIndentedString(browserDetails)).append("\n"); - sb.append(" incognito: ").append(toIndentedString(incognito)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" ipLocation: ").append(toIndentedString(ipLocation)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" time: ").append(toIndentedString(time)).append("\n"); - sb.append(" url: ").append(toIndentedString(url)).append("\n"); - sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); - sb.append(" linkedId: ").append(toIndentedString(linkedId)).append("\n"); - sb.append(" confidence: ").append(toIndentedString(confidence)).append("\n"); - sb.append(" visitorFound: ").append(toIndentedString(visitorFound)).append("\n"); - sb.append(" firstSeenAt: ").append(toIndentedString(firstSeenAt)).append("\n"); - sb.append(" lastSeenAt: ").append(toIndentedString(lastSeenAt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200.json b/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200.json new file mode 100644 index 00000000..7a46a69e --- /dev/null +++ b/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200.json @@ -0,0 +1,10 @@ +{ + "relatedVisitors": [ + { + "visitorId": "NtCUJGceWX9RpvSbhvOm" + }, + { + "visitorId": "25ee02iZwGxeyT0jMNkZ" + } + ] +} diff --git a/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200_empty.json b/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200_empty.json new file mode 100644 index 00000000..6c9b02c1 --- /dev/null +++ b/sdk/src/test/resources/mocks/related-visitors/get_related_visitors_200_empty.json @@ -0,0 +1,3 @@ +{ + "relatedVisitors": [] +} diff --git a/sdk/src/test/resources/mocks/shared/400_error_empty_visitor_id.json b/sdk/src/test/resources/mocks/shared/400_error_empty_visitor_id.json new file mode 100644 index 00000000..6c5801a0 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/400_error_empty_visitor_id.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "visitor id is required" + } +} diff --git a/sdk/src/test/resources/mocks/shared/400_error_incorrect_visitor_id.json b/sdk/src/test/resources/mocks/shared/400_error_incorrect_visitor_id.json new file mode 100644 index 00000000..c204c568 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/400_error_incorrect_visitor_id.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "RequestCannotBeParsed", + "message": "invalid visitor id" + } +} diff --git a/sdk/src/test/resources/mocks/shared/403_error_feature_not_enabled.json b/sdk/src/test/resources/mocks/shared/403_error_feature_not_enabled.json new file mode 100644 index 00000000..9820a568 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/403_error_feature_not_enabled.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "FeatureNotEnabled", + "message": "feature not enabled" + } +} diff --git a/sdk/src/test/resources/mocks/shared/403_error_token_not_found.json b/sdk/src/test/resources/mocks/shared/403_error_token_not_found.json new file mode 100644 index 00000000..3936b530 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/403_error_token_not_found.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenNotFound", + "message": "secret key is not found" + } +} diff --git a/sdk/src/test/resources/mocks/shared/403_error_token_required.json b/sdk/src/test/resources/mocks/shared/403_error_token_required.json new file mode 100644 index 00000000..544d8714 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/403_error_token_required.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TokenRequired", + "message": "secret key is required" + } +} diff --git a/sdk/src/test/resources/mocks/shared/403_error_wrong_region.json b/sdk/src/test/resources/mocks/shared/403_error_wrong_region.json new file mode 100644 index 00000000..8acc9e01 --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/403_error_wrong_region.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "WrongRegion", + "message": "wrong region" + } +} diff --git a/sdk/src/test/resources/mocks/shared/404_error_visitor_not_found.json b/sdk/src/test/resources/mocks/shared/404_error_visitor_not_found.json new file mode 100644 index 00000000..11da4f3d --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/404_error_visitor_not_found.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "VisitorNotFound", + "message": "visitor not found" + } +} diff --git a/sdk/src/test/resources/mocks/shared/429_error_too_many_requests.json b/sdk/src/test/resources/mocks/shared/429_error_too_many_requests.json new file mode 100644 index 00000000..e38639aa --- /dev/null +++ b/sdk/src/test/resources/mocks/shared/429_error_too_many_requests.json @@ -0,0 +1,6 @@ +{ + "error": { + "code": "TooManyRequests", + "message": "too many requests" + } +}