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

244 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-23 09:55 +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_sdk_platform import SearchEventsSdkPlatform 

28from fingerprint_server_sdk.models.search_events_vpn_confidence import SearchEventsVpnConfidence 

29from fingerprint_server_sdk.rest import RESTResponseType 

30 

31# Type alias for query and form parameter values 

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

33 

34 

35class FingerprintApi: 

36 """Fingerprint Python Server SDK 

37 

38 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. 

39 

40 :param configuration: API client configuration. 

41 """ 

42 

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

44 self.api_client = ApiClient(configuration) 

45 

46 @validate_call 

47 def delete_visitor_data( 

48 self, 

49 visitor_id: Annotated[ 

50 StrictStr, 

51 Field( 

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

53 ), 

54 ], 

55 _request_timeout: Union[ 

56 None, 

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

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

59 ] = None, 

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

61 _content_type: Optional[StrictStr] = None, 

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

63 ) -> None: 

64 """Delete data by visitor ID 

65 

66 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. 

67 

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

69 :type visitor_id: str 

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

71 number provided, it will be total request 

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

73 (connection, read) timeouts. 

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

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

76 request; this effectively ignores the 

77 authentication in the spec for a single request. 

78 :type _request_auth: dict, optional 

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

80 :type _content_type: str, Optional 

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

82 request; this effectively ignores the headers 

83 in the spec for a single request. 

84 :type _headers: dict, optional 

85 :return: Returns the result object. 

86 """ # noqa: E501 

87 

88 _param = self._delete_visitor_data_serialize( 

89 visitor_id=visitor_id, 

90 _request_auth=_request_auth, 

91 _content_type=_content_type, 

92 _headers=_headers, 

93 ) 

94 

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

96 '200': None, 

97 '400': 'ErrorResponse', 

98 '403': 'ErrorResponse', 

99 '404': 'ErrorResponse', 

100 '429': 'ErrorResponse', 

101 } 

102 

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

104 response_data.read() 

105 self.api_client.response_deserialize( 

106 response_data=response_data, 

107 response_types_map=_response_types_map, 

108 ) 

109 

110 @validate_call 

111 def delete_visitor_data_with_http_info( 

112 self, 

113 visitor_id: Annotated[ 

114 StrictStr, 

115 Field( 

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

117 ), 

118 ], 

119 _request_timeout: Union[ 

120 None, 

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

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

123 ] = None, 

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

125 _content_type: Optional[StrictStr] = None, 

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

127 ) -> ApiResponse[None]: 

128 """Delete data by visitor ID 

129 

130 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. 

131 

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

133 :type visitor_id: str 

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

135 number provided, it will be total request 

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

137 (connection, read) timeouts. 

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

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

140 request; this effectively ignores the 

141 authentication in the spec for a single request. 

142 :type _request_auth: dict, optional 

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

144 :type _content_type: str, Optional 

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

146 request; this effectively ignores the headers 

147 in the spec for a single request. 

148 :type _headers: dict, optional 

149 :return: Returns the result object. 

150 """ # noqa: E501 

151 

152 _param = self._delete_visitor_data_serialize( 

153 visitor_id=visitor_id, 

154 _request_auth=_request_auth, 

155 _content_type=_content_type, 

156 _headers=_headers, 

157 ) 

158 

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

160 '200': None, 

161 '400': 'ErrorResponse', 

162 '403': 'ErrorResponse', 

163 '404': 'ErrorResponse', 

164 '429': 'ErrorResponse', 

165 } 

166 

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

168 response_data.read() 

169 return self.api_client.response_deserialize( 

170 response_data=response_data, 

171 response_types_map=_response_types_map, 

172 ) 

173 

174 @validate_call 

175 def delete_visitor_data_without_preload_content( 

176 self, 

177 visitor_id: Annotated[ 

178 StrictStr, 

179 Field( 

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

181 ), 

182 ], 

183 _request_timeout: Union[ 

184 None, 

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

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

187 ] = None, 

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

189 _content_type: Optional[StrictStr] = None, 

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

191 ) -> RESTResponseType: 

192 """Delete data by visitor ID 

193 

194 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. 

195 

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

197 :type visitor_id: str 

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

199 number provided, it will be total request 

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

201 (connection, read) timeouts. 

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

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

204 request; this effectively ignores the 

205 authentication in the spec for a single request. 

206 :type _request_auth: dict, optional 

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

208 :type _content_type: str, Optional 

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

210 request; this effectively ignores the headers 

211 in the spec for a single request. 

212 :type _headers: dict, optional 

213 :return: Returns the result object. 

214 """ # noqa: E501 

215 

216 _param = self._delete_visitor_data_serialize( 

217 visitor_id=visitor_id, 

218 _request_auth=_request_auth, 

219 _content_type=_content_type, 

220 _headers=_headers, 

221 ) 

222 

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

224 '200': None, 

225 '400': 'ErrorResponse', 

226 '403': 'ErrorResponse', 

227 '404': 'ErrorResponse', 

228 '429': 'ErrorResponse', 

229 } 

230 

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

232 return response_data.response 

233 

234 def _delete_visitor_data_serialize( 

235 self, 

236 visitor_id: str, 

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

238 _content_type: Optional[StrictStr], 

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

240 ) -> RequestSerialized: 

241 

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

243 

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

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

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

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

248 _files: dict[ 

249 str, 

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

251 ] = {} 

252 _body_params: Optional[Any] = None 

253 

254 # process the path parameters 

255 if visitor_id is not None: 

256 _path_params['visitor_id'] = visitor_id 

257 

258 # set the HTTP header `Accept` 

259 if 'Accept' not in _header_params: 

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

261 

262 # authentication setting 

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

264 

265 return self.api_client.param_serialize( 

266 method='DELETE', 

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

268 path_params=_path_params, 

269 query_params=_query_params, 

270 header_params=_header_params, 

271 body=_body_params, 

272 post_params=_form_params, 

273 files=_files, 

274 auth_settings=_auth_settings, 

275 collection_formats=_collection_formats, 

276 _request_auth=_request_auth, 

277 ) 

278 

279 @validate_call 

280 def get_event( 

281 self, 

282 event_id: Annotated[ 

283 StrictStr, 

284 Field( 

285 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).' 

286 ), 

287 ], 

288 ruleset_id: Annotated[ 

289 Optional[StrictStr], 

290 Field( 

291 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. ' 

292 ), 

293 ] = None, 

294 _request_timeout: Union[ 

295 None, 

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

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

298 ] = None, 

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

300 _content_type: Optional[StrictStr] = None, 

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

302 ) -> Event: 

303 """Get an event by event ID 

304 

305 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`. 

306 

307 :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) 

308 :type event_id: str 

309 :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. 

310 :type ruleset_id: str 

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

312 number provided, it will be total request 

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

314 (connection, read) timeouts. 

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

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

317 request; this effectively ignores the 

318 authentication in the spec for a single request. 

319 :type _request_auth: dict, optional 

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

321 :type _content_type: str, Optional 

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

323 request; this effectively ignores the headers 

324 in the spec for a single request. 

325 :type _headers: dict, optional 

326 :return: Returns the result object. 

327 """ # noqa: E501 

328 

329 _param = self._get_event_serialize( 

330 event_id=event_id, 

331 ruleset_id=ruleset_id, 

332 _request_auth=_request_auth, 

333 _content_type=_content_type, 

334 _headers=_headers, 

335 ) 

336 

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

338 '200': 'Event', 

339 '400': 'ErrorResponse', 

340 '403': 'ErrorResponse', 

341 '404': 'ErrorResponse', 

342 '429': 'ErrorResponse', 

343 '500': 'ErrorResponse', 

