Coverage for fingerprint_server_sdk / api / fingerprint_api.py: 84%

249 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-15 09:18 +0000

1""" 

2Server API 

3Fingerprint Server API allows you to get, search, and update Events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. 

4Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. 

5 

6The version of the OpenAPI document: 4 

7Contact: support@fingerprint.com 

8Generated by OpenAPI Generator (https://openapi-generator.tech) 

9 

10Do not edit the class manually. 

11""" # noqa: E501 

12 

13from typing import Annotated, Any, Optional, Union # noqa: UP035 

14 

15from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call 

16 

17from fingerprint_server_sdk.api_client import ApiClient, RequestSerialized 

18from fingerprint_server_sdk.api_response import ApiResponse 

19from fingerprint_server_sdk.configuration import Configuration 

20from fingerprint_server_sdk.models.event import Event 

21from fingerprint_server_sdk.models.event_search import EventSearch 

22from fingerprint_server_sdk.models.event_update import EventUpdate 

23from fingerprint_server_sdk.models.search_events_bot import SearchEventsBot 

24from fingerprint_server_sdk.models.search_events_incremental_identification_status import ( 

25 SearchEventsIncrementalIdentificationStatus, 

26) 

27from fingerprint_server_sdk.models.search_events_rare_device_percentile_bucket import ( 

28 SearchEventsRareDevicePercentileBucket, 

29) 

30from fingerprint_server_sdk.models.search_events_sdk_platform import SearchEventsSdkPlatform 

31from fingerprint_server_sdk.models.search_events_vpn_confidence import SearchEventsVpnConfidence 

32from fingerprint_server_sdk.rest import RESTResponseType 

33 

34# Type alias for query and form parameter values 

35ParamValue = Union[str, int, float, bool, list[str]] 

36 

37 

38class FingerprintApi: 

39 """Fingerprint Python Server SDK 

40 

41 Fingerprint (https://fingerprint.com) is a device intelligence platform offering industry-leading accuracy. Fingerprint Server API allows you to search, update, and delete identification events in a server environment. It can be used for data exports, decision-making, and data analysis scenarios. Server API is intended for server-side usage, it's not intended to be used from the client side, whether it's a browser or a mobile device. 

42 

43 :param configuration: API client configuration. 

44 """ 

45 

46 def __init__(self, configuration: Configuration) -> None: 

47 self.api_client = ApiClient(configuration) 

48 

49 @validate_call 

50 def delete_visitor_data( 

51 self, 

52 visitor_id: Annotated[ 

53 StrictStr, 

54 Field( 

55 description='The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete.' 

56 ), 

57 ], 

58 _request_timeout: Union[ 

59 None, 

60 Annotated[StrictFloat, Field(gt=0)], 

61 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

62 ] = None, 

63 _request_auth: Optional[dict[StrictStr, Any]] = None, 

64 _content_type: Optional[StrictStr] = None, 

65 _headers: Optional[dict[StrictStr, Any]] = None, 

66 ) -> None: 

67 """Delete data by visitor ID 

68 

69 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 Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace). #### 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://docs.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 [`/v4/events` API](https://docs.fingerprint.com/reference/server-api-v4-get-event) with an `event_id` that was made outside of the 10 days, you will still receive a valid response. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. 

70 

71 :param visitor_id: The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) 

72 :type visitor_id: str 

73 :param _request_timeout: timeout setting for this request. If one 

74 number provided, it will be total request 

75 timeout. It can also be a pair (tuple) of 

76 (connection, read) timeouts. 

77 :type _request_timeout: int, tuple(int, int), optional 

78 :param _request_auth: set to override the auth_settings for an a single 

79 request; this effectively ignores the 

80 authentication in the spec for a single request. 

81 :type _request_auth: dict, optional 

82 :param _content_type: force content-type for the request. 

83 :type _content_type: str, Optional 

84 :param _headers: set to override the headers for a single 

85 request; this effectively ignores the headers 

86 in the spec for a single request. 

87 :type _headers: dict, optional 

88 :return: Returns the result object. 

89 """ # noqa: E501 

90 

91 _param = self._delete_visitor_data_serialize( 

92 visitor_id=visitor_id, 

93 _request_auth=_request_auth, 

94 _content_type=_content_type, 

95 _headers=_headers, 

96 ) 

97 

98 _response_types_map: dict[str, Optional[str]] = { 

99 '200': None, 

100 '400': 'ErrorResponse', 

101 '403': 'ErrorResponse', 

102 '404': 'ErrorResponse', 

103 '429': 'ErrorResponse', 

104 } 

105 

106 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

107 response_data.read() 

108 self.api_client.response_deserialize( 

109 response_data=response_data, 

110 response_types_map=_response_types_map, 

111 ) 

112 

113 @validate_call 

114 def delete_visitor_data_with_http_info( 

115 self, 

116 visitor_id: Annotated[ 

117 StrictStr, 

118 Field( 

119 description='The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete.' 

120 ), 

121 ], 

122 _request_timeout: Union[ 

123 None, 

124 Annotated[StrictFloat, Field(gt=0)], 

125 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

126 ] = None, 

127 _request_auth: Optional[dict[StrictStr, Any]] = None, 

128 _content_type: Optional[StrictStr] = None, 

129 _headers: Optional[dict[StrictStr, Any]] = None, 

130 ) -> ApiResponse[None]: 

131 """Delete data by visitor ID 

132 

133 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 Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace). #### 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://docs.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 [`/v4/events` API](https://docs.fingerprint.com/reference/server-api-v4-get-event) with an `event_id` that was made outside of the 10 days, you will still receive a valid response. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. 

134 

135 :param visitor_id: The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) 

136 :type visitor_id: str 

137 :param _request_timeout: timeout setting for this request. If one 

138 number provided, it will be total request 

139 timeout. It can also be a pair (tuple) of 

140 (connection, read) timeouts. 

141 :type _request_timeout: int, tuple(int, int), optional 

142 :param _request_auth: set to override the auth_settings for an a single 

143 request; this effectively ignores the 

144 authentication in the spec for a single request. 

145 :type _request_auth: dict, optional 

146 :param _content_type: force content-type for the request. 

147 :type _content_type: str, Optional 

148 :param _headers: set to override the headers for a single 

149 request; this effectively ignores the headers 

150 in the spec for a single request. 

151 :type _headers: dict, optional 

152 :return: Returns the result object. 

153 """ # noqa: E501 

154 

155 _param = self._delete_visitor_data_serialize( 

156 visitor_id=visitor_id, 

157 _request_auth=_request_auth, 

158 _content_type=_content_type, 

159 _headers=_headers, 

160 ) 

161 

162 _response_types_map: dict[str, Optional[str]] = { 

163 '200': None, 

164 '400': 'ErrorResponse', 

165 '403': 'ErrorResponse', 

166 '404': 'ErrorResponse', 

167 '429': 'ErrorResponse', 

168 } 

169 

170 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

171 response_data.read() 

172 return self.api_client.response_deserialize( 

173 response_data=response_data, 

174 response_types_map=_response_types_map, 

175 ) 

176 

177 @validate_call 

178 def delete_visitor_data_without_preload_content( 

179 self, 

180 visitor_id: Annotated[ 

181 StrictStr, 

182 Field( 

183 description='The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete.' 

184 ), 

185 ], 

186 _request_timeout: Union[ 

187 None, 

188 Annotated[StrictFloat, Field(gt=0)], 

189 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

190 ] = None, 

191 _request_auth: Optional[dict[StrictStr, Any]] = None, 

192 _content_type: Optional[StrictStr] = None, 

193 _headers: Optional[dict[StrictStr, Any]] = None, 

194 ) -> RESTResponseType: 

195 """Delete data by visitor ID 

196 

197 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 Workspace](https://docs.fingerprint.com/docs/glossary#fingerprint-workspace). #### 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://docs.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 [`/v4/events` API](https://docs.fingerprint.com/reference/server-api-v4-get-event) with an `event_id` that was made outside of the 10 days, you will still receive a valid response. ### Interested? Please [contact our support team](https://fingerprint.com/support/) to enable it for you. Otherwise, you will receive a 403. 

198 

199 :param visitor_id: The [visitor ID](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) you want to delete. (required) 

200 :type visitor_id: str 

201 :param _request_timeout: timeout setting for this request. If one 

202 number provided, it will be total request 

203 timeout. It can also be a pair (tuple) of 

204 (connection, read) timeouts. 

205 :type _request_timeout: int, tuple(int, int), optional 

206 :param _request_auth: set to override the auth_settings for an a single 

207 request; this effectively ignores the 

208 authentication in the spec for a single request. 

209 :type _request_auth: dict, optional 

210 :param _content_type: force content-type for the request. 

211 :type _content_type: str, Optional 

212 :param _headers: set to override the headers for a single 

213 request; this effectively ignores the headers 

214 in the spec for a single request. 

215 :type _headers: dict, optional 

216 :return: Returns the result object. 

217 """ # noqa: E501 

218 

219 _param = self._delete_visitor_data_serialize( 

220 visitor_id=visitor_id, 

221 _request_auth=_request_auth, 

222 _content_type=_content_type, 

223 _headers=_headers, 

224 ) 

225 

226 _response_types_map: dict[str, Optional[str]] = { 

227 '200': None, 

228 '400': 'ErrorResponse', 

229 '403': 'ErrorResponse', 

230 '404': 'ErrorResponse', 

231 '429': 'ErrorResponse', 

232 } 

233 

234 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

235 return response_data.response 

236 

237 def _delete_visitor_data_serialize( 

238 self, 

239 visitor_id: str, 

240 _request_auth: Optional[dict[StrictStr, Any]], 

241 _content_type: Optional[StrictStr], 

242 _headers: Optional[dict[StrictStr, Any]], 

243 ) -> RequestSerialized: 

244 

245 _collection_formats: dict[str, str] = {} 

246 

247 _path_params: dict[str, str] = {} 

248 _query_params: list[tuple[str, ParamValue]] = [] 

249 _header_params: dict[str, Optional[str]] = _headers or {} 

250 _form_params: list[tuple[str, ParamValue]] = [] 

251 _files: dict[ 

252 str, 

253 Union[str, bytes, list[str], list[bytes], tuple[str, bytes], list[tuple[str, bytes]]], 

254 ] = {} 

255 _body_params: Optional[Any] = None 

256 

257 # process the path parameters 

258 if visitor_id is not None: 

259 _path_params['visitor_id'] = visitor_id 

260 

261 # set the HTTP header `Accept` 

262 if 'Accept' not in _header_params: 

263 _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) 

264 

265 # authentication setting 

266 _auth_settings: list[str] = ['bearerAuth'] 

267 

268 return self.api_client.param_serialize( 

269 method='DELETE', 

270 resource_path='/visitors/{visitor_id}', 

271 path_params=_path_params, 

272 query_params=_query_params, 

273 header_params=_header_params, 

274 body=_body_params, 

275 post_params=_form_params, 

276 files=_files, 

277 auth_settings=_auth_settings, 

278 collection_formats=_collection_formats, 

279 _request_auth=_request_auth, 

280 ) 

281 

282 @validate_call 

283 def get_event( 

284 self, 

285 event_id: Annotated[ 

286 StrictStr, 

287 Field( 

288 description='The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place).' 

289 ), 

290 ], 

291 ruleset_id: Annotated[ 

292 Optional[StrictStr], 

293 Field( 

294 description='The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. ' 

295 ), 

296 ] = None, 

297 _request_timeout: Union[ 

298 None, 

299 Annotated[StrictFloat, Field(gt=0)], 

300 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

301 ] = None, 

302 _request_auth: Optional[dict[StrictStr, Any]] = None, 

303 _content_type: Optional[StrictStr] = None, 

304 _headers: Optional[dict[StrictStr, Any]] = None, 

305 ) -> Event: 

