Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

OpenAPI schema sync #93

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

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

Add `relay` detection method to the VPN Detection Smart Signal
5 changes: 5 additions & 0 deletions .changeset/orange-poets-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fingerprint-pro-server-api-java-sdk': minor
---

**events**: Add a `suspect` field to the `identification` product schema
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*FingerprintApi* | [**deleteVisitorData**](docs/FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID
*FingerprintApi* | [**getEvent**](docs/FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID
*FingerprintApi* | [**getRelatedVisitors**](docs/FingerprintApi.md#getRelatedVisitors) | **GET** /related-visitors | Get Related Visitors
*FingerprintApi* | [**getVisits**](docs/FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID
*FingerprintApi* | [**updateEvent**](docs/FingerprintApi.md#updateEvent) | **PUT** /events/{request_id} | Update an event with a given request ID
*FingerprintApi* | [**webhookTrace**](docs/FingerprintApi.md#webhookTrace) | **TRACE** /webhook |
Expand Down Expand Up @@ -346,6 +347,8 @@ Class | Method | HTTP request | Description
- [Proxy](docs/Proxy.md)
- [RawDeviceAttribute](docs/RawDeviceAttribute.md)
- [RawDeviceAttributeError](docs/RawDeviceAttributeError.md)
- [RelatedVisitor](docs/RelatedVisitor.md)
- [RelatedVisitorsResponse](docs/RelatedVisitorsResponse.md)
- [RemoteControl](docs/RemoteControl.md)
- [RootApps](docs/RootApps.md)
- [SuspectScore](docs/SuspectScore.md)
Expand Down
87 changes: 87 additions & 0 deletions docs/FingerprintApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All URIs are relative to *https://api.fpjs.io*
|------------- | ------------- | -------------|
| [**deleteVisitorData**](FingerprintApi.md#deleteVisitorData) | **DELETE** /visitors/{visitor_id} | Delete data by visitor ID |
| [**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID |
| [**getRelatedVisitors**](FingerprintApi.md#getRelatedVisitors) | **GET** /related-visitors | Get Related Visitors |
| [**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID |
| [**updateEvent**](FingerprintApi.md#updateEvent) | **PUT** /events/{request_id} | Update an event with a given request ID |
| [**webhookTrace**](FingerprintApi.md#webhookTrace) | **TRACE** /webhook | |
Expand Down Expand Up @@ -195,6 +196,92 @@ public class FingerprintApiExample {
| **404** | Not found. The request ID cannot be found in this application's data. | - |


## getRelatedVisitors

> RelatedVisitorsResponse getRelatedVisitors(visitorId)

Get Related Visitors

Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device.
It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID.

⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️

If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support).
To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).


### Example

```java
package main;

import com.fingerprint.api.FingerprintApi;
import com.fingerprint.model.EventsGetResponse;
import com.fingerprint.model.EventsUpdateRequest;
import com.fingerprint.model.VisitorsGetResponse;
import com.fingerprint.sdk.ApiClient;
import com.fingerprint.sdk.ApiException;
import com.fingerprint.sdk.Configuration;
import com.fingerprint.sdk.Region;

public class FingerprintApiExample {
// Fingerprint Pro Secret API Key
private static final String FPJS_API_SECRET = "Fingerprint Pro Secret API Key";
public static void main(String... args) {
// Create a new api client instance from Configuration with your Fingerprint Pro Server API Key and your Fingerprint Pro Server API Region.
/*
You can specify a region on getDefaultApiClient function's second parameter
If you leave the second parameter empty, then Region.GLOBAL will be used as a default region
Options for regions are:
Region.GLOBAL
Region.EUROPE
Region.ASIA
*/
ApiClient client = Configuration.getDefaultApiClient(FPJS_API_SECRET, Region.EUROPE);
FingerprintApi api = new FingerprintApi(client);
String visitorId = "visitorId_example"; // String | The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device.
try {
RelatedVisitorsResponse result = apiInstance.getRelatedVisitors(visitorId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FingerprintApi.getRelatedVisitors:" + e.getMessage());
}
}
}
```


### Parameters


| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **visitorId** | **String**| The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. | |

### Return type

[**RelatedVisitorsResponse**](RelatedVisitorsResponse.md)

### Authorization

[ApiKeyHeader](../README.md#ApiKeyHeader), [ApiKeyQuery](../README.md#ApiKeyQuery)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK. | - |
| **400** | Bad request. The visitor ID parameter is missing or in the wrong format. | - |
| **403** | Forbidden. Access to this API is denied. | - |
| **404** | Not found. The visitor ID cannot be found in this application's data. | - |
| **429** | Too Many Requests. The request is throttled. | - |


## getVisits

> VisitorsGetResponse getVisits(visitorId, requestId, linkedId, limit, paginationKey, before)
Expand Down
13 changes: 13 additions & 0 deletions docs/RelatedVisitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# RelatedVisitor


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**visitorId** | **String** | Visitor ID of a browser that originates from the same mobile device as the input visitor ID. | |



13 changes: 13 additions & 0 deletions docs/RelatedVisitorsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# RelatedVisitorsResponse


## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**relatedVisitors** | [**List<RelatedVisitor>**](RelatedVisitor.md) | | |



91 changes: 91 additions & 0 deletions res/fingerprint-server-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,76 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/related-visitors:
get:
tags:
- Fingerprint
operationId: getRelatedVisitors
summary: Get Related Visitors
description: >
Related visitors API lets you link web visits and in-app browser visits
that originated from the same mobile device.

It searches the past 6 months of identification events to find the
visitor IDs that belong to the same mobile device as the given visitor
ID.


⚠️ Please note that this API is not enabled by default and is billable
separately. ⚠️


If you would like to use Related visitors API, please contact our
[support team](https://fingerprint.com/support).

To learn more, see [Related visitors API
reference](https://dev.fingerprint.com/reference/related-visitors-api).
parameters:
- name: visitor_id
in: query
required: true
schema:
type: string
description: >-
The [visitor
ID](https://dev.fingerprint.com/reference/get-function#visitorid)
for which you want to find the other visitor IDs that originated
from the same mobile device.
responses:
'200':
description: OK.
content:
application/json:
schema:
$ref: '#/components/schemas/RelatedVisitorsResponse'
'400':
description: >-
Bad request. The visitor ID parameter is missing or in the wrong
format.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden. Access to this API is denied.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: >-
Not found. The visitor ID cannot be found in this application's
data.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests. The request is throttled.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/webhook:
trace:
tags:
Expand Down Expand Up @@ -1902,6 +1972,27 @@ components:
properties:
error:
type: string
RelatedVisitor:
type: object
additionalProperties: false
required:
- visitorId
properties:
visitorId:
type: string
description: >-
Visitor ID of a browser that originates from the same mobile device
as the input visitor ID.
RelatedVisitorsResponse:
type: object
additionalProperties: false
required:
- relatedVisitors
properties:
relatedVisitors:
type: array
items:
$ref: '#/components/schemas/RelatedVisitor'
WebhookRootApps:
type: object
additionalProperties: false
Expand Down
79 changes: 79 additions & 0 deletions sdk/src/main/java/com/fingerprint/api/FingerprintApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.fingerprint.model.ErrorResponse;
import com.fingerprint.model.EventsGetResponse;
import com.fingerprint.model.EventsUpdateRequest;
import com.fingerprint.model.RelatedVisitorsResponse;
import com.fingerprint.model.VisitorsGetResponse;
import com.fingerprint.model.Webhook;

Expand Down Expand Up @@ -209,6 +210,84 @@ public ApiResponse<EventsGetResponse> getEventWithHttpInfo(String requestId) thr
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Get Related Visitors
* Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support). To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).
* @param visitorId The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. (required)
* @return RelatedVisitorsResponse
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK. </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request. The visitor ID parameter is missing or in the wrong format. </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden. Access to this API is denied. </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. The visitor ID cannot be found in this application&#39;s data. </td><td> - </td></tr>
<tr><td> 429 </td><td> Too Many Requests. The request is throttled. </td><td> - </td></tr>
</table>
*/
public RelatedVisitorsResponse getRelatedVisitors(String visitorId) throws ApiException {
return getRelatedVisitorsWithHttpInfo(visitorId).getData();
}

/**
* Get Related Visitors
* Related visitors API lets you link web visits and in-app browser visits that originated from the same mobile device. It searches the past 6 months of identification events to find the visitor IDs that belong to the same mobile device as the given visitor ID. ⚠️ Please note that this API is not enabled by default and is billable separately. ⚠️ If you would like to use Related visitors API, please contact our [support team](https://fingerprint.com/support). To learn more, see [Related visitors API reference](https://dev.fingerprint.com/reference/related-visitors-api).
* @param visitorId The [visitor ID](https://dev.fingerprint.com/reference/get-function#visitorid) for which you want to find the other visitor IDs that originated from the same mobile device. (required)
* @return ApiResponse&lt;RelatedVisitorsResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK. </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request. The visitor ID parameter is missing or in the wrong format. </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden. Access to this API is denied. </td><td> - </td></tr>
<tr><td> 404 </td><td> Not found. The visitor ID cannot be found in this application&#39;s data. </td><td> - </td></tr>
<tr><td> 429 </td><td> Too Many Requests. The request is throttled. </td><td> - </td></tr>
</table>
*/
public ApiResponse<RelatedVisitorsResponse> getRelatedVisitorsWithHttpInfo(String visitorId) throws ApiException {
Object localVarPostBody = null;

// verify the required parameter 'visitorId' is set
if (visitorId == null) {
throw new ApiException(400, "Missing the required parameter 'visitorId' when calling getRelatedVisitors");
}

// create path and map variables
String localVarPath = "/related-visitors";

// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

localVarQueryParams.add(new Pair("ii", INTEGRATION_INFO));
necipallef marked this conversation as resolved.
Show resolved Hide resolved

localVarQueryParams.addAll(apiClient.parameterToPairs("", "visitor_id", visitorId));




final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {

};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

String[] localVarAuthNames = new String[] { "ApiKeyHeader", "ApiKeyQuery" };

GenericType<RelatedVisitorsResponse> localVarReturnType = new GenericType<RelatedVisitorsResponse>() {};

return apiClient.invokeAPI("FingerprintApi.getRelatedVisitors", localVarPath, "GET", localVarQueryParams, localVarPostBody,
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Get visits by visitor ID
* 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.
Expand Down
Loading
Loading