344 } 

345 

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

347 response_data.read() 

348 return self.api_client.response_deserialize( 

349 response_data=response_data, 

350 response_types_map=_response_types_map, 

351 ).data 

352 

353 @validate_call 

354 def get_event_with_http_info( 

355 self, 

356 event_id: Annotated[ 

357 StrictStr, 

358 Field( 

359 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).' 

360 ), 

361 ], 

362 ruleset_id: Annotated[ 

363 Optional[StrictStr], 

364 Field( 

365 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. ' 

366 ), 

367 ] = None, 

368 _request_timeout: Union[ 

369 None, 

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

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

372 ] = None, 

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

374 _content_type: Optional[StrictStr] = None, 

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

376 ) -> ApiResponse[Event]: 

377 """Get an event by event ID 

378 

379 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`. 

380 

381 :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) 

382 :type event_id: str 

383 :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. 

384 :type ruleset_id: str 

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

386 number provided, it will be total request 

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

388 (connection, read) timeouts. 

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

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

391 request; this effectively ignores the 

392 authentication in the spec for a single request. 

393 :type _request_auth: dict, optional 

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

395 :type _content_type: str, Optional 

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

397 request; this effectively ignores the headers 

398 in the spec for a single request. 

399 :type _headers: dict, optional 

400 :return: Returns the result object. 

401 """ # noqa: E501 

402 

403 _param = self._get_event_serialize( 

404 event_id=event_id, 

405 ruleset_id=ruleset_id, 

406 _request_auth=_request_auth, 

407 _content_type=_content_type, 

408 _headers=_headers, 

409 ) 

410 

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

412 '200': 'Event', 

413 '400': 'ErrorResponse', 

414 '403': 'ErrorResponse', 

415 '404': 'ErrorResponse', 

416 '429': 'ErrorResponse', 

417 '500': 'ErrorResponse', 

418 } 

419 

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

421 response_data.read() 

422 return self.api_client.response_deserialize( 

423 response_data=response_data, 

424 response_types_map=_response_types_map, 

425 ) 

426 

427 @validate_call 

428 def get_event_without_preload_content( 

429 self, 

430 event_id: Annotated[ 

431 StrictStr, 

432 Field( 

433 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).' 

434 ), 

435 ], 

436 ruleset_id: Annotated[ 

437 Optional[StrictStr], 

438 Field( 

439 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. ' 

440 ), 

441 ] = None, 

442 _request_timeout: Union[ 

443 None, 

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

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

446 ] = None, 

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

448 _content_type: Optional[StrictStr] = None, 

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

450 ) -> RESTResponseType: 

451 """Get an event by event ID 

452 

453 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`. 

454 

455 :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) 

456 :type event_id: str 

457 :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. 

458 :type ruleset_id: str 

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

460 number provided, it will be total request 

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

462 (connection, read) timeouts. 

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

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

465 request; this effectively ignores the 

466 authentication in the spec for a single request. 

467 :type _request_auth: dict, optional 

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

469 :type _content_type: str, Optional 

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

471 request; this effectively ignores the headers 

472 in the spec for a single request. 

473 :type _headers: dict, optional 

474 :return: Returns the result object. 

475 """ # noqa: E501 

476 

477 _param = self._get_event_serialize( 

478 event_id=event_id, 

479 ruleset_id=ruleset_id, 

480 _request_auth=_request_auth, 

481 _content_type=_content_type, 

482 _headers=_headers, 

483 ) 

484 

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

486 '200': 'Event', 

487 '400': 'ErrorResponse', 

488 '403': 'ErrorResponse', 

489 '404': 'ErrorResponse', 

490 '429': 'ErrorResponse', 

491 '500': 'ErrorResponse', 

492 } 

493 

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

495 return response_data.response 

496 

497 def _get_event_serialize( 

498 self, 

499 event_id: str, 

500 ruleset_id: Optional[str], 

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

502 _content_type: Optional[StrictStr], 

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

504 ) -> RequestSerialized: 

505 

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

507 

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

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

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

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

512 _files: dict[ 

513 str, 

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

515 ] = {} 

516 _body_params: Optional[Any] = None 

517 

518 # process the path parameters 

519 if event_id is not None: 

520 _path_params['event_id'] = event_id 

521 

522 # process the query parameters 

523 if ruleset_id is not None: 

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

525 

526 # set the HTTP header `Accept` 

527 if 'Accept' not in _header_params: 

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

529 

530 # authentication setting 

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

532 

533 return self.api_client.param_serialize( 

534 method='GET', 

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

536 path_params=_path_params, 

537 query_params=_query_params, 

538 header_params=_header_params, 

539 body=_body_params, 

540 post_params=_form_params, 

541 files=_files, 

542 auth_settings=_auth_settings, 

543 collection_formats=_collection_formats, 

544 _request_auth=_request_auth, 

545 ) 

546 

547 @validate_call 