306 """Get an event by event ID 

307 

308 Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. 

309 

310 :param event_id: The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) 

311 :type event_id: str 

312 :param ruleset_id: The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. 

313 :type ruleset_id: str 

314 :param _request_timeout: timeout setting for this request. If one 

315 number provided, it will be total request 

316 timeout. It can also be a pair (tuple) of 

317 (connection, read) timeouts. 

318 :type _request_timeout: int, tuple(int, int), optional 

319 :param _request_auth: set to override the auth_settings for an a single 

320 request; this effectively ignores the 

321 authentication in the spec for a single request. 

322 :type _request_auth: dict, optional 

323 :param _content_type: force content-type for the request. 

324 :type _content_type: str, Optional 

325 :param _headers: set to override the headers for a single 

326 request; this effectively ignores the headers 

327 in the spec for a single request. 

328 :type _headers: dict, optional 

329 :return: Returns the result object. 

330 """ # noqa: E501 

331 

332 _param = self._get_event_serialize( 

333 event_id=event_id, 

334 ruleset_id=ruleset_id, 

335 _request_auth=_request_auth, 

336 _content_type=_content_type, 

337 _headers=_headers, 

338 ) 

339 

340 _response_types_map: dict[str, Optional[str]] = { 

341 '200': 'Event', 

342 '400': 'ErrorResponse', 

343 '403': 'ErrorResponse', 

344 '404': 'ErrorResponse', 

345 '429': 'ErrorResponse', 

346 '500': 'ErrorResponse', 

347 } 

348 

349 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

350 response_data.read() 

351 return self.api_client.response_deserialize( 

352 response_data=response_data, 

353 response_types_map=_response_types_map, 

354 ).data 

355 

356 @validate_call 

357 def get_event_with_http_info( 

358 self, 

359 event_id: Annotated[ 

360 StrictStr, 

361 Field( 

362 description='The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place).' 

363 ), 

364 ], 

365 ruleset_id: Annotated[ 

366 Optional[StrictStr], 

367 Field( 

368 description='The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. ' 

369 ), 

370 ] = None, 

371 _request_timeout: Union[ 

372 None, 

373 Annotated[StrictFloat, Field(gt=0)], 

374 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

375 ] = None, 

376 _request_auth: Optional[dict[StrictStr, Any]] = None, 

377 _content_type: Optional[StrictStr] = None, 

378 _headers: Optional[dict[StrictStr, Any]] = None, 

379 ) -> ApiResponse[Event]: 

380 """Get an event by event ID 

381 

382 Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. 

383 

384 :param event_id: The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) 

385 :type event_id: str 

386 :param ruleset_id: The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. 

387 :type ruleset_id: str 

388 :param _request_timeout: timeout setting for this request. If one 

389 number provided, it will be total request 

390 timeout. It can also be a pair (tuple) of 

391 (connection, read) timeouts. 

392 :type _request_timeout: int, tuple(int, int), optional 

393 :param _request_auth: set to override the auth_settings for an a single 

394 request; this effectively ignores the 

395 authentication in the spec for a single request. 

396 :type _request_auth: dict, optional 

397 :param _content_type: force content-type for the request. 

398 :type _content_type: str, Optional 

399 :param _headers: set to override the headers for a single 

400 request; this effectively ignores the headers 

401 in the spec for a single request. 

402 :type _headers: dict, optional 

403 :return: Returns the result object. 

404 """ # noqa: E501 

405 

406 _param = self._get_event_serialize( 

407 event_id=event_id, 

408 ruleset_id=ruleset_id, 

409 _request_auth=_request_auth, 

410 _content_type=_content_type, 

411 _headers=_headers, 

412 ) 

413 

414 _response_types_map: dict[str, Optional[str]] = { 

415 '200': 'Event', 

416 '400': 'ErrorResponse', 

417 '403': 'ErrorResponse', 

418 '404': 'ErrorResponse', 

419 '429': 'ErrorResponse', 

420 '500': 'ErrorResponse', 

421 } 

422 

423 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

424 response_data.read() 

425 return self.api_client.response_deserialize( 

426 response_data=response_data, 

427 response_types_map=_response_types_map, 

428 ) 

429 

430 @validate_call 

431 def get_event_without_preload_content( 

432 self, 

433 event_id: Annotated[ 

434 StrictStr, 

435 Field( 

436 description='The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place).' 

437 ), 

438 ], 

439 ruleset_id: Annotated[ 

440 Optional[StrictStr], 

441 Field( 

442 description='The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. ' 

443 ), 

444 ] = None, 

445 _request_timeout: Union[ 

446 None, 

447 Annotated[StrictFloat, Field(gt=0)], 

448 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

449 ] = None, 

450 _request_auth: Optional[dict[StrictStr, Any]] = None, 

451 _content_type: Optional[StrictStr] = None, 

452 _headers: Optional[dict[StrictStr, Any]] = None, 

453 ) -> RESTResponseType: 

454 """Get an event by event ID 

455 

456 Get a detailed analysis of an individual identification event, including Smart Signals. Use `event_id` as the URL path parameter. This API method is scoped to a request, i.e. all returned information is by `event_id`. 

457 

458 :param event_id: The unique [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id) of each identification request (`requestId` can be used in its place). (required) 

459 :type event_id: str 

460 :param ruleset_id: The ID of the ruleset to evaluate against the event, producing the action to take for this event. The resulting action is returned in the `rule_action` attribute of the response. 

461 :type ruleset_id: str 

462 :param _request_timeout: timeout setting for this request. If one 

463 number provided, it will be total request 

464 timeout. It can also be a pair (tuple) of 

465 (connection, read) timeouts. 

466 :type _request_timeout: int, tuple(int, int), optional 

467 :param _request_auth: set to override the auth_settings for an a single 

468 request; this effectively ignores the 

469 authentication in the spec for a single request. 

470 :type _request_auth: dict, optional 

471 :param _content_type: force content-type for the request. 

472 :type _content_type: str, Optional 

473 :param _headers: set to override the headers for a single 

474 request; this effectively ignores the headers 

475 in the spec for a single request. 

476 :type _headers: dict, optional 

477 :return: Returns the result object. 

478 """ # noqa: E501 

479 

480 _param = self._get_event_serialize( 

481 event_id=event_id, 

482 ruleset_id=ruleset_id, 

483 _request_auth=_request_auth, 

484 _content_type=_content_type, 

485 _headers=_headers, 

486 ) 

487 

488 _response_types_map: dict[str, Optional[str]] = { 

489 '200': 'Event', 

490 '400': 'ErrorResponse', 

491 '403': 'ErrorResponse', 

492 '404': 'ErrorResponse', 

493 '429': 'ErrorResponse', 

494 '500': 'ErrorResponse', 

495 } 

496 

497 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

498 return response_data.response 

499 

500 def _get_event_serialize( 

501 self, 

502 event_id: str, 

503 ruleset_id: Optional[str], 

504 _request_auth: Optional[dict[StrictStr, Any]], 

505 _content_type: Optional[StrictStr], 

506 _headers: Optional[dict[StrictStr, Any]], 

507 ) -> RequestSerialized: 

508 

509 _collection_formats: dict[str, str] = {} 

510 

511 _path_params: dict[str, str] = {} 

512 _query_params: list[tuple[str, ParamValue]] = [] 

513 _header_params: dict[str, Optional[str]] = _headers or {} 

514 _form_params: list[tuple[str, ParamValue]] = [] 

515 _files: dict[ 

516 str, 

517 Union[str, bytes, list[str], list[bytes], tuple[str, bytes], list[tuple[str, bytes]]], 

518 ] = {} 

519 _body_params: Optional[Any] = None 

520 

521 # process the path parameters 

522 if event_id is not None: 

523 _path_params['event_id'] = event_id 

524 

525 # process the query parameters 

526 if ruleset_id is not None: 

527 _query_params.append(('ruleset_id', ruleset_id)) 

528 

529 # set the HTTP header `Accept` 

530 if 'Accept' not in _header_params: 

531 _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) 

532 

533 # authentication setting 

534 _auth_settings: list[str] = ['bearerAuth'] 

535 

536 return self.api_client.param_serialize( 

537 method='GET', 

538 resource_path='/events/{event_id}', 

539 path_params=_path_params, 

540 query_params=_query_params, 

541 header_params=_header_params, 

542 body=_body_params, 

543 post_params=_form_params, 

544 files=_files, 

545 auth_settings=_auth_settings, 

546 collection_formats=_collection_formats, 

547 _request_auth=_request_auth, 

548 ) 

549 

550 @validate_call 

