Skip to content

Commit

Permalink
feat: add new smart signals and confidence score
Browse files Browse the repository at this point in the history
  • Loading branch information
Orkuncakilkaya committed Aug 26, 2024
1 parent e2c1479 commit 89121a7
Show file tree
Hide file tree
Showing 72 changed files with 6,549 additions and 153 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ if(!$isValidWebhookSign) {

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by requestId
*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId
*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by request ID
*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID

## Documentation for Models

Expand All @@ -243,17 +243,29 @@ Class | Method | HTTP request | Description
- [BotdResult](docs/Model/BotdResult.md)
- [BrowserDetails](docs/Model/BrowserDetails.md)
- [ClonedAppResult](docs/Model/ClonedAppResult.md)
- [Common403ErrorResponse](docs/Model/Common403ErrorResponse.md)
- [Confidence](docs/Model/Confidence.md)
- [DataCenter](docs/Model/DataCenter.md)
- [DeprecatedIPLocation](docs/Model/DeprecatedIPLocation.md)
- [DeprecatedIPLocationCity](docs/Model/DeprecatedIPLocationCity.md)
- [DeveloperToolsResult](docs/Model/DeveloperToolsResult.md)
- [EmulatorResult](docs/Model/EmulatorResult.md)
- [ErrorEvent403Response](docs/Model/ErrorEvent403Response.md)
- [ErrorEvent403ResponseError](docs/Model/ErrorEvent403ResponseError.md)
- [ErrorCommon403Response](docs/Model/ErrorCommon403Response.md)
- [ErrorCommon429Response](docs/Model/ErrorCommon429Response.md)
- [ErrorCommon429ResponseError](docs/Model/ErrorCommon429ResponseError.md)
- [ErrorEvent404Response](docs/Model/ErrorEvent404Response.md)
- [ErrorEvent404ResponseError](docs/Model/ErrorEvent404ResponseError.md)
- [ErrorUpdateEvent400Response](docs/Model/ErrorUpdateEvent400Response.md)
- [ErrorUpdateEvent400ResponseError](docs/Model/ErrorUpdateEvent400ResponseError.md)
- [ErrorUpdateEvent409Response](docs/Model/ErrorUpdateEvent409Response.md)
- [ErrorUpdateEvent409ResponseError](docs/Model/ErrorUpdateEvent409ResponseError.md)
- [ErrorVisitor400Response](docs/Model/ErrorVisitor400Response.md)
- [ErrorVisitor400ResponseError](docs/Model/ErrorVisitor400ResponseError.md)
- [ErrorVisitor404Response](docs/Model/ErrorVisitor404Response.md)
- [ErrorVisitor404ResponseError](docs/Model/ErrorVisitor404ResponseError.md)
- [ErrorVisits403](docs/Model/ErrorVisits403.md)
- [EventResponse](docs/Model/EventResponse.md)
- [EventUpdateRequest](docs/Model/EventUpdateRequest.md)
- [FactoryResetResult](docs/Model/FactoryResetResult.md)
- [FridaResult](docs/Model/FridaResult.md)
- [HighActivityResult](docs/Model/HighActivityResult.md)
Expand All @@ -269,7 +281,6 @@ Class | Method | HTTP request | Description
- [JailbrokenResult](docs/Model/JailbrokenResult.md)
- [Location](docs/Model/Location.md)
- [LocationSpoofingResult](docs/Model/LocationSpoofingResult.md)
- [ManyRequestsResponse](docs/Model/ManyRequestsResponse.md)
- [PrivacySettingsResult](docs/Model/PrivacySettingsResult.md)
- [ProductError](docs/Model/ProductError.md)
- [ProductsResponse](docs/Model/ProductsResponse.md)
Expand All @@ -278,11 +289,13 @@ Class | Method | HTTP request | Description
- [ProductsResponseIdentificationData](docs/Model/ProductsResponseIdentificationData.md)
- [ProxyResult](docs/Model/ProxyResult.md)
- [RawDeviceAttributesResult](docs/Model/RawDeviceAttributesResult.md)
- [RemoteControlResult](docs/Model/RemoteControlResult.md)
- [Response](docs/Model/Response.md)
- [ResponseVisits](docs/Model/ResponseVisits.md)
- [RootAppsResult](docs/Model/RootAppsResult.md)
- [SeenAt](docs/Model/SeenAt.md)
- [SignalResponseClonedApp](docs/Model/SignalResponseClonedApp.md)
- [SignalResponseDeveloperTools](docs/Model/SignalResponseDeveloperTools.md)
- [SignalResponseEmulator](docs/Model/SignalResponseEmulator.md)
- [SignalResponseFactoryReset](docs/Model/SignalResponseFactoryReset.md)
- [SignalResponseFrida](docs/Model/SignalResponseFrida.md)
Expand All @@ -295,16 +308,22 @@ Class | Method | HTTP request | Description
- [SignalResponsePrivacySettings](docs/Model/SignalResponsePrivacySettings.md)
- [SignalResponseProxy](docs/Model/SignalResponseProxy.md)
- [SignalResponseRawDeviceAttributes](docs/Model/SignalResponseRawDeviceAttributes.md)
- [SignalResponseRemoteControl](docs/Model/SignalResponseRemoteControl.md)
- [SignalResponseRootApps](docs/Model/SignalResponseRootApps.md)
- [SignalResponseSuspectScore](docs/Model/SignalResponseSuspectScore.md)
- [SignalResponseTampering](docs/Model/SignalResponseTampering.md)
- [SignalResponseTor](docs/Model/SignalResponseTor.md)
- [SignalResponseVelocity](docs/Model/SignalResponseVelocity.md)
- [SignalResponseVirtualMachine](docs/Model/SignalResponseVirtualMachine.md)
- [SignalResponseVpn](docs/Model/SignalResponseVpn.md)
- [Subdivision](docs/Model/Subdivision.md)
- [SuspectScoreResult](docs/Model/SuspectScoreResult.md)
- [TamperingResult](docs/Model/TamperingResult.md)
- [TooManyRequestsResponse](docs/Model/TooManyRequestsResponse.md)
- [TorResult](docs/Model/TorResult.md)
- [VelocityIntervalResult](docs/Model/VelocityIntervalResult.md)
- [VelocityIntervals](docs/Model/VelocityIntervals.md)
- [VelocityResult](docs/Model/VelocityResult.md)
- [VirtualMachineResult](docs/Model/VirtualMachineResult.md)
- [Visit](docs/Model/Visit.md)
- [VpnResult](docs/Model/VpnResult.md)
Expand Down
20 changes: 10 additions & 10 deletions docs/Api/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ All URIs are relative to *https://api.fpjs.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by requestId
[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitorId
[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID
[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID

# **getEvent**
> [ \Fingerprint\ServerAPI\Model\EventResponse, \Psr\Http\Message\ResponseInterface ] getEvent($request_id)
Get event by requestId
Get event by request ID

This endpoint allows you to get a detailed analysis of an individual request. **Only for Enterprise customers:** Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`.
Get a detailed analysis of an individual identification event, including Smart Signals. Please note that the response includes mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. It is highly recommended that you **ignore** the mobile signals for such requests. Use `requestId` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `requestId`.

### Example
```php
Expand All @@ -34,7 +34,7 @@ $client = new FingerprintApi(
$config
);

$request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request.
$request_id = "request_id_example"; // string | The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request.

try {
list($model, $httpResponse) = $client->getEvent($request_id);
Expand All @@ -49,7 +49,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each analysis request. |
**request_id** | **string**| The unique [identifier](https://dev.fingerprint.com/docs/js-agent#requestid) of each identification request. |

### Return type

Expand All @@ -72,9 +72,9 @@ Array:
# **getVisits**
> [ \Fingerprint\ServerAPI\Model\Response, \Psr\Http\Message\ResponseInterface ] getVisits($visitor_id, $request_id, $linked_id, $limit, $pagination_key, $before)
Get visits by visitorId
Get visits by visitor ID

This endpoint allows you to get a history of visits for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received.
Get a history of visits (identification events) for a specific `visitorId`. Use the `visitorId` as a URL path parameter. Only information from the _Identification_ product is returned. #### Headers * `Retry-After` — Present in case of `429 Too many requests`. Indicates how long you should wait before making a follow-up request. The value is non-negative decimal integer indicating the seconds to delay after the response is received.

### Example
```php
Expand All @@ -96,7 +96,7 @@ $client = new FingerprintApi(
$config
);

$visitor_id = "visitor_id_example"; // string | Unique identifier of the visitor issued by Fingerprint Pro.
$visitor_id = "visitor_id_example"; // string | Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro.
$request_id = "request_id_example"; // string | Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned.
$linked_id = "linked_id_example"; // string | Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier.
$limit = 56; // int | Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500.
Expand All @@ -116,7 +116,7 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**visitor_id** | **string**| Unique identifier of the visitor issued by Fingerprint Pro. |
**visitor_id** | **string**| Unique [visitor identifier](https://dev.fingerprint.com/docs/js-agent#visitorid) issued by Fingerprint Pro. |
**request_id** | **string**| Filter visits by `requestId`. Every identification request has a unique identifier associated with it called `requestId`. This identifier is returned to the client in the identification [result](https://dev.fingerprint.com/docs/js-agent#requestid). When you filter visits by `requestId`, only one visit will be returned. | [optional]
**linked_id** | **string**| Filter visits by your custom identifier. You can use [`linkedId`](https://dev.fingerprint.com/docs/js-agent#linkedid) to associate identification requests with your own identifier, for example: session ID, purchase ID, or transaction ID. You can then use this `linked_id` parameter to retrieve all events associated with your custom identifier. | [optional]
**limit** | **int**| Limit scanned results. For performance reasons, the API first scans some number of events before filtering them. Use `limit` to specify how many events are scanned before they are filtered by `requestId` or `linkedId`. Results are always returned sorted by the timestamp (most recent first). By default, the most recent 100 visits are scanned, the maximum is 500. | [optional]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ErrorEvent403ResponseError
# Common403ErrorResponse

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | Error code: * `TokenRequired` - `Auth-API-Key` header is missing or empty * `TokenNotFound` - subscription not found for specified secret key * `SubscriptionNotActive` - subscription is not active * `WrongRegion` - server and subscription region differ |
**code** | **string** | 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 |
**message** | **string** | |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
Expand Down
1 change: 1 addition & 0 deletions docs/Model/Confidence.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**score** | **float** | The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. |
**revision** | **string** | 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. | [optional]

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

9 changes: 9 additions & 0 deletions docs/Model/DeveloperToolsResult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DeveloperToolsResult

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**result** | **bool** | `true` if the browser is Chrome with DevTools open or Firefox with Developer Tools open, `false` otherwise. |

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

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ErrorEvent403Response
# ErrorCommon403Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorEvent403ResponseError**](ErrorEvent403ResponseError.md) | | [optional]
**error** | [**\Fingerprint\ServerAPI\Model\Common403ErrorResponse**](Common403ErrorResponse.md) | | [optional]

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

9 changes: 9 additions & 0 deletions docs/Model/ErrorCommon429Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ErrorCommon429Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorCommon429ResponseError**](ErrorCommon429ResponseError.md) | | [optional]

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

10 changes: 10 additions & 0 deletions docs/Model/ErrorCommon429ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorCommon429ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | Error code: * `TooManyRequests` - The request is throttled. |
**message** | **string** | |

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

2 changes: 1 addition & 1 deletion docs/Model/ErrorEvent404ResponseError.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | Error code: * `RequestNotFound` - request not found for specified id |
**code** | **string** | Error code: * `RequestNotFound` - The specified request ID was not found. It never existed, expired, or it has been deleted. |
**message** | **string** | |

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
Expand Down
9 changes: 9 additions & 0 deletions docs/Model/ErrorUpdateEvent400Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ErrorUpdateEvent400Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorUpdateEvent400ResponseError**](ErrorUpdateEvent400ResponseError.md) | | [optional]

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

10 changes: 10 additions & 0 deletions docs/Model/ErrorUpdateEvent400ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorUpdateEvent400ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | 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 |
**message** | **string** | Details about the underlying issue with the input payload |

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

9 changes: 9 additions & 0 deletions docs/Model/ErrorUpdateEvent409Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ErrorUpdateEvent409Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorUpdateEvent409ResponseError**](ErrorUpdateEvent409ResponseError.md) | | [optional]

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

10 changes: 10 additions & 0 deletions docs/Model/ErrorUpdateEvent409ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorUpdateEvent409ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | 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. |
**message** | **string** | |

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

9 changes: 9 additions & 0 deletions docs/Model/ErrorVisitor400Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ErrorVisitor400Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorVisitor400ResponseError**](ErrorVisitor400ResponseError.md) | | [optional]

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

10 changes: 10 additions & 0 deletions docs/Model/ErrorVisitor400ResponseError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# ErrorVisitor400ResponseError

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | Error code: * `RequestCannotBeParsed` - The visitor ID parameter is missing or in the wrong format. |
**message** | **string** | |

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

9 changes: 9 additions & 0 deletions docs/Model/ErrorVisitor404Response.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ErrorVisitor404Response

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**error** | [**\Fingerprint\ServerAPI\Model\ErrorVisitor404ResponseError**](ErrorVisitor404ResponseError.md) | | [optional]

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

Loading

0 comments on commit 89121a7

Please sign in to comment.