548 def search_events( 

549 self, 

550 limit: Annotated[ 

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

552 Field(description='Limit the number of events returned. '), 

553 ] = None, 

554 pagination_key: Annotated[ 

555 Optional[StrictStr], 

556 Field( 

557 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` ' 

558 ), 

559 ] = None, 

560 visitor_id: Annotated[ 

561 Optional[StrictStr], 

562 Field( 

563 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). ' 

564 ), 

565 ] = None, 

566 high_recall_id: Annotated[ 

567 Optional[StrictStr], 

568 Field( 

569 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). ' 

570 ), 

571 ] = None, 

572 bot: Annotated[ 

573 Optional[SearchEventsBot], 

574 Field( 

575 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. ' 

576 ), 

577 ] = None, 

578 ip_address: Annotated[ 

579 Optional[StrictStr], 

580 Field( 

581 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 ' 

582 ), 

583 ] = None, 

584 asn: Annotated[ 

585 Optional[StrictStr], 

586 Field( 

587 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. " 

588 ), 

589 ] = None, 

590 linked_id: Annotated[ 

591 Optional[StrictStr], 

592 Field( 

593 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. ' 

594 ), 

595 ] = None, 

596 url: Annotated[ 

597 Optional[StrictStr], 

598 Field( 

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

600 ), 

601 ] = None, 

602 bundle_id: Annotated[ 

603 Optional[StrictStr], 

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

605 ] = None, 

606 package_name: Annotated[ 

607 Optional[StrictStr], 

608 Field( 

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

610 ), 

611 ] = None, 

612 origin: Annotated[ 

613 Optional[StrictStr], 

614 Field( 

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

616 ), 

617 ] = None, 

618 start: Annotated[ 

619 Optional[StrictInt], 

620 Field( 

621 description='Filter events with a timestamp greater than the start time, in Unix time (milliseconds). ' 

622 ), 

623 ] = None, 

624 end: Annotated[ 

625 Optional[StrictInt], 

626 Field( 

627 description='Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). ' 

628 ), 

629 ] = None, 

630 reverse: Annotated[ 

631 Optional[StrictBool], Field(description='Sort events in reverse timestamp order. ') 

632 ] = None, 

633 suspect: Annotated[ 

634 Optional[StrictBool], 

635 Field( 

636 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. ' 

637 ), 

638 ] = None, 

639 vpn: Annotated[ 

640 Optional[StrictBool], 

641 Field( 

642 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. ' 

643 ), 

644 ] = None, 

645 virtual_machine: Annotated[ 

646 Optional[StrictBool], 

647 Field( 

648 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. ' 

649 ), 

650 ] = None, 

651 tampering: Annotated[ 

652 Optional[StrictBool], 

653 Field( 

654 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. ' 

655 ), 

656 ] = None, 

657 anti_detect_browser: Annotated[ 

658 Optional[StrictBool], 

659 Field( 

660 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. ' 

661 ), 

662 ] = None, 

663 incognito: Annotated[ 

664 Optional[StrictBool], 

665 Field( 

666 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. ' 

667 ), 

668 ] = None, 

669 privacy_settings: Annotated[ 

670 Optional[StrictBool], 

671 Field( 

672 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. ' 

673 ), 

674 ] = None, 

675 jailbroken: Annotated[ 

676 Optional[StrictBool], 

677 Field( 

678 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. ' 

679 ), 

680 ] = None, 

681 frida: Annotated[ 

682 Optional[StrictBool], 

683 Field( 

684 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. ' 

685 ), 

686 ] = None, 

687 factory_reset: Annotated[ 

688 Optional[StrictBool], 

689 Field( 

690 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. ' 

691 ), 

692 ] = None, 

693 cloned_app: Annotated[ 

694 Optional[StrictBool], 

695 Field( 

696 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. ' 

697 ), 

698 ] = None, 

699 emulator: Annotated[ 

700 Optional[StrictBool], 

701 Field( 

702 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. ' 

703 ), 

704 ] = None, 

705 root_apps: Annotated[ 

706 Optional[StrictBool], 

707 Field( 

708 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. ' 

709 ), 

710 ] = None, 

711 vpn_confidence: Annotated[ 

712 Optional[SearchEventsVpnConfidence], 

713 Field( 

714 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. ' 

715 ), 

716 ] = None, 

717 min_suspect_score: Annotated[ 

718 Optional[Union[StrictFloat, StrictInt]], 

719 Field( 

720 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. ' 

721 ), 

722 ] = None, 

723 developer_tools: Annotated[ 

724 Optional[StrictBool], 

725 Field( 

726 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. ' 

727 ), 

728 ] = None, 

729 location_spoofing: Annotated[ 

730 Optional[StrictBool], 

731 Field( 

732 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. ' 

733 ), 

734 ] = None, 

735 mitm_attack: Annotated[ 

736 Optional[StrictBool], 

737 Field( 

738 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. ' 

739 ), 

740 ] = None, 

741 proxy: Annotated[ 

742 Optional[StrictBool], 

743 Field( 

744 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. ' 

745 ), 

746 ] = None, 

747 sdk_version: Annotated[ 

748 Optional[StrictStr], 

749 Field( 

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

751 ), 

752 ] = None, 

753 sdk_platform: Annotated[ 

754 Optional[SearchEventsSdkPlatform], 

755 Field( 

756 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. ' 

757 ), 

758 ] = None, 

759 environment: Annotated[ 

760 Optional[list[StrictStr]], 

761 Field( 

762 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. ' 

763 ), 

764 ] = None, 

765 proximity_id: Annotated[ 

766 Optional[StrictStr], 

767 Field( 

768 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. ' 

769 ), 

770 ] = None, 

771 total_hits: Annotated[ 

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

773 Field( 

774 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. ' 

775 ), 

776 ] = None, 

777 tor_node: Annotated[ 

778 Optional[StrictBool], 

779 Field( 

780 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. ' 

781 ), 

782 ] = None, 

783 incremental_identification_status: Annotated[ 

784 Optional[SearchEventsIncrementalIdentificationStatus], 

785 Field( 

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

787 ), 

788 ] = None, 

789 simulator: Annotated[ 

790 Optional[StrictBool], 

791 Field( 

792 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. ' 

793 ), 

794 ] = None, 

795 _request_timeout: Union[ 

796 None, 

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

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

799 ] = None, 

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

801 _content_type: Optional[StrictStr] = None, 

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

803 ) -> EventSearch: 

804 """Search events 

805 

806 ## 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) If you don't provide `start` or `end` parameters, the default search range is the **last 7 days**. ### 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. 

807 

808 :param limit: Limit the number of events returned. 

809 :type limit: int 

810 :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` 

811 :type pagination_key: str 

812 :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). 

813 :type visitor_id: str 

814 :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). 

815 :type high_recall_id: str 

816 :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. 

817 :type bot: SearchEventsBot 

818 :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 

819 :type ip_address: str 

820 :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. 

821 :type asn: str 

822 :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. 

823 :type linked_id: str 

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

825 :type url: str 

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

827 :type bundle_id: str 

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

829 :type package_name: str 

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

831 :type origin: str 

832 :param start: Filter events with a timestamp greater than the start time, in Unix time (milliseconds). 

833 :type start: int 

834 :param end: Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). 

835 :type end: int 

836 :param reverse: Sort events in reverse timestamp order. 

837 :type reverse: bool 

838 :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. 

839 :type suspect: bool 

840 :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. 

841 :type vpn: bool 

842 :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. 

843 :type virtual_machine: bool 

844 :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. 

845 :type tampering: bool 

846 :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. 

847 :type anti_detect_browser: bool 

848 :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. 

849 :type incognito: bool 

850 :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. 

851 :type privacy_settings: bool 

852 :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. 

853 :type jailbroken: bool 

854 :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. 

855 :type frida: bool 

856 :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. 

857 :type factory_reset: bool 

858 :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. 

859 :type cloned_app: bool 

860 :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. 

861 :type emulator: bool 

862 :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. 

863 :type root_apps: bool 

864 :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. 

865 :type vpn_confidence: SearchEventsVpnConfidence 

866 :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. 

867 :type min_suspect_score: float 

868 :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. 

869 :type developer_tools: bool 

870 :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. 

871 :type location_spoofing: bool 

872 :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. 

873 :type mitm_attack: bool 

874 :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. 

875 :type proxy: bool 

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

877 :type sdk_version: str 

878 :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. 

879 :type sdk_platform: SearchEventsSdkPlatform 

880 :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. 

881 :type environment: List[str] 

882 :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. 

883 :type proximity_id: str 

884 :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. 

885 :type total_hits: int 

886 :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. 

887 :type tor_node: bool 

888 :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. 

889 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

890 :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. 

891 :type simulator: bool 

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

893 number provided, it will be total request 

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

895 (connection, read) timeouts. 

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

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

898 request; this effectively ignores the 

899 authentication in the spec for a single request. 

900 :type _request_auth: dict, optional 

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

902 :type _content_type: str, Optional 

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

904 request; this effectively ignores the headers 

905 in the spec for a single request. 

906 :type _headers: dict, optional 

907 :return: Returns the result object. 