551 def search_events( 

552 self, 

553 limit: Annotated[ 

554 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 

555 Field( 

556 description='Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. ' 

557 ), 

558 ] = None, 

559 pagination_key: Annotated[ 

560 Optional[StrictStr], 

561 Field( 

562 description='Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` ' 

563 ), 

564 ] = None, 

565 visitor_id: Annotated[ 

566 Optional[StrictStr], 

567 Field( 

568 description='Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). ' 

569 ), 

570 ] = None, 

571 high_recall_id: Annotated[ 

572 Optional[StrictStr], 

573 Field( 

574 description='The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). ' 

575 ), 

576 ] = None, 

577 bot: Annotated[ 

578 Optional[SearchEventsBot], 

579 Field( 

580 description='Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. ' 

581 ), 

582 ] = None, 

583 ip_address: Annotated[ 

584 Optional[StrictStr], 

585 Field( 

586 description='Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 ' 

587 ), 

588 ] = None, 

589 asn: Annotated[ 

590 Optional[StrictStr], 

591 Field( 

592 description="Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. " 

593 ), 

594 ] = None, 

595 linked_id: Annotated[ 

596 Optional[StrictStr], 

597 Field( 

598 description='Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. ' 

599 ), 

600 ] = None, 

601 url: Annotated[ 

602 Optional[StrictStr], 

603 Field( 

604 description='Filter events by the URL (`url` property) associated with the event. ' 

605 ), 

606 ] = None, 

607 bundle_id: Annotated[ 

608 Optional[StrictStr], 

609 Field(description='Filter events by the Bundle ID (iOS) associated with the event. '), 

610 ] = None, 

611 package_name: Annotated[ 

612 Optional[StrictStr], 

613 Field( 

614 description='Filter events by the Package Name (Android) associated with the event. ' 

615 ), 

616 ] = None, 

617 origin: Annotated[ 

618 Optional[StrictStr], 

619 Field( 

620 description='Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) ' 

621 ), 

622 ] = None, 

623 start: Annotated[ 

624 Optional[StrictInt], 

625 Field( 

626 description="Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. " 

627 ), 

628 ] = None, 

629 end: Annotated[ 

630 Optional[StrictInt], 

631 Field( 

632 description="Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. " 

633 ), 

634 ] = None, 

635 reverse: Annotated[ 

636 Optional[StrictBool], 

637 Field( 

638 description='When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). ' 

639 ), 

640 ] = None, 

641 suspect: Annotated[ 

642 Optional[StrictBool], 

643 Field( 

644 description='Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. ' 

645 ), 

646 ] = None, 

647 vpn: Annotated[ 

648 Optional[StrictBool], 

649 Field( 

650 description='Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

651 ), 

652 ] = None, 

653 virtual_machine: Annotated[ 

654 Optional[StrictBool], 

655 Field( 

656 description='Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. ' 

657 ), 

658 ] = None, 

659 tampering: Annotated[ 

660 Optional[StrictBool], 

661 Field( 

662 description='Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

663 ), 

664 ] = None, 

665 anti_detect_browser: Annotated[ 

666 Optional[StrictBool], 

667 Field( 

668 description='Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

669 ), 

670 ] = None, 

671 incognito: Annotated[ 

672 Optional[StrictBool], 

673 Field( 

674 description='Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. ' 

675 ), 

676 ] = None, 

677 privacy_settings: Annotated[ 

678 Optional[StrictBool], 

679 Field( 

680 description='Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. ' 

681 ), 

682 ] = None, 

683 jailbroken: Annotated[ 

684 Optional[StrictBool], 

685 Field( 

686 description='Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. ' 

687 ), 

688 ] = None, 

689 frida: Annotated[ 

690 Optional[StrictBool], 

691 Field( 

692 description='Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. ' 

693 ), 

694 ] = None, 

695 factory_reset: Annotated[ 

696 Optional[StrictBool], 

697 Field( 

698 description='Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. ' 

699 ), 

700 ] = None, 

701 cloned_app: Annotated[ 

702 Optional[StrictBool], 

703 Field( 

704 description='Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. ' 

705 ), 

706 ] = None, 

707 emulator: Annotated[ 

708 Optional[StrictBool], 

709 Field( 

710 description='Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. ' 

711 ), 

712 ] = None, 

713 root_apps: Annotated[ 

714 Optional[StrictBool], 

715 Field( 

716 description='Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. ' 

717 ), 

718 ] = None, 

719 vpn_confidence: Annotated[ 

720 Optional[SearchEventsVpnConfidence], 

721 Field( 

722 description='Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

723 ), 

724 ] = None, 

725 min_suspect_score: Annotated[ 

726 Optional[Union[StrictFloat, StrictInt]], 

727 Field( 

728 description='Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. ' 

729 ), 

730 ] = None, 

731 developer_tools: Annotated[ 

732 Optional[StrictBool], 

733 Field( 

734 description='Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. ' 

735 ), 

736 ] = None, 

737 location_spoofing: Annotated[ 

738 Optional[StrictBool], 

739 Field( 

740 description='Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. ' 

741 ), 

742 ] = None, 

743 mitm_attack: Annotated[ 

744 Optional[StrictBool], 

745 Field( 

746 description='Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. ' 

747 ), 

748 ] = None, 

749 rare_device: Annotated[ 

750 Optional[StrictBool], 

751 Field( 

752 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. ' 

753 ), 

754 ] = None, 

755 rare_device_percentile_bucket: Annotated[ 

756 Optional[SearchEventsRareDevicePercentileBucket], 

757 Field( 

758 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. ' 

759 ), 

760 ] = None, 

761 proxy: Annotated[ 

762 Optional[StrictBool], 

763 Field( 

764 description='Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. ' 

765 ), 

766 ] = None, 

767 sdk_version: Annotated[ 

768 Optional[StrictStr], 

769 Field( 

770 description='Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` ' 

771 ), 

772 ] = None, 

773 sdk_platform: Annotated[ 

774 Optional[SearchEventsSdkPlatform], 

775 Field( 

776 description='Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. ' 

777 ), 

778 ] = None, 

779 environment: Annotated[ 

780 Optional[list[StrictStr]], 

781 Field( 

782 description='Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. ' 

783 ), 

784 ] = None, 

785 proximity_id: Annotated[ 

786 Optional[StrictStr], 

787 Field( 

788 description='Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. ' 

789 ), 

790 ] = None, 

791 total_hits: Annotated[ 

792 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 

793 Field( 

794 description='When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. ' 

795 ), 

796 ] = None, 

797 tor_node: Annotated[ 

798 Optional[StrictBool], 

799 Field( 

800 description='Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. ' 

801 ), 

802 ] = None, 

803 incremental_identification_status: Annotated[ 

804 Optional[SearchEventsIncrementalIdentificationStatus], 

805 Field( 

806 description='Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. ' 

807 ), 

808 ] = None, 

809 simulator: Annotated[ 

810 Optional[StrictBool], 

811 Field( 

812 description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' 

813 ), 

814 ] = None, 

815 _request_timeout: Union[ 

816 None, 

817 Annotated[StrictFloat, Field(gt=0)], 

818 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

819 ] = None, 

820 _request_auth: Optional[dict[StrictStr, Any]] = None, 

821 _content_type: Optional[StrictStr] = None, 

822 _headers: Optional[dict[StrictStr, Any]] = None, 

823 ) -> EventSearch: 

824 """Search events 

825 

826 ## Search The `/v4/events` endpoint provides a convenient way to search for past events based on specific parameters. Typical use cases and queries include: - Searching for events associated with a single `visitor_id` within a time range to get historical behavior of a visitor. - Searching for events associated with a single `linked_id` within a time range to get all events associated with your internal account identifier. - Excluding all bot traffic from the query (`good` and `bad` bots) By default, the API searches events from the last 7 days, sorts them by newest first and returns the last 10 events. - Use `start` and `end` to specify the time range of the search. - Use `reverse=true` to sort the results oldest first. - Use `limit` to specify the number of events to return. - Use `pagination_key` to get the next page of results if there are more than `limit` events. ### Filtering events with the `suspect` flag The `/v4/events` endpoint unlocks a powerful method for fraud protection analytics. The `suspect` flag is exposed in all events where it was previously set by the update API. You can also apply the `suspect` query parameter as a filter to find all potentially fraudulent activity that you previously marked as `suspect`. This helps identify patterns of fraudulent behavior. ### Environment scoping If you use a secret key that is scoped to an environment, you will only get events associated with the same environment. With a workspace-scoped environment, you will get events from all environments. Smart Signals not activated for your workspace or are not included in the response. 

827 

828 :param limit: Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. 

829 :type limit: int 

830 :param pagination_key: Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` 

831 :type pagination_key: str 

832 :param visitor_id: Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). 

833 :type visitor_id: str 

834 :param high_recall_id: The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). 

835 :type high_recall_id: str 

836 :param bot: Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. 

837 :type bot: SearchEventsBot 

838 :param ip_address: Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 

839 :type ip_address: str 

840 :param asn: Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. 

841 :type asn: str 

842 :param linked_id: Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. 

843 :type linked_id: str 

844 :param url: Filter events by the URL (`url` property) associated with the event. 

845 :type url: str 

846 :param bundle_id: Filter events by the Bundle ID (iOS) associated with the event. 

847 :type bundle_id: str 

848 :param package_name: Filter events by the Package Name (Android) associated with the event. 

849 :type package_name: str 

850 :param origin: Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) 

851 :type origin: str 

852 :param start: Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. 

853 :type start: int 

854 :param end: Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. 

855 :type end: int 

856 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). 

857 :type reverse: bool 

858 :param suspect: Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. 

859 :type suspect: bool 

860 :param vpn: Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. 

861 :type vpn: bool 

862 :param virtual_machine: Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. 

863 :type virtual_machine: bool 

864 :param tampering: Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

865 :type tampering: bool 

866 :param anti_detect_browser: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

867 :type anti_detect_browser: bool 

868 :param incognito: Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. 

869 :type incognito: bool 

870 :param privacy_settings: Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. 

871 :type privacy_settings: bool 

872 :param jailbroken: Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. 

873 :type jailbroken: bool 

874 :param frida: Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. 

875 :type frida: bool 

876 :param factory_reset: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. 

877 :type factory_reset: bool 

878 :param cloned_app: Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. 

879 :type cloned_app: bool 

880 :param emulator: Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. 

881 :type emulator: bool 

882 :param root_apps: Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. 

883 :type root_apps: bool 

884 :param vpn_confidence: Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. 

885 :type vpn_confidence: SearchEventsVpnConfidence 

886 :param min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. 

887 :type min_suspect_score: float 

888 :param developer_tools: Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. 

889 :type developer_tools: bool 

890 :param location_spoofing: Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. 

891 :type location_spoofing: bool 

892 :param mitm_attack: Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. 

893 :type mitm_attack: bool 

894 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. 

895 :type rare_device: bool 

896 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. 

897 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

898 :param proxy: Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. 

899 :type proxy: bool 

900 :param sdk_version: Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` 

901 :type sdk_version: str 

902 :param sdk_platform: Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. 

903 :type sdk_platform: SearchEventsSdkPlatform 

904 :param environment: Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. 

905 :type environment: List[str] 

906 :param proximity_id: Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. 

907 :type proximity_id: str 

908 :param total_hits: When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. 

909 :type total_hits: int 

910 :param tor_node: Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. 

911 :type tor_node: bool 

912 :param incremental_identification_status: Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. 

913 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

914 :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. 

915 :type simulator: bool 

916 :param _request_timeout: timeout setting for this request. If one 

917 number provided, it will be total request 

918 timeout. It can also be a pair (tuple) of 

919 (connection, read) timeouts. 

920 :type _request_timeout: int, tuple(int, int), optional 

921 :param _request_auth: set to override the auth_settings for an a single 

922 request; this effectively ignores the 

923 authentication in the spec for a single request. 

924 :type _request_auth: dict, optional 

925 :param _content_type: force content-type for the request. 

926 :type _content_type: str, Optional 

927 :param _headers: set to override the headers for a single 

928 request; this effectively ignores the headers 

929 in the spec for a single request. 

930 :type _headers: dict, optional 

931 :return: Returns the result object. 

932 """ # noqa: E501 

933 

934 _param = self._search_events_serialize( 

935 limit=limit, 

936 pagination_key=pagination_key, 

937 visitor_id=visitor_id, 

938 high_recall_id=high_recall_id, 

939 bot=bot, 

940 ip_address=ip_address, 

941 asn=asn, 

942 linked_id=linked_id, 

943 url=url, 

944 bundle_id=bundle_id, 

945 package_name=package_name, 

946 origin=origin, 

947 start=start, 

948 end=end, 

949 reverse=reverse, 

950 suspect=suspect, 

951 vpn=vpn, 

952 virtual_machine=virtual_machine, 

953 tampering=tampering, 

954 anti_detect_browser=anti_detect_browser, 

955 incognito=incognito, 

956 privacy_settings=privacy_settings, 

957 jailbroken=jailbroken, 

958 frida=frida, 

959 factory_reset=factory_reset, 

960 cloned_app=cloned_app, 

961 emulator=emulator, 

962 root_apps=root_apps, 

963 vpn_confidence=vpn_confidence, 

964 min_suspect_score=min_suspect_score, 

965 developer_tools=developer_tools, 

966 location_spoofing=location_spoofing, 

967 mitm_attack=mitm_attack, 

968 rare_device=rare_device, 

969 rare_device_percentile_bucket=rare_device_percentile_bucket, 

970 proxy=proxy, 

971 sdk_version=sdk_version, 

972 sdk_platform=sdk_platform, 

973 environment=environment, 

974 proximity_id=proximity_id, 

975 total_hits=total_hits, 

976 tor_node=tor_node, 

977 incremental_identification_status=incremental_identification_status, 

978 simulator=simulator, 

979 _request_auth=_request_auth, 

980 _content_type=_content_type, 

981 _headers=_headers, 

982 ) 

983 

984 _response_types_map: dict[str, Optional[str]] = { 

985 '200': 'EventSearch', 

986 '400': 'ErrorResponse', 

987 '403': 'ErrorResponse', 

988 '500': 'ErrorResponse', 

989 } 

990 

991 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

992 response_data.read() 

993 return self.api_client.response_deserialize( 

994 response_data=response_data, 

995 response_types_map=_response_types_map, 

996 ).data 

997 

998 @validate_call 

