Skip to content

Commit 7a155c0

Browse files
committed
chore: update missed template
1 parent 5fe60d0 commit 7a155c0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

template/README.mustache

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,36 @@ except ApiException as e:
155155
print("Exception when calling FingerprintApi->get_event: %s\n" % e)
156156
```
157157

158+
Search events with custom filters:
159+
```python
160+
import fingerprint_pro_server_api_sdk
161+
from fingerprint_pro_server_api_sdk.rest import ApiException, KnownApiException
162+
163+
configuration = fingerprint_pro_server_api_sdk.Configuration(api_key="SECRET_API_KEY")
164+
api_instance = fingerprint_pro_server_api_sdk.FingerprintApi(configuration)
165+
166+
limit = 20 # int | Limit the number of events returned.
167+
visitor_id = 'VISITOR_ID' # str | Unique [visitor identifier](https://dev.fingerprint.com/reference/get-function#visitorid) issued by Fingerprint Pro. Filter for events matching this `visitor_id`. (optional)
168+
bot = 'good' # str | Filter events by the bot detection result, specifically: events where <'any'|'good'|'bad'|'none'> kind of bot was detected. (optional)
169+
ip_address = '192.168.0.1/32' # str | 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)
170+
linked_id = 'linked_id_example' # str | 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)
171+
start = 1738687200000 # int | Filter events with a timestamp greater than the start time, in Unix time (milliseconds). (optional)
172+
end = 1738773600000 # int | Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). (optional)
173+
reverse = True # bool | Sort events in reverse timestamp order. (optional)
174+
suspect = False # bool | Filter events previously tagged as suspicious via the [Update API](https://dev.fingerprint.com/reference/updateevent). (optional)
175+
176+
try:
177+
# Get events via search
178+
api_response = api_instance.search_events(limit, visitor_id=visitor_id, bot=bot, ip_address=ip_address, linked_id=linked_id, start=start, end=end, reverse=reverse, suspect=suspect)
179+
print(api_response)
180+
181+
except KnownApiException as e:
182+
structured_error = e.structured_error
183+
print("Error code: %s. Error message: %s\n" % (structured_error.error.code, structured_error.error.message))
184+
except ApiException as e:
185+
print("Exception when calling FingerprintApi->get_event: %s\n" % e)
186+
```
187+
158188
Update event for requestId:
159189
```python
160190
import {{packageName}}

0 commit comments

Comments
 (0)