908 """ # noqa: E501 

909 

910 _param = self._search_events_serialize( 

911 limit=limit, 

912 pagination_key=pagination_key, 

913 visitor_id=visitor_id, 

914 high_recall_id=high_recall_id, 

915 bot=bot, 

916 ip_address=ip_address, 

917 asn=asn, 

918 linked_id=linked_id, 

919 url=url, 

920 bundle_id=bundle_id, 

921 package_name=package_name, 

922 origin=origin, 

923 start=start, 

924 end=end, 

925 reverse=reverse, 

926 suspect=suspect, 

927 vpn=vpn, 

928 virtual_machine=virtual_machine, 

929 tampering=tampering, 

930 anti_detect_browser=anti_detect_browser, 

931 incognito=incognito, 

932 privacy_settings=privacy_settings, 

933 jailbroken=jailbroken, 

934 frida=frida, 

935 factory_reset=factory_reset, 

936 cloned_app=cloned_app, 

937 emulator=emulator, 

938 root_apps=root_apps, 

939 vpn_confidence=vpn_confidence, 

940 min_suspect_score=min_suspect_score, 

941 developer_tools=developer_tools, 

942 location_spoofing=location_spoofing, 

943 mitm_attack=mitm_attack, 

944 proxy=proxy, 

945 sdk_version=sdk_version, 

946 sdk_platform=sdk_platform, 

947 environment=environment, 

948 proximity_id=proximity_id, 

949 total_hits=total_hits, 

950 tor_node=tor_node, 

951 incremental_identification_status=incremental_identification_status, 

952 simulator=simulator, 

953 _request_auth=_request_auth, 

954 _content_type=_content_type, 

955 _headers=_headers, 

956 ) 

957 

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

959 '200': 'EventSearch', 

960 '400': 'ErrorResponse', 

961 '403': 'ErrorResponse', 

962 '500': 'ErrorResponse', 

963 } 

964 

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

966 response_data.read() 

967 return self.api_client.response_deserialize( 

968 response_data=response_data, 

969 response_types_map=_response_types_map, 

970 ).data 

971 

972 @validate_call 

973 def search_events_with_http_info( 

974 self, 

975 limit: Annotated[ 

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

977 Field(description='Limit the number of events returned. '), 

978 ] = None, 

979 pagination_key: Annotated[ 

980 Optional[StrictStr], 

981 Field( 

982 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` ' 

983 ), 

984 ] = None, 

985 visitor_id: Annotated[ 

986 Optional[StrictStr], 

987 Field( 

988 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). ' 

989 ), 

990 ] = None, 

991 high_recall_id: Annotated[ 

992 Optional[StrictStr], 

993 Field( 

994 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). ' 

995 ), 

996 ] = None, 

997 bot: Annotated[ 

998 Optional[SearchEventsBot], 

999 Field( 

1000 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. ' 

1001 ), 

1002 ] = None, 

1003 ip_address: Annotated[ 

1004 Optional[StrictStr], 

1005 Field( 

1006 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 ' 

1007 ), 

1008 ] = None, 

1009 asn: Annotated[ 

1010 Optional[StrictStr], 

1011 Field( 

1012 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. " 

1013 ), 

1014 ] = None, 

1015 linked_id: Annotated[ 

1016 Optional[StrictStr], 

1017 Field( 

1018 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. ' 

1019 ), 

1020 ] = None, 

1021 url: Annotated[ 

1022 Optional[StrictStr], 

1023 Field( 

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

1025 ), 

1026 ] = None, 

1027 bundle_id: Annotated[ 

1028 Optional[StrictStr], 

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

1030 ] = None, 

1031 package_name: Annotated[ 

1032 Optional[StrictStr], 

1033 Field( 

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

1035 ), 

1036 ] = None, 

1037 origin: Annotated[ 

1038 Optional[StrictStr], 

1039 Field( 

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

1041 ), 

1042 ] = None, 

1043 start: Annotated[ 

1044 Optional[StrictInt], 

1045 Field( 

1046 description='Filter events with a timestamp greater than the start time, in Unix time (milliseconds). ' 

1047 ), 

1048 ] = None, 

1049 end: Annotated[ 

1050 Optional[StrictInt], 

1051 Field( 

1052 description='Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). ' 

1053 ), 

1054 ] = None, 

1055 reverse: Annotated[ 

1056 Optional[StrictBool], Field(description='Sort events in reverse timestamp order. ') 

1057 ] = None, 

1058 suspect: Annotated[ 

1059 Optional[StrictBool], 

1060 Field( 

1061 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. ' 

1062 ), 

1063 ] = None, 

1064 vpn: Annotated[ 

1065 Optional[StrictBool], 

1066 Field( 

1067 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. ' 

1068 ), 

1069 ] = None, 

1070 virtual_machine: Annotated[ 

1071 Optional[StrictBool], 

1072 Field( 

1073 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. ' 

1074 ), 

1075 ] = None, 

1076 tampering: Annotated[ 

1077 Optional[StrictBool], 

1078 Field( 

1079 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. ' 

1080 ), 

1081 ] = None, 

1082 anti_detect_browser: Annotated[ 

1083 Optional[StrictBool], 

1084 Field( 

1085 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. ' 

1086 ), 

1087 ] = None, 

1088 incognito: Annotated[ 

1089 Optional[StrictBool], 

1090 Field( 

1091 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. ' 

1092 ), 

1093 ] = None, 

1094 privacy_settings: Annotated[ 

1095 Optional[StrictBool], 

1096 Field( 

1097 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. ' 

1098 ), 

1099 ] = None, 

1100 jailbroken: Annotated[ 

1101 Optional[StrictBool], 

1102 Field( 

1103 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. ' 

1104 ), 

1105 ] = None, 

1106 frida: Annotated[ 

1107 Optional[StrictBool], 

1108 Field( 

1109 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. ' 

1110 ), 

1111 ] = None, 

1112 factory_reset: Annotated[ 

1113 Optional[StrictBool], 

1114 Field( 

1115 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. ' 

1116 ), 

1117 ] = None, 

1118 cloned_app: Annotated[ 

1119 Optional[StrictBool], 

1120 Field( 

1121 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. ' 

1122 ), 

1123 ] = None, 

1124 emulator: Annotated[ 

1125 Optional[StrictBool], 

1126 Field( 

1127 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. ' 

1128 ), 

1129 ] = None, 

1130 root_apps: Annotated[ 

1131 Optional[StrictBool], 

1132 Field( 

1133 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. ' 

1134 ), 

1135 ] = None, 

1136 vpn_confidence: Annotated[ 

1137 Optional[SearchEventsVpnConfidence], 

1138 Field( 

1139 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. ' 

1140 ), 

1141 ] = None, 

1142 min_suspect_score: Annotated[ 

1143 Optional[Union[StrictFloat, StrictInt]], 

1144 Field( 

1145 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. ' 

1146 ), 

1147 ] = None, 

1148 developer_tools: Annotated[ 

1149 Optional[StrictBool], 

1150 Field( 

1151 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. ' 

1152 ), 

1153 ] = None, 

1154 location_spoofing: Annotated[ 

1155 Optional[StrictBool], 

1156 Field( 

1157 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. ' 

1158 ), 

1159 ] = None, 

1160 mitm_attack: Annotated[ 

1161 Optional[StrictBool], 

1162 Field( 

1163 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. ' 

1164 ), 

1165 ] = None, 

1166 proxy: Annotated[ 

1167 Optional[StrictBool], 

1168 Field( 

1169 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. ' 

1170 ), 

1171 ] = None, 

1172 sdk_version: Annotated[ 

1173 Optional[StrictStr], 

1174 Field( 

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

1176 ), 

1177 ] = None, 

1178 sdk_platform: Annotated[ 

1179 Optional[SearchEventsSdkPlatform], 

1180 Field( 

1181 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. ' 

1182 ), 

1183 ] = None, 

1184 environment: Annotated[ 

1185 Optional[list[StrictStr]], 

1186 Field( 

1187 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. ' 

1188 ), 

1189 ] = None, 

1190 proximity_id: Annotated[ 

1191 Optional[StrictStr], 

1192 Field( 

1193 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. ' 

1194 ), 

1195 ] = None, 

1196 total_hits: Annotated[ 

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

1198 Field( 

1199 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. ' 

1200 ), 

1201 ] = None, 

1202 tor_node: Annotated[ 

1203 Optional[StrictBool], 

1204 Field( 

1205 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. ' 

1206 ), 

1207 ] = None, 

1208 incremental_identification_status: Annotated[ 

1209 Optional[SearchEventsIncrementalIdentificationStatus], 

1210 Field( 

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

1212 ), 

1213 ] = None, 

1214 simulator: Annotated[ 

1215 Optional[StrictBool], 

1216 Field( 

1217 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. ' 

1218 ), 

1219 ] = None, 

1220 _request_timeout: Union[ 

1221 None, 

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

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

1224 ] = None, 

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

1226 _content_type: Optional[StrictStr] = None, 

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

1228 ) -> ApiResponse[EventSearch]: 

1229 """Search events 