999 def search_events_with_http_info( 

1000 self, 

1001 limit: Annotated[ 

1002 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 

1003 Field( 

1004 description='Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. ' 

1005 ), 

1006 ] = None, 

1007 pagination_key: Annotated[ 

1008 Optional[StrictStr], 

1009 Field( 

1010 description='Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` ' 

1011 ), 

1012 ] = None, 

1013 visitor_id: Annotated[ 

1014 Optional[StrictStr], 

1015 Field( 

1016 description='Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). ' 

1017 ), 

1018 ] = None, 

1019 high_recall_id: Annotated[ 

1020 Optional[StrictStr], 

1021 Field( 

1022 description='The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). ' 

1023 ), 

1024 ] = None, 

1025 bot: Annotated[ 

1026 Optional[SearchEventsBot], 

1027 Field( 

1028 description='Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. ' 

1029 ), 

1030 ] = None, 

1031 ip_address: Annotated[ 

1032 Optional[StrictStr], 

1033 Field( 

1034 description='Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 ' 

1035 ), 

1036 ] = None, 

1037 asn: Annotated[ 

1038 Optional[StrictStr], 

1039 Field( 

1040 description="Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. " 

1041 ), 

1042 ] = None, 

1043 linked_id: Annotated[ 

1044 Optional[StrictStr], 

1045 Field( 

1046 description='Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. ' 

1047 ), 

1048 ] = None, 

1049 url: Annotated[ 

1050 Optional[StrictStr], 

1051 Field( 

1052 description='Filter events by the URL (`url` property) associated with the event. ' 

1053 ), 

1054 ] = None, 

1055 bundle_id: Annotated[ 

1056 Optional[StrictStr], 

1057 Field(description='Filter events by the Bundle ID (iOS) associated with the event. '), 

1058 ] = None, 

1059 package_name: Annotated[ 

1060 Optional[StrictStr], 

1061 Field( 

1062 description='Filter events by the Package Name (Android) associated with the event. ' 

1063 ), 

1064 ] = None, 

1065 origin: Annotated[ 

1066 Optional[StrictStr], 

1067 Field( 

1068 description='Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) ' 

1069 ), 

1070 ] = None, 

1071 start: Annotated[ 

1072 Optional[StrictInt], 

1073 Field( 

1074 description="Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. " 

1075 ), 

1076 ] = None, 

1077 end: Annotated[ 

1078 Optional[StrictInt], 

1079 Field( 

1080 description="Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. " 

1081 ), 

1082 ] = None, 

1083 reverse: Annotated[ 

1084 Optional[StrictBool], 

1085 Field( 

1086 description='When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). ' 

1087 ), 

1088 ] = None, 

1089 suspect: Annotated[ 

1090 Optional[StrictBool], 

1091 Field( 

1092 description='Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. ' 

1093 ), 

1094 ] = None, 

1095 vpn: Annotated[ 

1096 Optional[StrictBool], 

1097 Field( 

1098 description='Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

1099 ), 

1100 ] = None, 

1101 virtual_machine: Annotated[ 

1102 Optional[StrictBool], 

1103 Field( 

1104 description='Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. ' 

1105 ), 

1106 ] = None, 

1107 tampering: Annotated[ 

1108 Optional[StrictBool], 

1109 Field( 

1110 description='Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

1111 ), 

1112 ] = None, 

1113 anti_detect_browser: Annotated[ 

1114 Optional[StrictBool], 

1115 Field( 

1116 description='Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

1117 ), 

1118 ] = None, 

1119 incognito: Annotated[ 

1120 Optional[StrictBool], 

1121 Field( 

1122 description='Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. ' 

1123 ), 

1124 ] = None, 

1125 privacy_settings: Annotated[ 

1126 Optional[StrictBool], 

1127 Field( 

1128 description='Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. ' 

1129 ), 

1130 ] = None, 

1131 jailbroken: Annotated[ 

1132 Optional[StrictBool], 

1133 Field( 

1134 description='Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. ' 

1135 ), 

1136 ] = None, 

1137 frida: Annotated[ 

1138 Optional[StrictBool], 

1139 Field( 

1140 description='Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. ' 

1141 ), 

1142 ] = None, 

1143 factory_reset: Annotated[ 

1144 Optional[StrictBool], 

1145 Field( 

1146 description='Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. ' 

1147 ), 

1148 ] = None, 

1149 cloned_app: Annotated[ 

1150 Optional[StrictBool], 

1151 Field( 

1152 description='Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. ' 

1153 ), 

1154 ] = None, 

1155 emulator: Annotated[ 

1156 Optional[StrictBool], 

1157 Field( 

1158 description='Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. ' 

1159 ), 

1160 ] = None, 

1161 root_apps: Annotated[ 

1162 Optional[StrictBool], 

1163 Field( 

1164 description='Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. ' 

1165 ), 

1166 ] = None, 

1167 vpn_confidence: Annotated[ 

1168 Optional[SearchEventsVpnConfidence], 

1169 Field( 

1170 description='Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

1171 ), 

1172 ] = None, 

1173 min_suspect_score: Annotated[ 

1174 Optional[Union[StrictFloat, StrictInt]], 

1175 Field( 

1176 description='Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. ' 

1177 ), 

1178 ] = None, 

1179 developer_tools: Annotated[ 

1180 Optional[StrictBool], 

1181 Field( 

1182 description='Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. ' 

1183 ), 

1184 ] = None, 

1185 location_spoofing: Annotated[ 

1186 Optional[StrictBool], 

1187 Field( 

1188 description='Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. ' 

1189 ), 

1190 ] = None, 

1191 mitm_attack: Annotated[ 

1192 Optional[StrictBool], 

1193 Field( 

1194 description='Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. ' 

1195 ), 

1196 ] = None, 

1197 rare_device: Annotated[ 

1198 Optional[StrictBool], 

1199 Field( 

1200 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. ' 

1201 ), 

1202 ] = None, 

1203 rare_device_percentile_bucket: Annotated[ 

1204 Optional[SearchEventsRareDevicePercentileBucket], 

1205 Field( 

1206 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. ' 

1207 ), 

1208 ] = None, 

1209 proxy: Annotated[ 

1210 Optional[StrictBool], 

1211 Field( 

1212 description='Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. ' 

1213 ), 

1214 ] = None, 

1215 sdk_version: Annotated[ 

1216 Optional[StrictStr], 

1217 Field( 

1218 description='Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` ' 

1219 ), 

1220 ] = None, 

1221 sdk_platform: Annotated[ 

1222 Optional[SearchEventsSdkPlatform], 

1223 Field( 

1224 description='Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. ' 

1225 ), 

1226 ] = None, 

1227 environment: Annotated[ 

1228 Optional[list[StrictStr]], 

1229 Field( 

1230 description='Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. ' 

1231 ), 

1232 ] = None, 

1233 proximity_id: Annotated[ 

1234 Optional[StrictStr], 

1235 Field( 

1236 description='Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. ' 

1237 ), 

1238 ] = None, 

1239 total_hits: Annotated[ 

1240 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 

1241 Field( 

1242 description='When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. ' 

1243 ), 

1244 ] = None, 

1245 tor_node: Annotated[ 

1246 Optional[StrictBool], 

1247 Field( 

1248 description='Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. ' 

1249 ), 

1250 ] = None, 

1251 incremental_identification_status: Annotated[ 

1252 Optional[SearchEventsIncrementalIdentificationStatus], 

1253 Field( 

1254 description='Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. ' 

1255 ), 

1256 ] = None, 

1257 simulator: Annotated[ 

1258 Optional[StrictBool], 

1259 Field( 

1260 description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' 

1261 ), 

1262 ] = None, 

1263 _request_timeout: Union[ 

1264 None, 

1265 Annotated[StrictFloat, Field(gt=0)], 

1266 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

1267 ] = None, 

1268 _request_auth: Optional[dict[StrictStr, Any]] = None, 

1269 _content_type: Optional[StrictStr] = None, 

1270 _headers: Optional[dict[StrictStr, Any]] = None, 

1271 ) -> ApiResponse[EventSearch]: 

1272 """Search events 

1273 

1274 ## Search The `/v4/events` endpoint provides a convenient way to search for past events based on specific parameters. Typical use cases and queries include: - Searching for events associated with a single `visitor_id` within a time range to get historical behavior of a visitor. - Searching for events associated with a single `linked_id` within a time range to get all events associated with your internal account identifier. - Excluding all bot traffic from the query (`good` and `bad` bots) By default, the API searches events from the last 7 days, sorts them by newest first and returns the last 10 events. - Use `start` and `end` to specify the time range of the search. - Use `reverse=true` to sort the results oldest first. - Use `limit` to specify the number of events to return. - Use `pagination_key` to get the next page of results if there are more than `limit` events. ### Filtering events with the `suspect` flag The `/v4/events` endpoint unlocks a powerful method for fraud protection analytics. The `suspect` flag is exposed in all events where it was previously set by the update API. You can also apply the `suspect` query parameter as a filter to find all potentially fraudulent activity that you previously marked as `suspect`. This helps identify patterns of fraudulent behavior. ### Environment scoping If you use a secret key that is scoped to an environment, you will only get events associated with the same environment. With a workspace-scoped environment, you will get events from all environments. Smart Signals not activated for your workspace or are not included in the response. 

1275 

1276 :param limit: Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. 

1277 :type limit: int 

1278 :param pagination_key: Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` 

1279 :type pagination_key: str 

1280 :param visitor_id: Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). 

1281 :type visitor_id: str 

1282 :param high_recall_id: The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). 

1283 :type high_recall_id: str 

1284 :param bot: Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. 

1285 :type bot: SearchEventsBot 

1286 :param ip_address: Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 

1287 :type ip_address: str 

1288 :param asn: Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. 

1289 :type asn: str 

1290 :param linked_id: Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. 

1291 :type linked_id: str 

1292 :param url: Filter events by the URL (`url` property) associated with the event. 

1293 :type url: str 

1294 :param bundle_id: Filter events by the Bundle ID (iOS) associated with the event. 

1295 :type bundle_id: str 

1296 :param package_name: Filter events by the Package Name (Android) associated with the event. 

1297 :type package_name: str 

1298 :param origin: Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) 

1299 :type origin: str 

1300 :param start: Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. 

1301 :type start: int 

1302 :param end: Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. 

1303 :type end: int 

1304 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). 

1305 :type reverse: bool 

1306 :param suspect: Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. 

1307 :type suspect: bool 

1308 :param vpn: Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. 

1309 :type vpn: bool 

1310 :param virtual_machine: Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. 

1311 :type virtual_machine: bool 

1312 :param tampering: Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

1313 :type tampering: bool 

1314 :param anti_detect_browser: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

1315 :type anti_detect_browser: bool 

1316 :param incognito: Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. 

1317 :type incognito: bool 

1318 :param privacy_settings: Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. 

1319 :type privacy_settings: bool 

1320 :param jailbroken: Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. 

1321 :type jailbroken: bool 

1322 :param frida: Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. 

1323 :type frida: bool 

1324 :param factory_reset: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. 

1325 :type factory_reset: bool 

1326 :param cloned_app: Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. 

1327 :type cloned_app: bool 

1328 :param emulator: Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. 

1329 :type emulator: bool 

1330 :param root_apps: Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. 

1331 :type root_apps: bool 

1332 :param vpn_confidence: Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. 

1333 :type vpn_confidence: SearchEventsVpnConfidence 

1334 :param min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. 

1335 :type min_suspect_score: float 

1336 :param developer_tools: Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. 

1337 :type developer_tools: bool 

1338 :param location_spoofing: Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. 

1339 :type location_spoofing: bool 

1340 :param mitm_attack: Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. 

1341 :type mitm_attack: bool 

1342 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. 

1343 :type rare_device: bool 

1344 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. 

1345 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

1346 :param proxy: Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. 

1347 :type proxy: bool 

1348 :param sdk_version: Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` 

1349 :type sdk_version: str 

1350 :param sdk_platform: Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. 

1351 :type sdk_platform: SearchEventsSdkPlatform 

1352 :param environment: Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. 

1353 :type environment: List[str] 

1354 :param proximity_id: Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. 

1355 :type proximity_id: str 

1356 :param total_hits: When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. 

1357 :type total_hits: int 

1358 :param tor_node: Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. 

1359 :type tor_node: bool 

1360 :param incremental_identification_status: Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. 

1361 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

1362 :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. 

1363 :type simulator: bool 

1364 :param _request_timeout: timeout setting for this request. If one 

1365 number provided, it will be total request 

1366 timeout. It can also be a pair (tuple) of 

1367 (connection, read) timeouts. 

1368 :type _request_timeout: int, tuple(int, int), optional 

1369 :param _request_auth: set to override the auth_settings for an a single 

1370 request; this effectively ignores the 

1371 authentication in the spec for a single request. 

1372 :type _request_auth: dict, optional 

1373 :param _content_type: force content-type for the request. 

1374 :type _content_type: str, Optional 

1375 :param _headers: set to override the headers for a single 

1376 request; this effectively ignores the headers 

1377 in the spec for a single request. 

1378 :type _headers: dict, optional 

1379 :return: Returns the result object. 

1380 """ # noqa: E501 

