Skip to content

Commit 3a45444

Browse files
committed
feat: update OpenAPI schema
1 parent 62594af commit 3a45444

12 files changed

+1124
-0
lines changed

.changeset/forty-seas-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-php-sdk': minor
3+
---
4+
5+
Add `relay` detection method to the VPN Detection Smart Signal

.changeset/good-experts-watch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-php-sdk': minor
3+
---
4+
5+
**events-search**: Add a new `events/search` API endpoint. Allow users to search for identification events matching one or more search criteria, for example, visitor ID, IP address, bot detection result, etc.

.changeset/orange-poets-drive.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'fingerprint-pro-server-api-php-sdk': minor
3+
---
4+
5+
**events**: Add a `suspect` field to the `identification` product schema

.changeset/pre.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mode": "pre",
3+
"tag": "develop",
4+
"initialVersions": {
5+
"fingerprint-pro-server-api-php-sdk": "6.2.1"
6+
},
7+
"changesets": []
8+
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ Class | Method | HTTP request | Description
239239
*FingerprintApi* | [**getEvent**](docs/Api/FingerprintApi.md#getevent) | **GET** /events/{request_id} | Get event by request ID
240240
*FingerprintApi* | [**getRelatedVisitors**](docs/Api/FingerprintApi.md#getrelatedvisitors) | **GET** /related-visitors | Get Related Visitors
241241
*FingerprintApi* | [**getVisits**](docs/Api/FingerprintApi.md#getvisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID
242+
*FingerprintApi* | [**searchEvents**](docs/Api/FingerprintApi.md#searchevents) | **GET** /events/search | Get events via search
242243
*FingerprintApi* | [**updateEvent**](docs/Api/FingerprintApi.md#updateevent) | **PUT** /events/{request_id} | Update an event with a given request ID
243244

244245
## Documentation for Models
@@ -308,6 +309,8 @@ Class | Method | HTTP request | Description
308309
- [RelatedVisitorsResponse](docs/Model/RelatedVisitorsResponse.md)
309310
- [RemoteControl](docs/Model/RemoteControl.md)
310311
- [RootApps](docs/Model/RootApps.md)
312+
- [SearchEventsResponse](docs/Model/SearchEventsResponse.md)
313+
- [SearchEventsResponseEvents](docs/Model/SearchEventsResponseEvents.md)
311314
- [SuspectScore](docs/Model/SuspectScore.md)
312315
- [Tampering](docs/Model/Tampering.md)
313316
- [Tor](docs/Model/Tor.md)

docs/Api/FingerprintApi.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Method | HTTP request | Description
88
[**getEvent**](FingerprintApi.md#getEvent) | **GET** /events/{request_id} | Get event by request ID
99
[**getRelatedVisitors**](FingerprintApi.md#getRelatedVisitors) | **GET** /related-visitors | Get Related Visitors
1010
[**getVisits**](FingerprintApi.md#getVisits) | **GET** /visitors/{visitor_id} | Get visits by visitor ID
11+
[**searchEvents**](FingerprintApi.md#searchEvents) | **GET** /events/search | Get events via search
1112
[**updateEvent**](FingerprintApi.md#updateEvent) | **PUT** /events/{request_id} | Update an event with a given request ID
1213

1314
# **deleteVisitorData**
@@ -256,6 +257,84 @@ Array:
256257
1. \Psr\Http\Message\ResponseInterface
257258

258259

260+
### Authorization
261+
262+
[ApiKeyHeader](../../README.md#ApiKeyHeader), [ApiKeyQuery](../../README.md#ApiKeyQuery)
263+
264+
### HTTP request headers
265+
266+
- **Content-Type**: Not defined
267+
- **Accept**: application/json
268+
269+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
270+
271+
# **searchEvents**
272+
> [ \Fingerprint\ServerAPI\Model\SearchEventsResponse, \Psr\Http\Message\ResponseInterface ] searchEvents($limit, $visitor_id, $bot, $ip_address, $linked_id, $start, $end, $reverse, $suspect)
273+
274+
Get events via search
275+
276+
Search for identification events, including Smart Signals, using multiple filtering criteria. If you don't provide `start` or `end` parameters, the default search range is the last 7 days. Please note that events include mobile signals (e.g. `rootApps`) even if the request originated from a non-mobile platform. We recommend you **ignore** mobile signals for such requests.
277+
278+
### Example
279+
```php
280+
<?php
281+
282+
require_once(__DIR__ . '/vendor/autoload.php');
283+
284+
const FPJS_API_SECRET = "Your Fingerprint Secret API Key"; // Fingerprint Secret API Key
285+
286+
// Import Fingerprint Classes and Guzzle HTTP Client
287+
use Fingerprint\ServerAPI\Api\FingerprintApi;
288+
use Fingerprint\ServerAPI\Configuration;
289+
use GuzzleHttp\Client;
290+
291+
// Create new Configuration instance with defaultValues, added our API Secret and our Region
292+
$config = Configuration::getDefaultConfiguration(FPJS_API_SECRET, Configuration::REGION_EUROPE);
293+
$client = new FingerprintApi(
294+
new Client(),
295+
$config
296+
);
297+
298+
$limit = 56; // int | Limit the number of events returned.
299+
$visitor_id = "visitor_id_example"; // string | Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`.
300+
$bot = "bot_example"; // string | Filter events by the bot detection result, specifically: - events where any kind of bot was detected. - events where a good bot was detected. - events where a bad bot was detected. - events where no bot was detected.
301+
$ip_address = "ip_address_example"; // string | Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32
302+
$linked_id = "linked_id_example"; // string | Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#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.
303+
$start = 789; // int | Filter events with a timestamp greater than the start time, in Unix time (milliseconds).
304+
$end = 789; // int | Filter events with a timestamp smaller than the end time, in Unix time (milliseconds).
305+
$reverse = true; // bool | Sort events in reverse timestamp order.
306+
$suspect = true; // bool | Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent).
307+
308+
try {
309+
list($model, $httpResponse) = $client->searchEvents($limit, $visitor_id, $bot, $ip_address, $linked_id, $start, $end, $reverse, $suspect);
310+
echo "<pre>" . $httpResponse->getBody()->getContents() . "</pre>";
311+
} catch (Exception $e) {
312+
echo 'Exception when calling FingerprintApi->searchEvents: ', $e->getMessage(), PHP_EOL;
313+
}
314+
?>
315+
```
316+
317+
### Parameters
318+
319+
Name | Type | Description | Notes
320+
------------- | ------------- | ------------- | -------------
321+
**limit** | **int**| Limit the number of events returned. |
322+
**visitor_id** | **string**| Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. | [optional]
323+
**bot** | **string**| Filter events by the bot detection result, specifically: - events where any kind of bot was detected. - events where a good bot was detected. - events where a bad bot was detected. - events where no bot was detected. | [optional]
324+
**ip_address** | **string**| Filter events by IP address range. The range can be as specific as a single IP (/32 for IPv4 or /128 for IPv6) All ip_address filters must use CIDR notation, for example, 10.0.0.0/24, 192.168.0.1/32 | [optional]
325+
**linked_id** | **string**| Filter events by your custom identifier. You can use [linked IDs](https://dev.fingerprint.com/reference/get-function#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]
326+
**start** | **int**| Filter events with a timestamp greater than the start time, in Unix time (milliseconds). | [optional]
327+
**end** | **int**| Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). | [optional]
328+
**reverse** | **bool**| Sort events in reverse timestamp order. | [optional]
329+
**suspect** | **bool**| Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). | [optional]
330+
331+
### Return type
332+
333+
Array:
334+
0. [**\Fingerprint\ServerAPI\Model\SearchEventsResponse**](../Model/SearchEventsResponse.md) | null,
335+
1. \Psr\Http\Message\ResponseInterface
336+
337+
259338
### Authorization
260339

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

docs/Model/SearchEventsResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SearchEventsResponse
2+
Contains a list of all identification events matching the specified search criteria.
3+
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**events** | [**\Fingerprint\ServerAPI\Model\SearchEventsResponseEvents[]**](SearchEventsResponseEvents.md) | | [optional]
9+
**pagination_key** | **string** | | [optional]
10+
11+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
12+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# SearchEventsResponseEvents
2+
Device intelligence results for the identification event.
3+
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**products** | [**\Fingerprint\ServerAPI\Model\Products**](Products.md) | |
9+
10+
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
11+

res/fingerprint-server-api.yaml

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,131 @@ paths:
142142
application/json:
143143
schema:
144144
$ref: '#/components/schemas/ErrorResponse'
145+
/events/search:
146+
get:
147+
tags:
148+
- Fingerprint
149+
operationId: searchEvents
150+
summary: Get events via search
151+
description: >
152+
Search for identification events, including Smart Signals, using
153+
multiple filtering criteria. If you don't provide `start` or `end`
154+
parameters, the default search range is the last 7 days.
155+
156+
157+
Please note that events include mobile signals (e.g. `rootApps`) even if
158+
the request originated from a non-mobile platform. We recommend you
159+
**ignore** mobile signals for such requests.
160+
parameters:
161+
- name: limit
162+
in: query
163+
required: true
164+
schema:
165+
type: integer
166+
format: int32
167+
minimum: 1
168+
example: 10
169+
description: |
170+
Limit the number of events returned.
171+
- name: visitor_id
172+
in: query
173+
schema:
174+
type: string
175+
description: >
176+
Unique [visitor
177+
identifier](https://dev.fingerprint.com/reference/get-function#visitorid)
178+
issued by Fingerprint Pro.
179+
180+
Filter for events matching this `visitor_id`.
181+
- name: bot
182+
in: query
183+
schema:
184+
type: string
185+
enum:
186+
- all
187+
- good
188+
- bad
189+
- none
190+
description: |
191+
Filter events by the bot detection result, specifically:
192+
- events where any kind of bot was detected.
193+
- events where a good bot was detected.
194+
- events where a bad bot was detected.
195+
- events where no bot was detected.
196+
- name: ip_address
197+
in: query
198+
schema:
199+
type: string
200+
description: >
201+
Filter events by IP address range. The range can be as specific as a
202+
single IP (/32 for IPv4 or /128 for IPv6)
203+
204+
All ip_address filters must use CIDR notation, for example,
205+
10.0.0.0/24, 192.168.0.1/32
206+
- name: linked_id
207+
in: query
208+
schema:
209+
type: string
210+
description: >
211+
Filter events by your custom identifier.
212+
213+
214+
You can use [linked
215+
IDs](https://dev.fingerprint.com/reference/get-function#linkedid) to
216+
associate identification requests with your own identifier, for
217+
example, session ID, purchase ID, or transaction ID. You can then
218+
use this `linked_id` parameter to retrieve all events associated
219+
with your custom identifier.
220+
- name: start
221+
in: query
222+
schema:
223+
type: integer
224+
format: int64
225+
description: >
226+
Filter events with a timestamp greater than the start time, in Unix
227+
time (milliseconds).
228+
- name: end
229+
in: query
230+
schema:
231+
type: integer
232+
format: int64
233+
description: >
234+
Filter events with a timestamp smaller than the end time, in Unix
235+
time (milliseconds).
236+
- name: reverse
237+
in: query
238+
schema:
239+
type: boolean
240+
description: |
241+
Sort events in reverse timestamp order.
242+
- name: suspect
243+
in: query
244+
schema:
245+
type: boolean
246+
description: >
247+
Filter events previously tagged as suspicious via the [Update
248+
API](https://dev.fingerprint.com/reference/updateevent).
249+
responses:
250+
'200':
251+
description: Events matching the filter(s).
252+
content:
253+
application/json:
254+
schema:
255+
$ref: '#/components/schemas/SearchEventsResponse'
256+
'400':
257+
description: >-
258+
Bad request. One or more supplied search parameters are invalid, or
259+
a required parameter is missing.
260+
content:
261+
application/json:
262+
schema:
263+
$ref: '#/components/schemas/ErrorResponse'
264+
'403':
265+
description: Forbidden. Access to this API is denied.
266+
content:
267+
application/json:
268+
schema:
269+
$ref: '#/components/schemas/ErrorResponse'
145270
/visitors/{visitor_id}:
146271
get:
147272
tags:
@@ -1874,6 +1999,25 @@ components:
18741999
suspect:
18752000
type: boolean
18762001
description: Suspect flag indicating observed suspicious or fraudulent event
2002+
SearchEventsResponse:
2003+
type: object
2004+
description: >-
2005+
Contains a list of all identification events matching the specified
2006+
search criteria.
2007+
additionalProperties: false
2008+
properties:
2009+
events:
2010+
type: array
2011+
items:
2012+
type: object
2013+
description: Device intelligence results for the identification event.
2014+
required:
2015+
- products
2016+
properties:
2017+
products:
2018+
$ref: '#/components/schemas/Products'
2019+
paginationKey:
2020+
type: string
18772021
Visit:
18782022
type: object
18792023
additionalProperties: false

0 commit comments

Comments
 (0)