1230 

1231 ## 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) If you don't provide `start` or `end` parameters, the default search range is the **last 7 days**. ### 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. 

1232 

1233 :param limit: Limit the number of events returned. 

1234 :type limit: int 

1235 :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` 

1236 :type pagination_key: str 

1237 :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). 

1238 :type visitor_id: str 

1239 :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). 

1240 :type high_recall_id: str 

1241 :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. 

1242 :type bot: SearchEventsBot 

1243 :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 

1244 :type ip_address: str 

1245 :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. 

1246 :type asn: str 

1247 :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. 

1248 :type linked_id: str 

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

1250 :type url: str 

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

1252 :type bundle_id: str 

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

1254 :type package_name: str 

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

1256 :type origin: str 

1257 :param start: Filter events with a timestamp greater than the start time, in Unix time (milliseconds). 

1258 :type start: int 

1259 :param end: Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). 

1260 :type end: int 

1261 :param reverse: Sort events in reverse timestamp order. 

1262 :type reverse: bool 

1263 :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. 

1264 :type suspect: bool 

1265 :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. 

1266 :type vpn: bool 

1267 :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. 

1268 :type virtual_machine: bool 

1269 :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. 

1270 :type tampering: bool 

1271 :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. 

1272 :type anti_detect_browser: bool 

1273 :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. 

1274 :type incognito: bool 

1275 :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. 

1276 :type privacy_settings: bool 

1277 :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. 

1278 :type jailbroken: bool 

1279 :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. 

1280 :type frida: bool 

1281 :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. 

1282 :type factory_reset: bool 

1283 :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. 

1284 :type cloned_app: bool 

1285 :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. 

1286 :type emulator: bool 

1287 :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. 

1288 :type root_apps: bool 

1289 :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. 

1290 :type vpn_confidence: SearchEventsVpnConfidence 

1291 :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. 

1292 :type min_suspect_score: float 

1293 :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. 

1294 :type developer_tools: bool 

1295 :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. 

1296 :type location_spoofing: bool 

1297 :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. 

1298 :type mitm_attack: bool 

1299 :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. 

1300 :type proxy: bool 

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

1302 :type sdk_version: str 

1303 :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. 

1304 :type sdk_platform: SearchEventsSdkPlatform 

1305 :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. 

1306 :type environment: List[str] 

1307 :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. 

1308 :type proximity_id: str 

1309 :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. 

1310 :type total_hits: int 

1311 :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. 

1312 :type tor_node: bool 

1313 :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. 

1314 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

1315 :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. 

1316 :type simulator: bool 

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

1318 number provided, it will be total request 

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

1320 (connection, read) timeouts. 

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

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

1323 request; this effectively ignores the 

1324 authentication in the spec for a single request. 

1325 :type _request_auth: dict, optional 

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

1327 :type _content_type: str, Optional 

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

1329 request; this effectively ignores the headers 

1330 in the spec for a single request. 

1331 :type _headers: dict, optional 

1332 :return: Returns the result object. 

1333 """ # noqa: E501 

1334 

1335 _param = self._search_events_serialize( 

1336 limit=limit, 

1337 pagination_key=pagination_key, 

1338 visitor_id=visitor_id, 

1339 high_recall_id=high_recall_id, 

1340 bot=bot, 

1341 ip_address=ip_address, 

1342 asn=asn, 

1343 linked_id=linked_id, 

1344 url=url, 

1345 bundle_id=bundle_id, 

1346 package_name=package_name, 

1347 origin=origin, 

1348 start=start, 

1349 end=end, 

1350 reverse=reverse, 

1351 suspect=suspect, 

1352 vpn=vpn, 

1353 virtual_machine=virtual_machine, 

1354 tampering=tampering, 

1355 anti_detect_browser=anti_detect_browser, 

1356 incognito=incognito, 

1357 privacy_settings=privacy_settings, 

1358 jailbroken=jailbroken, 

1359 frida=frida, 

1360 factory_reset=factory_reset, 

1361 cloned_app=cloned_app, 

1362 emulator=emulator, 

1363 root_apps=root_apps, 

1364 vpn_confidence=vpn_confidence, 

1365 min_suspect_score=min_suspect_score, 

1366 developer_tools=developer_tools, 

1367 location_spoofing=location_spoofing, 

1368 mitm_attack=mitm_attack, 

1369 proxy=proxy, 

1370 sdk_version=sdk_version, 

1371 sdk_platform=sdk_platform, 

1372 environment=environment, 

1373 proximity_id=proximity_id, 

1374 total_hits=total_hits, 

1375 tor_node=tor_node, 

1376 incremental_identification_status=incremental_identification_status, 

1377 simulator=simulator, 

1378 _request_auth=_request_auth, 

1379 _content_type=_content_type, 

1380 _headers=_headers, 

1381 ) 

1382 

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

1384 '200': 'EventSearch', 

1385 '400': 'ErrorResponse', 

1386 '403': 'ErrorResponse', 

1387 '500': 'ErrorResponse', 

1388 } 

1389 

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

1391 response_data.read() 

1392 return self.api_client.response_deserialize( 

1393 response_data=response_data, 

1394 response_types_map=_response_types_map, 

1395 ) 

1396 

1397 @validate_call 

1398 def search_events_without_preload_content( 

1399 self, 

1400 limit: Annotated[ 

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

1402 Field(description='Limit the number of events returned. '), 

1403 ] = None, 

1404 pagination_key: Annotated[ 

1405 Optional[StrictStr], 

1406 Field( 

1407 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` ' 

1408 ), 

1409 ] = None, 

1410 visitor_id: Annotated[ 

1411 Optional[StrictStr], 

1412 Field( 

1413 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). ' 

1414 ), 

1415 ] = None, 

1416 high_recall_id: Annotated[ 

1417 Optional[StrictStr], 

1418 Field( 

1419 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). ' 

1420 ), 

1421 ] = None, 

1422 bot: Annotated[ 

1423 Optional[SearchEventsBot], 

1424 Field( 

1425 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. ' 

1426 ), 

1427 ] = None, 

1428 ip_address: Annotated[ 

1429 Optional[StrictStr], 

1430 Field( 

1431 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 ' 

1432 ), 

1433 ] = None, 

1434 asn: Annotated[ 

1435 Optional[StrictStr], 

1436 Field( 

1437 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. " 

1438 ), 

1439 ] = None, 

1440 linked_id: Annotated[ 

1441 Optional[StrictStr], 

1442 Field( 

1443 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. ' 

1444 ), 

1445 ] = None, 

1446 url: Annotated[ 

1447 Optional[StrictStr], 

1448 Field( 

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

1450 ), 

1451 ] = None, 

1452 bundle_id: Annotated[ 

1453 Optional[StrictStr], 

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

1455 ] = None, 

1456 package_name: Annotated[ 

1457 Optional[StrictStr], 

1458 Field( 

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

1460 ), 

1461 ] = None, 

1462 origin: Annotated[ 

1463 Optional[StrictStr], 

1464 Field( 

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

1466 ), 

1467 ] = None, 

1468 start: Annotated[ 

1469 Optional[StrictInt], 

1470 Field( 

1471 description='Filter events with a timestamp greater than the start time, in Unix time (milliseconds). ' 

1472 ), 

1473 ] = None, 

1474 end: Annotated[ 

1475 Optional[StrictInt], 

1476 Field( 

1477 description='Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). ' 

1478 ), 

1479 ] = None, 