1381 

1382 _param = self._search_events_serialize( 

1383 limit=limit, 

1384 pagination_key=pagination_key, 

1385 visitor_id=visitor_id, 

1386 high_recall_id=high_recall_id, 

1387 bot=bot, 

1388 ip_address=ip_address, 

1389 asn=asn, 

1390 linked_id=linked_id, 

1391 url=url, 

1392 bundle_id=bundle_id, 

1393 package_name=package_name, 

1394 origin=origin, 

1395 start=start, 

1396 end=end, 

1397 reverse=reverse, 

1398 suspect=suspect, 

1399 vpn=vpn, 

1400 virtual_machine=virtual_machine, 

1401 tampering=tampering, 

1402 anti_detect_browser=anti_detect_browser, 

1403 incognito=incognito, 

1404 privacy_settings=privacy_settings, 

1405 jailbroken=jailbroken, 

1406 frida=frida, 

1407 factory_reset=factory_reset, 

1408 cloned_app=cloned_app, 

1409 emulator=emulator, 

1410 root_apps=root_apps, 

1411 vpn_confidence=vpn_confidence, 

1412 min_suspect_score=min_suspect_score, 

1413 developer_tools=developer_tools, 

1414 location_spoofing=location_spoofing, 

1415 mitm_attack=mitm_attack, 

1416 rare_device=rare_device, 

1417 rare_device_percentile_bucket=rare_device_percentile_bucket, 

1418 proxy=proxy, 

1419 sdk_version=sdk_version, 

1420 sdk_platform=sdk_platform, 

1421 environment=environment, 

1422 proximity_id=proximity_id, 

1423 total_hits=total_hits, 

1424 tor_node=tor_node, 

1425 incremental_identification_status=incremental_identification_status, 

1426 simulator=simulator, 

1427 _request_auth=_request_auth, 

1428 _content_type=_content_type, 

1429 _headers=_headers, 

1430 ) 

1431 

1432 _response_types_map: dict[str, Optional[str]] = { 

1433 '200': 'EventSearch', 

1434 '400': 'ErrorResponse', 

1435 '403': 'ErrorResponse', 

1436 '500': 'ErrorResponse', 

1437 } 

1438 

1439 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

1440 response_data.read() 

1441 return self.api_client.response_deserialize( 

1442 response_data=response_data, 

1443 response_types_map=_response_types_map, 

1444 ) 

1445 

1446 @validate_call 

1447 def search_events_without_preload_content( 

1448 self, 

1449 limit: Annotated[ 

1450 Optional[Annotated[int, Field(le=100, strict=True, ge=1)]], 

1451 Field( 

1452 description='Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. ' 

1453 ), 

1454 ] = None, 

1455 pagination_key: Annotated[ 

1456 Optional[StrictStr], 

1457 Field( 

1458 description='Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` ' 

1459 ), 

1460 ] = None, 

1461 visitor_id: Annotated[ 

1462 Optional[StrictStr], 

1463 Field( 

1464 description='Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). ' 

1465 ), 

1466 ] = None, 

1467 high_recall_id: Annotated[ 

1468 Optional[StrictStr], 

1469 Field( 

1470 description='The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). ' 

1471 ), 

1472 ] = None, 

1473 bot: Annotated[ 

1474 Optional[SearchEventsBot], 

1475 Field( 

1476 description='Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. ' 

1477 ), 

1478 ] = None, 

1479 ip_address: Annotated[ 

1480 Optional[StrictStr], 

1481 Field( 

1482 description='Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 ' 

1483 ), 

1484 ] = None, 

1485 asn: Annotated[ 

1486 Optional[StrictStr], 

1487 Field( 

1488 description="Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. " 

1489 ), 

1490 ] = None, 

1491 linked_id: Annotated[ 

1492 Optional[StrictStr], 

1493 Field( 

1494 description='Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. ' 

1495 ), 

1496 ] = None, 

1497 url: Annotated[ 

1498 Optional[StrictStr], 

1499 Field( 

1500 description='Filter events by the URL (`url` property) associated with the event. ' 

1501 ), 

1502 ] = None, 

1503 bundle_id: Annotated[ 

1504 Optional[StrictStr], 

1505 Field(description='Filter events by the Bundle ID (iOS) associated with the event. '), 

1506 ] = None, 

1507 package_name: Annotated[ 

1508 Optional[StrictStr], 

1509 Field( 

1510 description='Filter events by the Package Name (Android) associated with the event. ' 

1511 ), 

1512 ] = None, 

1513 origin: Annotated[ 

1514 Optional[StrictStr], 

1515 Field( 

1516 description='Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) ' 

1517 ), 

1518 ] = None, 

1519 start: Annotated[ 

1520 Optional[StrictInt], 

1521 Field( 

1522 description="Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. " 

1523 ), 

1524 ] = None, 

1525 end: Annotated[ 

1526 Optional[StrictInt], 

1527 Field( 

1528 description="Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. " 

1529 ), 

1530 ] = None, 

1531 reverse: Annotated[ 

1532 Optional[StrictBool], 

1533 Field( 

1534 description='When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). ' 

1535 ), 

1536 ] = None, 

1537 suspect: Annotated[ 

1538 Optional[StrictBool], 

1539 Field( 

1540 description='Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. ' 

1541 ), 

1542 ] = None, 

1543 vpn: Annotated[ 

1544 Optional[StrictBool], 

1545 Field( 

1546 description='Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

1547 ), 

1548 ] = None, 

1549 virtual_machine: Annotated[ 

1550 Optional[StrictBool], 

1551 Field( 

1552 description='Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. ' 

1553 ), 

1554 ] = None, 

1555 tampering: Annotated[ 

1556 Optional[StrictBool], 

1557 Field( 

1558 description='Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

1559 ), 

1560 ] = None, 

1561 anti_detect_browser: Annotated[ 

1562 Optional[StrictBool], 

1563 Field( 

1564 description='Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. ' 

1565 ), 

1566 ] = None, 

1567 incognito: Annotated[ 

1568 Optional[StrictBool], 

1569 Field( 

1570 description='Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. ' 

1571 ), 

1572 ] = None, 

1573 privacy_settings: Annotated[ 

1574 Optional[StrictBool], 

1575 Field( 

1576 description='Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. ' 

1577 ), 

1578 ] = None, 

1579 jailbroken: Annotated[ 

1580 Optional[StrictBool], 

1581 Field( 

1582 description='Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. ' 

1583 ), 

1584 ] = None, 

1585 frida: Annotated[ 

1586 Optional[StrictBool], 

1587 Field( 

1588 description='Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. ' 

1589 ), 

1590 ] = None, 

1591 factory_reset: Annotated[ 

1592 Optional[StrictBool], 

1593 Field( 

1594 description='Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. ' 

1595 ), 

1596 ] = None, 

1597 cloned_app: Annotated[ 

1598 Optional[StrictBool], 

1599 Field( 

1600 description='Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. ' 

1601 ), 

1602 ] = None, 

1603 emulator: Annotated[ 

1604 Optional[StrictBool], 

1605 Field( 

1606 description='Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. ' 

1607 ), 

1608 ] = None, 

1609 root_apps: Annotated[ 

1610 Optional[StrictBool], 

1611 Field( 

1612 description='Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. ' 

1613 ), 

1614 ] = None, 

1615 vpn_confidence: Annotated[ 

1616 Optional[SearchEventsVpnConfidence], 

1617 Field( 

1618 description='Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. ' 

1619 ), 

1620 ] = None, 

1621 min_suspect_score: Annotated[ 

1622 Optional[Union[StrictFloat, StrictInt]], 

1623 Field( 

1624 description='Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. ' 

1625 ), 

1626 ] = None, 

1627 developer_tools: Annotated[ 

1628 Optional[StrictBool], 

1629 Field( 

1630 description='Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. ' 

1631 ), 

1632 ] = None, 

1633 location_spoofing: Annotated[ 

1634 Optional[StrictBool], 

1635 Field( 

1636 description='Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. ' 

1637 ), 

1638 ] = None, 

1639 mitm_attack: Annotated[ 

1640 Optional[StrictBool], 

1641 Field( 

1642 description='Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. ' 

1643 ), 

1644 ] = None, 

1645 rare_device: Annotated[ 

1646 Optional[StrictBool], 

1647 Field( 

1648 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. ' 

1649 ), 

1650 ] = None, 

1651 rare_device_percentile_bucket: Annotated[ 

1652 Optional[SearchEventsRareDevicePercentileBucket], 

1653 Field( 

1654 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. ' 

1655 ), 

1656 ] = None, 

1657 proxy: Annotated[ 

1658 Optional[StrictBool], 

1659 Field( 

1660 description='Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. ' 

1661 ), 

1662 ] = None, 

1663 sdk_version: Annotated[ 

1664 Optional[StrictStr], 

1665 Field( 

1666 description='Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` ' 

1667 ), 

1668 ] = None, 

1669 sdk_platform: Annotated[ 

1670 Optional[SearchEventsSdkPlatform], 

1671 Field( 

1672 description='Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. ' 

1673 ), 

1674 ] = None, 

1675 environment: Annotated[ 

1676 Optional[list[StrictStr]], 

1677 Field( 

1678 description='Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. ' 

1679 ), 

1680 ] = None, 

1681 proximity_id: Annotated[ 

1682 Optional[StrictStr], 

1683 Field( 

1684 description='Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. ' 

1685 ), 

1686 ] = None, 

1687 total_hits: Annotated[ 

1688 Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], 

1689 Field( 

1690 description='When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. ' 

1691 ), 

1692 ] = None, 

1693 tor_node: Annotated[ 

1694 Optional[StrictBool], 

1695 Field( 

1696 description='Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. ' 

1697 ), 

1698 ] = None, 

1699 incremental_identification_status: Annotated[ 

1700 Optional[SearchEventsIncrementalIdentificationStatus], 

1701 Field( 

1702 description='Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. ' 

1703 ), 

1704 ] = None, 

1705 simulator: Annotated[ 

1706 Optional[StrictBool], 

1707 Field( 

1708 description='Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. ' 

1709 ), 

1710 ] = None, 

1711 _request_timeout: Union[ 

1712 None, 

1713 Annotated[StrictFloat, Field(gt=0)], 

1714 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

1715 ] = None, 

1716 _request_auth: Optional[dict[StrictStr, Any]] = None, 

1717 _content_type: Optional[StrictStr] = None, 

1718 _headers: Optional[dict[StrictStr, Any]] = None, 

1719 ) -> RESTResponseType: 

1720 """Search events 

1721 

1722 ## Search The `/v4/events` endpoint provides a convenient way to search for past events based on specific parameters. Typical use cases and queries include: - Searching for events associated with a single `visitor_id` within a time range to get historical behavior of a visitor. - Searching for events associated with a single `linked_id` within a time range to get all events associated with your internal account identifier. - Excluding all bot traffic from the query (`good` and `bad` bots) By default, the API searches events from the last 7 days, sorts them by newest first and returns the last 10 events. - Use `start` and `end` to specify the time range of the search. - Use `reverse=true` to sort the results oldest first. - Use `limit` to specify the number of events to return. - Use `pagination_key` to get the next page of results if there are more than `limit` events. ### Filtering events with the `suspect` flag The `/v4/events` endpoint unlocks a powerful method for fraud protection analytics. The `suspect` flag is exposed in all events where it was previously set by the update API. You can also apply the `suspect` query parameter as a filter to find all potentially fraudulent activity that you previously marked as `suspect`. This helps identify patterns of fraudulent behavior. ### Environment scoping If you use a secret key that is scoped to an environment, you will only get events associated with the same environment. With a workspace-scoped environment, you will get events from all environments. Smart Signals not activated for your workspace or are not included in the response. 

1723 

1724 :param limit: Maximum number of events to return. Results are selected from the time range (`start`, `end`), ordered by `reverse`, then truncated to provided `limit` size. So `reverse=true` returns the oldest N=`limit` events, otherwise the newest N=`limit` events. 

1725 :type limit: int 

1726 :param pagination_key: Use `pagination_key` to get the next page of results. When more results are available (e.g., you requested up to 100 results for your query using `limit`, but there are more than 100 events total matching your request), the `pagination_key` field is added to the response. The pagination key is an arbitrary string that should not be interpreted in any way and should be passed as-is. In the following request, use that value in the `pagination_key` parameter to get the next page of results: 1. First request, returning most recent 200 events: `GET api-base-url/events?limit=100` 2. Use `response.pagination_key` to get the next page of results: `GET api-base-url/events?limit=100&pagination_key=1740815825085` 

1727 :type pagination_key: str 

1728 :param visitor_id: Unique [visitor identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#visitor_id) issued by Fingerprint Identification and all active Smart Signals. Filter events by matching Visitor ID (`identification.visitor_id` property). 

1729 :type visitor_id: str 

1730 :param high_recall_id: The High Recall ID is a supplementary browser identifier designed for use cases that require wider coverage over precision. Compared to the standard visitor ID, the High Recall ID strives to match incoming browsers more generously (rather than precisely) with existing browsers and thus identifies fewer browsers as new. The High Recall ID is best suited for use cases that are sensitive to browsers being identified as new and where mismatched browsers are not detrimental. Filter events by matching High Recall ID (`supplementary_id_high_recall.visitor_id` property). 

1731 :type high_recall_id: str 

1732 :param bot: Filter events by the Bot Detection result, specifically: `all` - events where any kind of bot was detected. `good` - events where a good bot was detected. `bad` - events where a bad bot was detected. `none` - events where no bot was detected. > Note: When using this parameter, only events with the `bot` property set to a valid value are returned. Events without a `bot` Smart Signal result are left out of the response. 

1733 :type bot: SearchEventsBot 

1734 :param ip_address: Filter events by IP address or IP range (if CIDR notation is used). If CIDR notation is not used, a /32 for IPv4 or /128 for IPv6 is assumed. Examples of range based queries: 10.0.0.0/24, 192.168.0.1/32 

1735 :type ip_address: str 

1736 :param asn: Filter events by the ASN associated with the event's IP address. This corresponds to the `ip_info.(v4|v6).asn` property in the response. 

1737 :type asn: str 

1738 :param linked_id: Filter events by your custom identifier. You can use [linked Ids](https://docs.fingerprint.com/reference/js-agent-v4-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. 

1739 :type linked_id: str 

1740 :param url: Filter events by the URL (`url` property) associated with the event. 

1741 :type url: str 

1742 :param bundle_id: Filter events by the Bundle ID (iOS) associated with the event. 

1743 :type bundle_id: str 

1744 :param package_name: Filter events by the Package Name (Android) associated with the event. 

1745 :type package_name: str 

1746 :param origin: Filter events by the origin field of the event. This is applicable to web events only (e.g., https://example.com) 

1747 :type origin: str 

1748 :param start: Include events that happened after this point (with timestamp greater than or equal the provided `start` Unix milliseconds value). Defaults to 7 days ago. Setting `start` does not change `end`'s default of `now` — adjust it separately if needed. 

1749 :type start: int 

1750 :param end: Include events that happened before this point (with timestamp less than or equal the provided `end` Unix milliseconds value). Defaults to now. Setting `end` does not change `start`'s default of `7 days ago` — adjust it separately if needed. 

1751 :type end: int 

1752 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Default is newest first (descending timestamp order). 

1753 :type reverse: bool 

1754 :param suspect: Filter events previously tagged as suspicious via the [Update API](https://docs.fingerprint.com/reference/server-api-v4-update-event). > Note: When using this parameter, only events with the `suspect` property explicitly set to `true` or `false` are returned. Events with undefined `suspect` property are left out of the response. 

1755 :type suspect: bool 

1756 :param vpn: Filter events by VPN Detection result. > Note: When using this parameter, only events with the `vpn` property set to `true` or `false` are returned. Events without a `vpn` Smart Signal result are left out of the response. 

1757 :type vpn: bool 

1758 :param virtual_machine: Filter events by Virtual Machine Detection result. > Note: When using this parameter, only events with the `virtual_machine` property set to `true` or `false` are returned. Events without a `virtual_machine` Smart Signal result are left out of the response. 

1759 :type virtual_machine: bool 

1760 :param tampering: Filter events by Browser Tampering Detection result. > Note: When using this parameter, only events with the `tampering.result` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

1761 :type tampering: bool 

1762 :param anti_detect_browser: Filter events by Anti-detect Browser Detection result. > Note: When using this parameter, only events with the `tampering.anti_detect_browser` property set to `true` or `false` are returned. Events without a `tampering` Smart Signal result are left out of the response. 

1763 :type anti_detect_browser: bool 

1764 :param incognito: Filter events by Browser Incognito Detection result. > Note: When using this parameter, only events with the `incognito` property set to `true` or `false` are returned. Events without an `incognito` Smart Signal result are left out of the response. 

1765 :type incognito: bool 

1766 :param privacy_settings: Filter events by Privacy Settings Detection result. > Note: When using this parameter, only events with the `privacy_settings` property set to `true` or `false` are returned. Events without a `privacy_settings` Smart Signal result are left out of the response. 

1767 :type privacy_settings: bool 

1768 :param jailbroken: Filter events by Jailbroken Device Detection result. > Note: When using this parameter, only events with the `jailbroken` property set to `true` or `false` are returned. Events without a `jailbroken` Smart Signal result are left out of the response. 

1769 :type jailbroken: bool 

1770 :param frida: Filter events by Frida Detection result. > Note: When using this parameter, only events with the `frida` property set to `true` or `false` are returned. Events without a `frida` Smart Signal result are left out of the response. 

1771 :type frida: bool 

1772 :param factory_reset: Filter events by Factory Reset Detection result. > Note: When using this parameter, only events with a `factory_reset` time. Events without a `factory_reset` Smart Signal result are left out of the response. 

1773 :type factory_reset: bool 

1774 :param cloned_app: Filter events by Cloned App Detection result. > Note: When using this parameter, only events with the `cloned_app` property set to `true` or `false` are returned. Events without a `cloned_app` Smart Signal result are left out of the response. 

1775 :type cloned_app: bool 

1776 :param emulator: Filter events by Android Emulator Detection result. > Note: When using this parameter, only events with the `emulator` property set to `true` or `false` are returned. Events without an `emulator` Smart Signal result are left out of the response. 

1777 :type emulator: bool 

1778 :param root_apps: Filter events by Rooted Device Detection result. > Note: When using this parameter, only events with the `root_apps` property set to `true` or `false` are returned. Events without a `root_apps` Smart Signal result are left out of the response. 

1779 :type root_apps: bool 

1780 :param vpn_confidence: Filter events by VPN Detection result confidence level. `high` - events with high VPN Detection confidence. `medium` - events with medium VPN Detection confidence. `low` - events with low VPN Detection confidence. > Note: When using this parameter, only events with the `vpn.confidence` property set to a valid value are returned. Events without a `vpn` Smart Signal result are left out of the response. 

1781 :type vpn_confidence: SearchEventsVpnConfidence 

1782 :param min_suspect_score: Filter events with Suspect Score result above a provided minimum threshold. > Note: When using this parameter, only events where the `suspect_score` property set to a value exceeding your threshold are returned. Events without a `suspect_score` Smart Signal result are left out of the response. 

1783 :type min_suspect_score: float 

1784 :param developer_tools: Filter events by Developer Tools detection result. > Note: When using this parameter, only events with the `developer_tools` property set to `true` or `false` are returned. Events without a `developer_tools` Smart Signal result are left out of the response. 

1785 :type developer_tools: bool 

1786 :param location_spoofing: Filter events by Location Spoofing detection result. > Note: When using this parameter, only events with the `location_spoofing` property set to `true` or `false` are returned. Events without a `location_spoofing` Smart Signal result are left out of the response. 

1787 :type location_spoofing: bool 

1788 :param mitm_attack: Filter events by MITM (Man-in-the-Middle) Attack detection result. > Note: When using this parameter, only events with the `mitm_attack` property set to `true` or `false` are returned. Events without a `mitm_attack` Smart Signal result are left out of the response. 

1789 :type mitm_attack: bool 

1790 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. 

1791 :type rare_device: bool 

1792 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. 

1793 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

1794 :param proxy: Filter events by Proxy detection result. > Note: When using this parameter, only events with the `proxy` property set to `true` or `false` are returned. Events without a `proxy` Smart Signal result are left out of the response. 

1795 :type proxy: bool 

1796 :param sdk_version: Filter events by a specific SDK version associated with the identification event (`sdk.version` property). Example: `3.11.14` 

1797 :type sdk_version: str 

1798 :param sdk_platform: Filter events by the SDK Platform associated with the identification event (`sdk.platform` property) . `js` - Javascript agent (Web). `ios` - Apple iOS based devices. `android` - Android based devices. 

1799 :type sdk_platform: SearchEventsSdkPlatform 

1800 :param environment: Filter for events by providing one or more environment IDs (`environment_id` property). ### Array syntax To provide multiple environment IDs, use the repeated keys syntax (`environment=env1&environment=env2`). Other notations like comma-separated (`environment=env1,env2`) or bracket notation (`environment[]=env1&environment[]=env2`) are not supported. 

1801 :type environment: List[str] 

1802 :param proximity_id: Filter events by the most precise Proximity ID provided by default. > Note: When using this parameter, only events with the `proximity.id` property matching the provided ID are returned. Events without a `proximity` result are left out of the response. 

1803 :type proximity_id: str 

1804 :param total_hits: When set, the response will include a `total_hits` property with a count of total query matches across all pages, up to the specified limit. 

1805 :type total_hits: int 

1806 :param tor_node: Filter events by Tor Node detection result. > Note: When using this parameter, only events with the `tor_node` property set to `true` or `false` are returned. Events without a `tor_node` detection result are left out of the response. 

1807 :type tor_node: bool 

1808 :param incremental_identification_status: Filter events by their incremental identification status (`incremental_identification_status` property). Non incremental identification events are left out of the response. 

1809 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

1810 :param simulator: Filter events by iOS Simulator Detection result. > Note: When using this parameter, only events with the `simulator` property set to `true` or `false` are returned. Events without a `simulator` Smart Signal result are left out of the response. 

1811 :type simulator: bool 

1812 :param _request_timeout: timeout setting for this request. If one 

1813 number provided, it will be total request 

1814 timeout. It can also be a pair (tuple) of 

1815 (connection, read) timeouts. 

1816 :type _request_timeout: int, tuple(int, int), optional 

1817 :param _request_auth: set to override the auth_settings for an a single 

1818 request; this effectively ignores the 

1819 authentication in the spec for a single request. 

1820 :type _request_auth: dict, optional 

1821 :param _content_type: force content-type for the request. 

1822 :type _content_type: str, Optional 

1823 :param _headers: set to override the headers for a single 

1824 request; this effectively ignores the headers 

1825 in the spec for a single request. 

1826 :type _headers: dict, optional 

1827 :return: Returns the result object. 

1828 """ # noqa: E501 