1480 reverse: Annotated[ 

1481 Optional[StrictBool], Field(description='Sort events in reverse timestamp order. ') 

1482 ] = None, 

1483 suspect: Annotated[ 

1484 Optional[StrictBool], 

1485 Field( 

1486 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. ' 

1487 ), 

1488 ] = None, 

1489 vpn: Annotated[ 

1490 Optional[StrictBool], 

1491 Field( 

1492 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. ' 

1493 ), 

1494 ] = None, 

1495 virtual_machine: Annotated[ 

1496 Optional[StrictBool], 

1497 Field( 

1498 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. ' 

1499 ), 

1500 ] = None, 

1501 tampering: Annotated[ 

1502 Optional[StrictBool], 

1503 Field( 

1504 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. ' 

1505 ), 

1506 ] = None, 

1507 anti_detect_browser: Annotated[ 

1508 Optional[StrictBool], 

1509 Field( 

1510 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. ' 

1511 ), 

1512 ] = None, 

1513 incognito: Annotated[ 

1514 Optional[StrictBool], 

1515 Field( 

1516 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. ' 

1517 ), 

1518 ] = None, 

1519 privacy_settings: Annotated[ 

1520 Optional[StrictBool], 

1521 Field( 

1522 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. ' 

1523 ), 

1524 ] = None, 

1525 jailbroken: Annotated[ 

1526 Optional[StrictBool], 

1527 Field( 

1528 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. ' 

1529 ), 

1530 ] = None, 

1531 frida: Annotated[ 

1532 Optional[StrictBool], 

1533 Field( 

1534 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. ' 

1535 ), 

1536 ] = None, 

1537 factory_reset: Annotated[ 

1538 Optional[StrictBool], 

1539 Field( 

1540 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. ' 

1541 ), 

1542 ] = None, 

1543 cloned_app: Annotated[ 

1544 Optional[StrictBool], 

1545 Field( 

1546 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. ' 

1547 ), 

1548 ] = None, 

1549 emulator: Annotated[ 

1550 Optional[StrictBool], 

1551 Field( 

1552 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. ' 

1553 ), 

1554 ] = None, 

1555 root_apps: Annotated[ 

1556 Optional[StrictBool], 

1557 Field( 

1558 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. ' 

1559 ), 

1560 ] = None, 

1561 vpn_confidence: Annotated[ 

1562 Optional[SearchEventsVpnConfidence], 

1563 Field( 

1564 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. ' 

1565 ), 

1566 ] = None, 

1567 min_suspect_score: Annotated[ 

1568 Optional[Union[StrictFloat, StrictInt]], 

1569 Field( 

1570 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. ' 

1571 ), 

1572 ] = None, 

1573 developer_tools: Annotated[ 

1574 Optional[StrictBool], 

1575 Field( 

1576 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. ' 

1577 ), 

1578 ] = None, 

1579 location_spoofing: Annotated[ 

1580 Optional[StrictBool], 

1581 Field( 

1582 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. ' 

1583 ), 

1584 ] = None, 

1585 mitm_attack: Annotated[ 

1586 Optional[StrictBool], 

1587 Field( 

1588 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. ' 

1589 ), 

1590 ] = None, 

1591 proxy: Annotated[ 

1592 Optional[StrictBool], 

1593 Field( 

1594 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. ' 

1595 ), 

1596 ] = None, 

1597 sdk_version: Annotated[ 

1598 Optional[StrictStr], 

1599 Field( 

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

1601 ), 

1602 ] = None, 

1603 sdk_platform: Annotated[ 

1604 Optional[SearchEventsSdkPlatform], 

1605 Field( 

1606 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. ' 

1607 ), 

1608 ] = None, 

1609 environment: Annotated[ 

1610 Optional[list[StrictStr]], 

1611 Field( 

1612 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. ' 

1613 ), 

1614 ] = None, 

1615 proximity_id: Annotated[ 

1616 Optional[StrictStr], 

1617 Field( 

1618 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. ' 

1619 ), 

1620 ] = None, 

1621 total_hits: Annotated[ 

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

1623 Field( 

1624 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. ' 

1625 ), 

1626 ] = None, 

1627 tor_node: Annotated[ 

1628 Optional[StrictBool], 

1629 Field( 

1630 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. ' 

1631 ), 

1632 ] = None, 

1633 incremental_identification_status: Annotated[ 

1634 Optional[SearchEventsIncrementalIdentificationStatus], 

1635 Field( 

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

1637 ), 

1638 ] = None, 

1639 simulator: Annotated[ 

1640 Optional[StrictBool], 

1641 Field( 

1642 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. ' 

1643 ), 

1644 ] = None, 

1645 _request_timeout: Union[ 

1646 None, 

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

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

1649 ] = None, 

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

1651 _content_type: Optional[StrictStr] = None, 

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

1653 ) -> RESTResponseType: 

1654 """Search events 

1655 

1656 ## 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) If you don't provide `start` or `end` parameters, the default search range is the **last 7 days**. ### 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. 

1657 

1658 :param limit: Limit the number of events returned. 

1659 :type limit: int 

1660 :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` 

1661 :type pagination_key: str 

1662 :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). 

1663 :type visitor_id: str 

1664 :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). 

1665 :type high_recall_id: str 

1666 :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. 

1667 :type bot: SearchEventsBot 

1668 :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 

1669 :type ip_address: str 

1670 :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. 

1671 :type asn: str 

1672 :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. 

1673 :type linked_id: str 

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

1675 :type url: str 

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

1677 :type bundle_id: str 

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

1679 :type package_name: str 

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

1681 :type origin: str 

1682 :param start: Filter events with a timestamp greater than the start time, in Unix time (milliseconds). 

1683 :type start: int 

1684 :param end: Filter events with a timestamp smaller than the end time, in Unix time (milliseconds). 

1685 :type end: int 

1686 :param reverse: Sort events in reverse timestamp order. 

1687 :type reverse: bool 

1688 :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. 

1689 :type suspect: bool 

1690 :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. 

1691 :type vpn: bool 

1692 :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. 

1693 :type virtual_machine: bool 

1694 :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. 

1695 :type tampering: bool 

1696 :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. 

1697 :type anti_detect_browser: bool 

1698 :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. 

1699 :type incognito: bool 

1700 :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. 

1701 :type privacy_settings: bool 

1702 :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. 

1703 :type jailbroken: bool 

1704 :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. 

1705 :type frida: bool 

1706 :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. 

1707 :type factory_reset: bool 

1708 :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. 

1709 :type cloned_app: bool 

1710 :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. 

1711 :type emulator: bool 

1712 :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. 

1713 :type root_apps: bool 

1714 :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. 

1715 :type vpn_confidence: SearchEventsVpnConfidence 

1716 :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. 

1717 :type min_suspect_score: float 

1718 :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. 

1719 :type developer_tools: bool 

1720 :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. 

1721 :type location_spoofing: bool 

1722 :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. 

1723 :type mitm_attack: bool 

1724 :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. 

1725 :type proxy: bool 

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

1727 :type sdk_version: str 

1728 :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. 

1729 :type sdk_platform: SearchEventsSdkPlatform 

1730 :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. 

1731 :type environment: List[str] 

1732 :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. 

1733 :type proximity_id: str 

1734 :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. 

1735 :type total_hits: int 

1736 :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. 

1737 :type tor_node: bool 

1738 :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. 

1739 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

1740 :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. 

1741 :type simulator: bool 

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

1743 number provided, it will be total request 

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

1745 (connection, read) timeouts. 

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

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

1748 request; this effectively ignores the 

1749 authentication in the spec for a single request. 

1750 :type _request_auth: dict, optional 

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

1752 :type _content_type: str, Optional 

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

1754 request; this effectively ignores the headers 

1755 in the spec for a single request. 

1756 :type _headers: dict, optional 

1757 :return: Returns the result object. 

1758 """ # noqa: E501 