1829 

1830 _param = self._search_events_serialize( 

1831 limit=limit, 

1832 pagination_key=pagination_key, 

1833 visitor_id=visitor_id, 

1834 high_recall_id=high_recall_id, 

1835 bot=bot, 

1836 ip_address=ip_address, 

1837 asn=asn, 

1838 linked_id=linked_id, 

1839 url=url, 

1840 bundle_id=bundle_id, 

1841 package_name=package_name, 

1842 origin=origin, 

1843 start=start, 

1844 end=end, 

1845 reverse=reverse, 

1846 suspect=suspect, 

1847 vpn=vpn, 

1848 virtual_machine=virtual_machine, 

1849 tampering=tampering, 

1850 anti_detect_browser=anti_detect_browser, 

1851 incognito=incognito, 

1852 privacy_settings=privacy_settings, 

1853 jailbroken=jailbroken, 

1854 frida=frida, 

1855 factory_reset=factory_reset, 

1856 cloned_app=cloned_app, 

1857 emulator=emulator, 

1858 root_apps=root_apps, 

1859 vpn_confidence=vpn_confidence, 

1860 min_suspect_score=min_suspect_score, 

1861 developer_tools=developer_tools, 

1862 location_spoofing=location_spoofing, 

1863 mitm_attack=mitm_attack, 

1864 rare_device=rare_device, 

1865 rare_device_percentile_bucket=rare_device_percentile_bucket, 

1866 proxy=proxy, 

1867 sdk_version=sdk_version, 

1868 sdk_platform=sdk_platform, 

1869 environment=environment, 

1870 proximity_id=proximity_id, 

1871 total_hits=total_hits, 

1872 tor_node=tor_node, 

1873 incremental_identification_status=incremental_identification_status, 

1874 simulator=simulator, 

1875 _request_auth=_request_auth, 

1876 _content_type=_content_type, 

1877 _headers=_headers, 

1878 ) 

1879 

1880 _response_types_map: dict[str, Optional[str]] = { 

1881 '200': 'EventSearch', 

1882 '400': 'ErrorResponse', 

1883 '403': 'ErrorResponse', 

1884 '500': 'ErrorResponse', 

1885 } 

1886 

1887 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

1888 return response_data.response 

1889 

1890 def _search_events_serialize( 

1891 self, 

1892 limit: Optional[int], 

1893 pagination_key: Optional[str], 

1894 visitor_id: Optional[str], 

1895 high_recall_id: Optional[str], 

1896 bot: Optional[SearchEventsBot], 

1897 ip_address: Optional[str], 

1898 asn: Optional[str], 

1899 linked_id: Optional[str], 

1900 url: Optional[str], 

1901 bundle_id: Optional[str], 

1902 package_name: Optional[str], 

1903 origin: Optional[str], 

1904 start: Optional[int], 

1905 end: Optional[int], 

1906 reverse: Optional[bool], 

1907 suspect: Optional[bool], 

1908 vpn: Optional[bool], 

1909 virtual_machine: Optional[bool], 

1910 tampering: Optional[bool], 

1911 anti_detect_browser: Optional[bool], 

1912 incognito: Optional[bool], 

1913 privacy_settings: Optional[bool], 

1914 jailbroken: Optional[bool], 

1915 frida: Optional[bool], 

1916 factory_reset: Optional[bool], 

1917 cloned_app: Optional[bool], 

1918 emulator: Optional[bool], 

1919 root_apps: Optional[bool], 

1920 vpn_confidence: Optional[SearchEventsVpnConfidence], 

1921 min_suspect_score: Optional[float], 

1922 developer_tools: Optional[bool], 

1923 location_spoofing: Optional[bool], 

1924 mitm_attack: Optional[bool], 

1925 rare_device: Optional[bool], 

1926 rare_device_percentile_bucket: Optional[SearchEventsRareDevicePercentileBucket], 

1927 proxy: Optional[bool], 

1928 sdk_version: Optional[str], 

1929 sdk_platform: Optional[SearchEventsSdkPlatform], 

1930 environment: Optional[list[str]], 

1931 proximity_id: Optional[str], 

1932 total_hits: Optional[int], 

1933 tor_node: Optional[bool], 

1934 incremental_identification_status: Optional[SearchEventsIncrementalIdentificationStatus], 

1935 simulator: Optional[bool], 

1936 _request_auth: Optional[dict[StrictStr, Any]], 

1937 _content_type: Optional[StrictStr], 

1938 _headers: Optional[dict[StrictStr, Any]], 

1939 ) -> RequestSerialized: 

1940 

1941 _collection_formats: dict[str, str] = { 

1942 'environment': 'multi', 

1943 } 

1944 

1945 _path_params: dict[str, str] = {} 

1946 _query_params: list[tuple[str, ParamValue]] = [] 

1947 _header_params: dict[str, Optional[str]] = _headers or {} 

1948 _form_params: list[tuple[str, ParamValue]] = [] 

1949 _files: dict[ 

1950 str, 

1951 Union[str, bytes, list[str], list[bytes], tuple[str, bytes], list[tuple[str, bytes]]], 

1952 ] = {} 

1953 _body_params: Optional[Any] = None 

1954 

1955 # process the query parameters 

1956 if limit is not None: 

1957 _query_params.append(('limit', limit)) 

1958 

1959 # process the query parameters 

1960 if pagination_key is not None: 

1961 _query_params.append(('pagination_key', pagination_key)) 

1962 

1963 # process the query parameters 

1964 if visitor_id is not None: 

1965 _query_params.append(('visitor_id', visitor_id)) 

1966 

1967 # process the query parameters 

1968 if high_recall_id is not None: 

1969 _query_params.append(('high_recall_id', high_recall_id)) 

1970 

1971 # process the query parameters 

1972 if bot is not None: 

1973 _query_params.append(('bot', bot.value)) 

1974 

1975 # process the query parameters 

1976 if ip_address is not None: 

1977 _query_params.append(('ip_address', ip_address)) 

1978 

1979 # process the query parameters 

1980 if asn is not None: 

1981 _query_params.append(('asn', asn)) 

1982 

1983 # process the query parameters 

1984 if linked_id is not None: 

1985 _query_params.append(('linked_id', linked_id)) 

1986 

1987 # process the query parameters 

1988 if url is not None: 

1989 _query_params.append(('url', url)) 

1990 

1991 # process the query parameters 

1992 if bundle_id is not None: 

1993 _query_params.append(('bundle_id', bundle_id)) 

1994 

1995 # process the query parameters 

1996 if package_name is not None: 

1997 _query_params.append(('package_name', package_name)) 

1998 

1999 # process the query parameters 

2000 if origin is not None: 

2001 _query_params.append(('origin', origin)) 

2002 

2003 # process the query parameters 

2004 if start is not None: 

2005 _query_params.append(('start', start)) 

2006 

2007 # process the query parameters 

2008 if end is not None: 

2009 _query_params.append(('end', end)) 

2010 

2011 # process the query parameters 

2012 if reverse is not None: 

2013 _query_params.append(('reverse', reverse)) 

2014 

2015 # process the query parameters 

2016 if suspect is not None: 

2017 _query_params.append(('suspect', suspect)) 

2018 

2019 # process the query parameters 

2020 if vpn is not None: 

2021 _query_params.append(('vpn', vpn)) 

2022 

2023 # process the query parameters 

2024 if virtual_machine is not None: 

2025 _query_params.append(('virtual_machine', virtual_machine)) 

2026 

2027 # process the query parameters 

2028 if tampering is not None: 

2029 _query_params.append(('tampering', tampering)) 

2030 

2031 # process the query parameters 

2032 if anti_detect_browser is not None: 

2033 _query_params.append(('anti_detect_browser', anti_detect_browser)) 

2034 

2035 # process the query parameters 

2036 if incognito is not None: 

2037 _query_params.append(('incognito', incognito)) 

2038 

2039 # process the query parameters 

2040 if privacy_settings is not None: 

2041 _query_params.append(('privacy_settings', privacy_settings)) 

2042 

2043 # process the query parameters 

2044 if jailbroken is not None: 

2045 _query_params.append(('jailbroken', jailbroken)) 

2046 

2047 # process the query parameters 

2048 if frida is not None: 

2049 _query_params.append(('frida', frida)) 

2050 

2051 # process the query parameters 

2052 if factory_reset is not None: 

2053 _query_params.append(('factory_reset', factory_reset)) 

2054 

2055 # process the query parameters 

2056 if cloned_app is not None: 

2057 _query_params.append(('cloned_app', cloned_app)) 

2058 

2059 # process the query parameters 

2060 if emulator is not None: 

2061 _query_params.append(('emulator', emulator)) 

2062 

2063 # process the query parameters 

2064 if root_apps is not None: 

2065 _query_params.append(('root_apps', root_apps)) 

2066 

2067 # process the query parameters 

2068 if vpn_confidence is not None: 

2069 _query_params.append(('vpn_confidence', vpn_confidence.value)) 

2070 

2071 # process the query parameters 

2072 if min_suspect_score is not None: 

2073 _query_params.append(('min_suspect_score', min_suspect_score)) 

2074 

2075 # process the query parameters 

2076 if developer_tools is not None: 

2077 _query_params.append(('developer_tools', developer_tools)) 

2078 

2079 # process the query parameters 

2080 if location_spoofing is not None: 

2081 _query_params.append(('location_spoofing', location_spoofing)) 

2082 

2083 # process the query parameters 

2084 if mitm_attack is not None: 

2085 _query_params.append(('mitm_attack', mitm_attack)) 

2086 

2087 # process the query parameters 

2088 if rare_device is not None: 

2089 _query_params.append(('rare_device', rare_device)) 

2090 

2091 # process the query parameters 

2092 if rare_device_percentile_bucket is not None: 

2093 _query_params.append( 

2094 ('rare_device_percentile_bucket', rare_device_percentile_bucket.value) 

2095 ) 

2096 

2097 # process the query parameters 

2098 if proxy is not None: 

2099 _query_params.append(('proxy', proxy)) 

2100 

2101 # process the query parameters 

2102 if sdk_version is not None: 

2103 _query_params.append(('sdk_version', sdk_version)) 

2104 

2105 # process the query parameters 

2106 if sdk_platform is not None: 

2107 _query_params.append(('sdk_platform', sdk_platform.value)) 