1759 

1760 _param = self._search_events_serialize( 

1761 limit=limit, 

1762 pagination_key=pagination_key, 

1763 visitor_id=visitor_id, 

1764 high_recall_id=high_recall_id, 

1765 bot=bot, 

1766 ip_address=ip_address, 

1767 asn=asn, 

1768 linked_id=linked_id, 

1769 url=url, 

1770 bundle_id=bundle_id, 

1771 package_name=package_name, 

1772 origin=origin, 

1773 start=start, 

1774 end=end, 

1775 reverse=reverse, 

1776 suspect=suspect, 

1777 vpn=vpn, 

1778 virtual_machine=virtual_machine, 

1779 tampering=tampering, 

1780 anti_detect_browser=anti_detect_browser, 

1781 incognito=incognito, 

1782 privacy_settings=privacy_settings, 

1783 jailbroken=jailbroken, 

1784 frida=frida, 

1785 factory_reset=factory_reset, 

1786 cloned_app=cloned_app, 

1787 emulator=emulator, 

1788 root_apps=root_apps, 

1789 vpn_confidence=vpn_confidence, 

1790 min_suspect_score=min_suspect_score, 

1791 developer_tools=developer_tools, 

1792 location_spoofing=location_spoofing, 

1793 mitm_attack=mitm_attack, 

1794 proxy=proxy, 

1795 sdk_version=sdk_version, 

1796 sdk_platform=sdk_platform, 

1797 environment=environment, 

1798 proximity_id=proximity_id, 

1799 total_hits=total_hits, 

1800 tor_node=tor_node, 

1801 incremental_identification_status=incremental_identification_status, 

1802 simulator=simulator, 

1803 _request_auth=_request_auth, 

1804 _content_type=_content_type, 

1805 _headers=_headers, 

1806 ) 

1807 

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

1809 '200': 'EventSearch', 

1810 '400': 'ErrorResponse', 

1811 '403': 'ErrorResponse', 

1812 '500': 'ErrorResponse', 

1813 } 

1814 

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

1816 return response_data.response 

1817 

1818 def _search_events_serialize( 

1819 self, 

1820 limit: Optional[int], 

1821 pagination_key: Optional[str], 

1822 visitor_id: Optional[str], 

1823 high_recall_id: Optional[str], 

1824 bot: Optional[SearchEventsBot], 

1825 ip_address: Optional[str], 

1826 asn: Optional[str], 

1827 linked_id: Optional[str], 

1828 url: Optional[str], 

1829 bundle_id: Optional[str], 

1830 package_name: Optional[str], 

1831 origin: Optional[str], 

1832 start: Optional[int], 

1833 end: Optional[int], 

1834 reverse: Optional[bool], 

1835 suspect: Optional[bool], 

1836 vpn: Optional[bool], 

1837 virtual_machine: Optional[bool], 

1838 tampering: Optional[bool], 

1839 anti_detect_browser: Optional[bool], 

1840 incognito: Optional[bool], 

1841 privacy_settings: Optional[bool], 

1842 jailbroken: Optional[bool], 

1843 frida: Optional[bool], 

1844 factory_reset: Optional[bool], 

1845 cloned_app: Optional[bool], 

1846 emulator: Optional[bool], 

1847 root_apps: Optional[bool], 

1848 vpn_confidence: Optional[SearchEventsVpnConfidence], 

1849 min_suspect_score: Optional[float], 

1850 developer_tools: Optional[bool], 

1851 location_spoofing: Optional[bool], 

1852 mitm_attack: Optional[bool], 

1853 proxy: Optional[bool], 

1854 sdk_version: Optional[str], 

1855 sdk_platform: Optional[SearchEventsSdkPlatform], 

1856 environment: Optional[list[str]], 

1857 proximity_id: Optional[str], 

1858 total_hits: Optional[int], 

1859 tor_node: Optional[bool], 

1860 incremental_identification_status: Optional[SearchEventsIncrementalIdentificationStatus], 

1861 simulator: Optional[bool], 

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

1863 _content_type: Optional[StrictStr], 

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

1865 ) -> RequestSerialized: 

1866 

1867 _collection_formats: dict[str, str] = { 

1868 'environment': 'multi', 

1869 } 

1870 

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

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

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

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

1875 _files: dict[ 

1876 str, 

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

1878 ] = {} 

1879 _body_params: Optional[Any] = None 

1880 

1881 # process the query parameters 

1882 if limit is not None: 

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

1884 

1885 # process the query parameters 

1886 if pagination_key is not None: 

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

1888 

1889 # process the query parameters 

1890 if visitor_id is not None: 

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

1892 

1893 # process the query parameters 

1894 if high_recall_id is not None: 

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

1896 

1897 # process the query parameters 

1898 if bot is not None: 

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

1900 

1901 # process the query parameters 

1902 if ip_address is not None: 

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

1904 

1905 # process the query parameters 

1906 if asn is not None: 

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

1908 

1909 # process the query parameters 

1910 if linked_id is not None: 

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

1912 

1913 # process the query parameters 

1914 if url is not None: 

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

1916 

1917 # process the query parameters 

1918 if bundle_id is not None: 

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

1920 

1921 # process the query parameters 

1922 if package_name is not None: 

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

1924 

1925 # process the query parameters 

1926 if origin is not None: 

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

1928 

1929 # process the query parameters 

1930 if start is not None: 

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

1932 

1933 # process the query parameters 

1934 if end is not None: 

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

1936 

1937 # process the query parameters 

1938 if reverse is not None: 

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

1940 

1941 # process the query parameters 

1942 if suspect is not None: 

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

1944 

1945 # process the query parameters 

1946 if vpn is not None: 

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

1948 

1949 # process the query parameters 

1950 if virtual_machine is not None: 

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

1952 

1953 # process the query parameters 

1954 if tampering is not None: 

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

1956 

1957 # process the query parameters 

1958 if anti_detect_browser is not None: 

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

1960 

1961 # process the query parameters 

1962 if incognito is not None: 

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

1964 

1965 # process the query parameters 

1966 if privacy_settings is not None: 

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

1968 

1969 # process the query parameters 

1970 if jailbroken is not None: 

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

1972 

1973 # process the query parameters 

1974 if frida is not None: 

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

1976 

1977 # process the query parameters 

1978 if factory_reset is not None: 

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

1980 

1981 # process the query parameters 

1982 if cloned_app is not None: 

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

1984 

1985 # process the query parameters 

1986 if emulator is not None: 

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

1988 

1989 # process the query parameters 

1990 if root_apps is not None: 

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

1992 

1993 # process the query parameters 

1994 if vpn_confidence is not None: 

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

1996 

1997 # process the query parameters 

1998 if min_suspect_score is not None: 

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

2000 

2001 # process the query parameters 

2002 if developer_tools is not None: 

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

2004 

2005 # process the query parameters 

2006 if location_spoofing is not None: 

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

2008 

2009 # process the query parameters 

2010 if mitm_attack is not None: 

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

2012 

2013 # process the query parameters 

2014 if proxy is not None: 

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

2016 

2017 # process the query parameters 

2018 if sdk_version is not None: 

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

2020 

2021 # process the query parameters 

2022 if sdk_platform is not None: 

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

2024 

2025 # process the query parameters 

2026 if environment is not None: 

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

2028 

2029 # process the query parameters 

2030 if proximity_id is not None: 

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

2032 

2033 # process the query parameters 

2034 if total_hits is not None: 

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

2036 