2108 

2109 # process the query parameters 

2110 if environment is not None: 

2111 _query_params.append(('environment', environment)) 

2112 

2113 # process the query parameters 

2114 if proximity_id is not None: 

2115 _query_params.append(('proximity_id', proximity_id)) 

2116 

2117 # process the query parameters 

2118 if total_hits is not None: 

2119 _query_params.append(('total_hits', total_hits)) 

2120 

2121 # process the query parameters 

2122 if tor_node is not None: 

2123 _query_params.append(('tor_node', tor_node)) 

2124 

2125 # process the query parameters 

2126 if incremental_identification_status is not None: 

2127 _query_params.append( 

2128 ('incremental_identification_status', incremental_identification_status.value) 

2129 ) 

2130 

2131 # process the query parameters 

2132 if simulator is not None: 

2133 _query_params.append(('simulator', simulator)) 

2134 

2135 # set the HTTP header `Accept` 

2136 if 'Accept' not in _header_params: 

2137 _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) 

2138 

2139 # authentication setting 

2140 _auth_settings: list[str] = ['bearerAuth'] 

2141 

2142 return self.api_client.param_serialize( 

2143 method='GET', 

2144 resource_path='/events', 

2145 path_params=_path_params, 

2146 query_params=_query_params, 

2147 header_params=_header_params, 

2148 body=_body_params, 

2149 post_params=_form_params, 

2150 files=_files, 

2151 auth_settings=_auth_settings, 

2152 collection_formats=_collection_formats, 

2153 _request_auth=_request_auth, 

2154 ) 

2155 

2156 @validate_call 

2157 def update_event( 

2158 self, 

2159 event_id: Annotated[ 

2160 StrictStr, 

2161 Field( 

2162 description='The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id).' 

2163 ), 

2164 ], 

2165 event_update: EventUpdate, 

2166 _request_timeout: Union[ 

2167 None, 

2168 Annotated[StrictFloat, Field(gt=0)], 

2169 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

2170 ] = None, 

2171 _request_auth: Optional[dict[StrictStr, Any]] = None, 

2172 _content_type: Optional[StrictStr] = None, 

2173 _headers: Optional[dict[StrictStr, Any]] = None, 

2174 ) -> None: 

2175 """Update an event 

2176 

2177 Change information in existing events specified by `event_id` or *flag suspicious events*. When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact. **Warning** It's not possible to update events older than one month. **Warning** Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request. 

2178 

2179 :param event_id: The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) 

2180 :type event_id: str 

2181 :param event_update: (required) 

2182 :type event_update: EventUpdate 

2183 :param _request_timeout: timeout setting for this request. If one 

2184 number provided, it will be total request 

2185 timeout. It can also be a pair (tuple) of 

2186 (connection, read) timeouts. 

2187 :type _request_timeout: int, tuple(int, int), optional 

2188 :param _request_auth: set to override the auth_settings for an a single 

2189 request; this effectively ignores the 

2190 authentication in the spec for a single request. 

2191 :type _request_auth: dict, optional 

2192 :param _content_type: force content-type for the request. 

2193 :type _content_type: str, Optional 

2194 :param _headers: set to override the headers for a single 

2195 request; this effectively ignores the headers 

2196 in the spec for a single request. 

2197 :type _headers: dict, optional 

2198 :return: Returns the result object. 

2199 """ # noqa: E501 

2200 

2201 _param = self._update_event_serialize( 

2202 event_id=event_id, 

2203 event_update=event_update, 

2204 _request_auth=_request_auth, 

2205 _content_type=_content_type, 

2206 _headers=_headers, 

2207 ) 

2208 

2209 _response_types_map: dict[str, Optional[str]] = { 

2210 '200': None, 

2211 '400': 'ErrorResponse', 

2212 '403': 'ErrorResponse', 

2213 '404': 'ErrorResponse', 

2214 '409': 'ErrorResponse', 

2215 } 

2216 

2217 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

2218 response_data.read() 

2219 self.api_client.response_deserialize( 

2220 response_data=response_data, 

2221 response_types_map=_response_types_map, 

2222 ) 

2223 

2224 @validate_call 

2225 def update_event_with_http_info( 

2226 self, 

2227 event_id: Annotated[ 

2228 StrictStr, 

2229 Field( 

2230 description='The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id).' 

2231 ), 

2232 ], 

2233 event_update: EventUpdate, 

2234 _request_timeout: Union[ 

2235 None, 

2236 Annotated[StrictFloat, Field(gt=0)], 

2237 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

2238 ] = None, 

2239 _request_auth: Optional[dict[StrictStr, Any]] = None, 

2240 _content_type: Optional[StrictStr] = None, 

2241 _headers: Optional[dict[StrictStr, Any]] = None, 

2242 ) -> ApiResponse[None]: 

2243 """Update an event 

2244 

2245 Change information in existing events specified by `event_id` or *flag suspicious events*. When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact. **Warning** It's not possible to update events older than one month. **Warning** Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request. 

2246 

2247 :param event_id: The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) 

2248 :type event_id: str 

2249 :param event_update: (required) 

2250 :type event_update: EventUpdate 

2251 :param _request_timeout: timeout setting for this request. If one 

2252 number provided, it will be total request 

2253 timeout. It can also be a pair (tuple) of 

2254 (connection, read) timeouts. 

2255 :type _request_timeout: int, tuple(int, int), optional 

2256 :param _request_auth: set to override the auth_settings for an a single 

2257 request; this effectively ignores the 

2258 authentication in the spec for a single request. 

2259 :type _request_auth: dict, optional 

2260 :param _content_type: force content-type for the request. 

2261 :type _content_type: str, Optional 

2262 :param _headers: set to override the headers for a single 

2263 request; this effectively ignores the headers 

2264 in the spec for a single request. 

2265 :type _headers: dict, optional 

2266 :return: Returns the result object. 

2267 """ # noqa: E501 

2268 

2269 _param = self._update_event_serialize( 

2270 event_id=event_id, 

2271 event_update=event_update, 

2272 _request_auth=_request_auth, 

2273 _content_type=_content_type, 

2274 _headers=_headers, 

2275 ) 

2276 

2277 _response_types_map: dict[str, Optional[str]] = { 

2278 '200': None, 

2279 '400': 'ErrorResponse', 

2280 '403': 'ErrorResponse', 

2281 '404': 'ErrorResponse', 

2282 '409': 'ErrorResponse', 

2283 } 

2284 

2285 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

2286 response_data.read() 

2287 return self.api_client.response_deserialize( 

2288 response_data=response_data, 

2289 response_types_map=_response_types_map, 

2290 ) 

2291 

2292 @validate_call 

2293 def update_event_without_preload_content( 

2294 self, 

2295 event_id: Annotated[ 

2296 StrictStr, 

2297 Field( 

2298 description='The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id).' 

2299 ), 

2300 ], 

2301 event_update: EventUpdate, 

2302 _request_timeout: Union[ 

2303 None, 

2304 Annotated[StrictFloat, Field(gt=0)], 

2305 tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], 

2306 ] = None, 

2307 _request_auth: Optional[dict[StrictStr, Any]] = None, 

2308 _content_type: Optional[StrictStr] = None, 

2309 _headers: Optional[dict[StrictStr, Any]] = None, 

2310 ) -> RESTResponseType: 

2311 """Update an event 

2312 

2313 Change information in existing events specified by `event_id` or *flag suspicious events*. When an event is created, it can be assigned `linked_id` and `tags` submitted through the JS agent parameters. This information might not have been available on the client initially, so the Server API permits updating these attributes after the fact. **Warning** It's not possible to update events older than one month. **Warning** Trying to update an event immediately after creation may temporarily result in an error (HTTP 409 Conflict. The event is not mutable yet.) as the event is fully propagated across our systems. In such a case, simply retry the request. 

2314 

2315 :param event_id: The unique event [identifier](https://docs.fingerprint.com/reference/js-agent-v4-get-function#event_id). (required) 

2316 :type event_id: str 

2317 :param event_update: (required) 

2318 :type event_update: EventUpdate 

2319 :param _request_timeout: timeout setting for this request. If one 

2320 number provided, it will be total request 

2321 timeout. It can also be a pair (tuple) of 

2322 (connection, read) timeouts. 

2323 :type _request_timeout: int, tuple(int, int), optional 

2324 :param _request_auth: set to override the auth_settings for an a single 

2325 request; this effectively ignores the 

2326 authentication in the spec for a single request. 

2327 :type _request_auth: dict, optional 

2328 :param _content_type: force content-type for the request. 

2329 :type _content_type: str, Optional 

2330 :param _headers: set to override the headers for a single 

2331 request; this effectively ignores the headers 

2332 in the spec for a single request. 

2333 :type _headers: dict, optional 

2334 :return: Returns the result object. 

2335 """ # noqa: E501 

2336 

2337 _param = self._update_event_serialize( 

2338 event_id=event_id, 

2339 event_update=event_update, 

2340 _request_auth=_request_auth, 

2341 _content_type=_content_type, 

2342 _headers=_headers, 

2343 ) 

2344 

2345 _response_types_map: dict[str, Optional[str]] = { 

2346 '200': None, 

2347 '400': 'ErrorResponse', 

2348 '403': 'ErrorResponse', 

2349 '404': 'ErrorResponse', 

2350 '409': 'ErrorResponse', 

2351 } 

2352 

2353 response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) 

2354 return response_data.response 

2355 

2356 def _update_event_serialize( 

2357 self, 

2358 event_id: str, 

2359 event_update: EventUpdate, 

2360 _request_auth: Optional[dict[StrictStr, Any]], 

2361 _content_type: Optional[StrictStr], 

2362 _headers: Optional[dict[StrictStr, Any]], 

2363 ) -> RequestSerialized: 

2364 

2365 _collection_formats: dict[str, str] = {} 

2366 

2367 _path_params: dict[str, str] = {} 

2368 _query_params: list[tuple[str, ParamValue]] = [] 

2369 _header_params: dict[str, Optional[str]] = _headers or {} 

2370 _form_params: list[tuple[str, ParamValue]] = [] 

2371 _files: dict[ 

2372 str, 

2373 Union[str, bytes, list[str], list[bytes], tuple[str, bytes], list[tuple[str, bytes]]], 

2374 ] = {} 

2375 _body_params: Optional[Any] = None 

2376 

2377 # process the path parameters 

2378 if event_id is not None: 

2379 _path_params['event_id'] = event_id 

2380 

2381 # process the body parameter 

2382 if event_update is not None: 

2383 _body_params = event_update 

2384 

2385 # set the HTTP header `Accept` 

2386 if 'Accept' not in _header_params: 

2387 _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) 

2388 

2389 # set the HTTP header `Content-Type` 

2390 if _content_type: 

2391 _header_params['Content-Type'] = _content_type 

2392 else: 

2393 _default_content_type = self.api_client.select_header_content_type( 

2394 ['application/json'] 

2395 ) 

2396 if _default_content_type is not None: 

2397 _header_params['Content-Type'] = _default_content_type 

2398 

2399 # authentication setting 

2400 _auth_settings: list[str] = ['bearerAuth'] 

2401 

2402 return self.api_client.param_serialize( 

2403 method='PATCH', 

2404 resource_path='/events/{event_id}', 

2405 path_params=_path_params, 

2406 query_params=_query_params, 

2407 header_params=_header_params, 

2408 body=_body_params, 

2409 post_params=_form_params, 

2410 files=_files, 

2411 auth_settings=_auth_settings, 

2412 collection_formats=_collection_formats, 

2413 _request_auth=_request_auth, 

2414 )