2037 # process the query parameters 

2038 if tor_node is not None: 

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

2040 

2041 # process the query parameters 

2042 if incremental_identification_status is not None: 

2043 _query_params.append( 

2044 ('incremental_identification_status', incremental_identification_status.value) 

2045 ) 

2046 

2047 # process the query parameters 

2048 if simulator is not None: 

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

2050 

2051 # set the HTTP header `Accept` 

2052 if 'Accept' not in _header_params: 

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

2054 

2055 # authentication setting 

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

2057 

2058 return self.api_client.param_serialize( 

2059 method='GET', 

2060 resource_path='/events', 

2061 path_params=_path_params, 

2062 query_params=_query_params, 

2063 header_params=_header_params, 

2064 body=_body_params, 

2065 post_params=_form_params, 

2066 files=_files, 

2067 auth_settings=_auth_settings, 

2068 collection_formats=_collection_formats, 

2069 _request_auth=_request_auth, 

2070 ) 

2071 

2072 @validate_call 

2073 def update_event( 

2074 self, 

2075 event_id: Annotated[ 

2076 StrictStr, 

2077 Field( 

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

2079 ), 

2080 ], 

2081 event_update: EventUpdate, 

2082 _request_timeout: Union[ 

2083 None, 

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

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

2086 ] = None, 

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

2088 _content_type: Optional[StrictStr] = None, 

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

2090 ) -> None: 

2091 """Update an event 

2092 

2093 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. 

2094 

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

2096 :type event_id: str 

2097 :param event_update: (required) 

2098 :type event_update: EventUpdate 

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

2100 number provided, it will be total request 

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

2102 (connection, read) timeouts. 

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

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

2105 request; this effectively ignores the 

2106 authentication in the spec for a single request. 

2107 :type _request_auth: dict, optional 

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

2109 :type _content_type: str, Optional 

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

2111 request; this effectively ignores the headers 

2112 in the spec for a single request. 

2113 :type _headers: dict, optional 

2114 :return: Returns the result object. 

2115 """ # noqa: E501 

2116 

2117 _param = self._update_event_serialize( 

2118 event_id=event_id, 

2119 event_update=event_update, 

2120 _request_auth=_request_auth, 

2121 _content_type=_content_type, 

2122 _headers=_headers, 

2123 ) 

2124 

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

2126 '200': None, 

2127 '400': 'ErrorResponse', 

2128 '403': 'ErrorResponse', 

2129 '404': 'ErrorResponse', 

2130 '409': 'ErrorResponse', 

2131 } 

2132 

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

2134 response_data.read() 

2135 self.api_client.response_deserialize( 

2136 response_data=response_data, 

2137 response_types_map=_response_types_map, 

2138 ) 

2139 

2140 @validate_call 

2141 def update_event_with_http_info( 

2142 self, 

2143 event_id: Annotated[ 

2144 StrictStr, 

2145 Field( 

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

2147 ), 

2148 ], 

2149 event_update: EventUpdate, 

2150 _request_timeout: Union[ 

2151 None, 

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

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

2154 ] = None, 

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

2156 _content_type: Optional[StrictStr] = None, 

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

2158 ) -> ApiResponse[None]: 

2159 """Update an event 

2160 

2161 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. 

2162 

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

2164 :type event_id: str 

2165 :param event_update: (required) 

2166 :type event_update: EventUpdate 

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

2168 number provided, it will be total request 

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

2170 (connection, read) timeouts. 

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

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

2173 request; this effectively ignores the 

2174 authentication in the spec for a single request. 

2175 :type _request_auth: dict, optional 

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

2177 :type _content_type: str, Optional 

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

2179 request; this effectively ignores the headers 

2180 in the spec for a single request. 

2181 :type _headers: dict, optional 

2182 :return: Returns the result object. 

2183 """ # noqa: E501 

2184 

2185 _param = self._update_event_serialize( 

2186 event_id=event_id, 

2187 event_update=event_update, 

2188 _request_auth=_request_auth, 

2189 _content_type=_content_type, 

2190 _headers=_headers, 

2191 ) 

2192 

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

2194 '200': None, 

2195 '400': 'ErrorResponse', 

2196 '403': 'ErrorResponse', 

2197 '404': 'ErrorResponse', 

2198 '409': 'ErrorResponse', 

2199 } 

2200 

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

2202 response_data.read() 

2203 return self.api_client.response_deserialize( 

2204 response_data=response_data, 

2205 response_types_map=_response_types_map, 

2206 ) 

2207 

2208 @validate_call 

2209 def update_event_without_preload_content( 

2210 self, 

2211 event_id: Annotated[ 

2212 StrictStr, 

2213 Field( 

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

2215 ), 

2216 ], 

2217 event_update: EventUpdate, 

2218 _request_timeout: Union[ 

2219 None, 

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

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

2222 ] = None, 

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

2224 _content_type: Optional[StrictStr] = None, 

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

2226 ) -> RESTResponseType: 

2227 """Update an event 

2228 

2229 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. 

2230 

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

2232 :type event_id: str 

2233 :param event_update: (required) 

2234 :type event_update: EventUpdate 

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

2236 number provided, it will be total request 

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

2238 (connection, read) timeouts. 

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

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

2241 request; this effectively ignores the 

2242 authentication in the spec for a single request. 

2243 :type _request_auth: dict, optional 

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

2245 :type _content_type: str, Optional 

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

2247 request; this effectively ignores the headers 

2248 in the spec for a single request. 

2249 :type _headers: dict, optional 

2250 :return: Returns the result object. 

2251 """ # noqa: E501 

2252 

2253 _param = self._update_event_serialize( 

2254 event_id=event_id, 

2255 event_update=event_update, 

2256 _request_auth=_request_auth, 

2257 _content_type=_content_type, 

2258 _headers=_headers, 

2259 ) 

2260 

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

2262 '200': None, 

2263 '400': 'ErrorResponse', 

2264 '403': 'ErrorResponse', 

2265 '404': 'ErrorResponse', 

2266 '409': 'ErrorResponse', 

2267 } 

2268 

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

2270 return response_data.response 

2271 

2272 def _update_event_serialize( 

2273 self, 

2274 event_id: str, 

2275 event_update: EventUpdate, 

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

2277 _content_type: Optional[StrictStr], 

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

2279 ) -> RequestSerialized: 

2280 

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

2282 

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

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

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

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

2287 _files: dict[ 

2288 str, 

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

2290 ] = {} 

2291 _body_params: Optional[Any] = None 

2292 

2293 # process the path parameters 

2294 if event_id is not None: 

2295 _path_params['event_id'] = event_id 

2296 

2297 # process the body parameter 

2298 if event_update is not None: 

2299 _body_params = event_update 

2300 

2301 # set the HTTP header `Accept` 

2302 if 'Accept' not in _header_params: 

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

2304 

2305 # set the HTTP header `Content-Type` 

2306 if _content_type: 

2307 _header_params['Content-Type'] = _content_type 

2308 else: 

2309 _default_content_type = self.api_client.select_header_content_type( 

2310 ['application/json'] 

2311 ) 

2312 if _default_content_type is not None: 

2313 _header_params['Content-Type'] = _default_content_type 

2314 

2315 # authentication setting 

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

2317 

2318 return self.api_client.param_serialize( 

2319 method='PATCH', 

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

2321 path_params=_path_params, 

2322 query_params=_query_params, 

2323 header_params=_header_params, 

2324 body=_body_params, 

2325 post_params=_form_params, 

2326 files=_files, 

2327 auth_settings=_auth_settings, 

2328 collection_formats=_collection_formats, 

2329 _request_auth=_request_auth, 

2330 )