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

276 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-26 17:42 +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 datetime import date, datetime 

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

15 

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

17 

18from fingerprint_server_sdk.api_client import ApiClient, RequestSerialized 

19from fingerprint_server_sdk.api_response import ApiResponse 

20from fingerprint_server_sdk.configuration import Configuration 

21from fingerprint_server_sdk.models.bot_info_category import BotInfoCategory 

22from fingerprint_server_sdk.models.bot_info_confidence import BotInfoConfidence 

23from fingerprint_server_sdk.models.bot_info_identity import BotInfoIdentity 

24from fingerprint_server_sdk.models.event import Event 

25from fingerprint_server_sdk.models.event_search import EventSearch 

26from fingerprint_server_sdk.models.event_update import EventUpdate 

27from fingerprint_server_sdk.models.search_events_bot import SearchEventsBot 

28from fingerprint_server_sdk.models.search_events_bot_info import SearchEventsBotInfo 

29from fingerprint_server_sdk.models.search_events_end_parameter import SearchEventsEndParameter 

30from fingerprint_server_sdk.models.search_events_incremental_identification_status import ( 

31 SearchEventsIncrementalIdentificationStatus, 

32) 

33from fingerprint_server_sdk.models.search_events_rare_device_percentile_bucket import ( 

34 SearchEventsRareDevicePercentileBucket, 

35) 

36from fingerprint_server_sdk.models.search_events_sdk_platform import SearchEventsSdkPlatform 

37from fingerprint_server_sdk.models.search_events_start_parameter import SearchEventsStartParameter 

38from fingerprint_server_sdk.models.search_events_vpn_confidence import SearchEventsVpnConfidence 

39from fingerprint_server_sdk.rest import RESTResponseType 

40 

41# Type alias for query and form parameter values 

42ParamValue = Union[ 

43 list[BotInfoCategory], 

44 list[BotInfoIdentity], 

45 list[BotInfoConfidence], 

46 str, 

47 int, 

48 float, 

49 bool, 

50 list[str], 

51] 

52 

53 

54class FingerprintApi: 

55 """Fingerprint Python Server SDK 

56 

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

58 

59 :param configuration: API client configuration. 

60 """ 

61 

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

63 self.api_client = ApiClient(configuration) 

64 

65 @validate_call 

66 def delete_visitor_data( 

67 self, 

68 visitor_id: Annotated[ 

69 StrictStr, 

70 Field( 

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

72 ), 

73 ], 

74 _request_timeout: Union[ 

75 None, 

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

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

78 ] = None, 

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

80 _content_type: Optional[StrictStr] = None, 

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

82 ) -> None: 

83 """Delete a visitor ID 

84 

85 Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). 

86 

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

88 :type visitor_id: str 

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

90 number provided, it will be total request 

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

92 (connection, read) timeouts. 

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

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

95 request; this effectively ignores the 

96 authentication in the spec for a single request. 

97 :type _request_auth: dict, optional 

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

99 :type _content_type: str, Optional 

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

101 request; this effectively ignores the headers 

102 in the spec for a single request. 

103 :type _headers: dict, optional 

104 :return: Returns the result object. 

105 """ # noqa: E501 

106 

107 _param = self._delete_visitor_data_serialize( 

108 visitor_id=visitor_id, 

109 _request_auth=_request_auth, 

110 _content_type=_content_type, 

111 _headers=_headers, 

112 ) 

113 

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

115 '200': None, 

116 '400': 'ErrorResponse', 

117 '403': 'ErrorResponse', 

118 '404': 'ErrorResponse', 

119 '429': 'ErrorResponse', 

120 } 

121 

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

123 response_data.read() 

124 self.api_client.response_deserialize( 

125 response_data=response_data, 

126 response_types_map=_response_types_map, 

127 ) 

128 

129 @validate_call 

130 def delete_visitor_data_with_http_info( 

131 self, 

132 visitor_id: Annotated[ 

133 StrictStr, 

134 Field( 

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

136 ), 

137 ], 

138 _request_timeout: Union[ 

139 None, 

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

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

142 ] = None, 

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

144 _content_type: Optional[StrictStr] = None, 

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

146 ) -> ApiResponse[None]: 

147 """Delete a visitor ID 

148 

149 Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). 

150 

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

152 :type visitor_id: str 

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

154 number provided, it will be total request 

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

156 (connection, read) timeouts. 

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

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

159 request; this effectively ignores the 

160 authentication in the spec for a single request. 

161 :type _request_auth: dict, optional 

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

163 :type _content_type: str, Optional 

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

165 request; this effectively ignores the headers 

166 in the spec for a single request. 

167 :type _headers: dict, optional 

168 :return: Returns the result object. 

169 """ # noqa: E501 

170 

171 _param = self._delete_visitor_data_serialize( 

172 visitor_id=visitor_id, 

173 _request_auth=_request_auth, 

174 _content_type=_content_type, 

175 _headers=_headers, 

176 ) 

177 

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

179 '200': None, 

180 '400': 'ErrorResponse', 

181 '403': 'ErrorResponse', 

182 '404': 'ErrorResponse', 

183 '429': 'ErrorResponse', 

184 } 

185 

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

187 response_data.read() 

188 return self.api_client.response_deserialize( 

189 response_data=response_data, 

190 response_types_map=_response_types_map, 

191 ) 

192 

193 @validate_call 

194 def delete_visitor_data_without_preload_content( 

195 self, 

196 visitor_id: Annotated[ 

197 StrictStr, 

198 Field( 

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

200 ), 

201 ], 

202 _request_timeout: Union[ 

203 None, 

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

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

206 ] = None, 

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

208 _content_type: Optional[StrictStr] = None, 

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

210 ) -> RESTResponseType: 

211 """Delete a visitor ID 

212 

213 Use this API to request the deletion of all data associated with a specific visitor ID. Upon a request to delete data for a visitor ID, - The data collected from the corresponding browser (or device) will be deleted asynchronously, typically within a few minutes. This data will no longer be available to identify this browser (or device). When the same browser (or device) revisits, it will receive a new visitor ID. - The identification events made from this browser (or device) in the past 10 days are typically deleted within 24 hrs. - The identification events made from this browser (or device) outside of the 10 days will be purged as per your [data retention period](https://docs.fingerprint.com/docs/regions#data-retention). The following timeline illustrates which events are deleted and which remain after a DELETE API request: ``` Day 1: First visit from browser A. (Assigned visitor ID: VID1000) Day 2: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 13: Browser A revisits. (Assigned the same visitor ID: VID1000) Day 14: Delete VID1000 Day 15: Browser A re-visits. (Assigned a different visitor ID: VID9999) Day 15: GET /events/day-13 (Returns 404. The event is within the 10 days of deleting VID1000 and will have been deleted) Day 16: GET /events/day-2 (Returns 200. The event is outside of the 10 days of deleting VID1000 and is still available) ``` ### Availability This API is available only for Enterprise plans **upon request**. If you are interested, please [contact our support team](https://fingerprint.com/support/). ### Rate limits and daily quota The rate limits and daily quota for this API **differ** from those for our other API. The maximum number of DELETE requests that can be made in an hour cannot exceed 30 RPH, and the maximum number that can be made in a day cannot exceed 500 RPD. You can request an increase to these limits by contacting [our support team](https://fingerprint.com/support/). 

214 

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

216 :type visitor_id: str 

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

218 number provided, it will be total request 

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

220 (connection, read) timeouts. 

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

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

223 request; this effectively ignores the 

224 authentication in the spec for a single request. 

225 :type _request_auth: dict, optional 

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

227 :type _content_type: str, Optional 

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

229 request; this effectively ignores the headers 

230 in the spec for a single request. 

231 :type _headers: dict, optional 

232 :return: Returns the result object. 

233 """ # noqa: E501 

234 

235 _param = self._delete_visitor_data_serialize( 

236 visitor_id=visitor_id, 

237 _request_auth=_request_auth, 

238 _content_type=_content_type, 

239 _headers=_headers, 

240 ) 

241 

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

243 '200': None, 

244 '400': 'ErrorResponse', 

245 '403': 'ErrorResponse', 

246 '404': 'ErrorResponse', 

247 '429': 'ErrorResponse', 

248 } 

249 

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

251 return response_data.response 

252 

253 def _delete_visitor_data_serialize( 

254 self, 

255 visitor_id: str, 

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

257 _content_type: Optional[StrictStr], 

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

259 ) -> RequestSerialized: 

260 

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

262 

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

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

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

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

267 _files: dict[ 

268 str, 

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

270 ] = {} 

271 _body_params: Optional[Any] = None 

272 

273 # process the path parameters 

274 if visitor_id is not None: 

275 _path_params['visitor_id'] = visitor_id 

276 

277 # set the HTTP header `Accept` 

278 if 'Accept' not in _header_params: 

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

280 

281 # authentication setting 

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

283 

284 return self.api_client.param_serialize( 

285 method='DELETE', 

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

287 path_params=_path_params, 

288 query_params=_query_params, 

289 header_params=_header_params, 

290 body=_body_params, 

291 post_params=_form_params, 

292 files=_files, 

293 auth_settings=_auth_settings, 

294 collection_formats=_collection_formats, 

295 _request_auth=_request_auth, 

296 ) 

297 

298 @validate_call 

299 def get_event( 

300 self, 

301 event_id: Annotated[ 

302 StrictStr, 

303 Field( 

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

305 ), 

306 ], 

307 ruleset_id: Annotated[ 

308 Optional[StrictStr], 

309 Field( 

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

311 ), 

312 ] = None, 

313 _request_timeout: Union[ 

314 None, 

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

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

317 ] = None, 

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

319 _content_type: Optional[StrictStr] = None, 

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

321 ) -> Event: 

322 """Get an event by event ID 

323 

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

325 

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

327 :type event_id: str 

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

329 :type ruleset_id: str 

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

331 number provided, it will be total request 

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

333 (connection, read) timeouts. 

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

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

336 request; this effectively ignores the 

337 authentication in the spec for a single request. 

338 :type _request_auth: dict, optional 

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

340 :type _content_type: str, Optional 

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

342 request; this effectively ignores the headers 

343 in the spec for a single request. 

344 :type _headers: dict, optional 

345 :return: Returns the result object. 

346 """ # noqa: E501 

347 

348 _param = self._get_event_serialize( 

349 event_id=event_id, 

350 ruleset_id=ruleset_id, 

351 _request_auth=_request_auth, 

352 _content_type=_content_type, 

353 _headers=_headers, 

354 ) 

355 

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

357 '200': 'Event', 

358 '400': 'ErrorResponse', 

359 '403': 'ErrorResponse', 

360 '404': 'ErrorResponse', 

361 '429': 'ErrorResponse', 

362 '500': 'ErrorResponse', 

363 } 

364 

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

366 response_data.read() 

367 return self.api_client.response_deserialize( 

368 response_data=response_data, 

369 response_types_map=_response_types_map, 

370 ).data 

371 

372 @validate_call 

373 def get_event_with_http_info( 

374 self, 

375 event_id: Annotated[ 

376 StrictStr, 

377 Field( 

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

379 ), 

380 ], 

381 ruleset_id: Annotated[ 

382 Optional[StrictStr], 

383 Field( 

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

385 ), 

386 ] = None, 

387 _request_timeout: Union[ 

388 None, 

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

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

391 ] = None, 

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

393 _content_type: Optional[StrictStr] = None, 

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

395 ) -> ApiResponse[Event]: 

396 """Get an event by event ID 

397 

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

399 

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

401 :type event_id: str 

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

403 :type ruleset_id: str 

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

405 number provided, it will be total request 

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

407 (connection, read) timeouts. 

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

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

410 request; this effectively ignores the 

411 authentication in the spec for a single request. 

412 :type _request_auth: dict, optional 

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

414 :type _content_type: str, Optional 

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

416 request; this effectively ignores the headers 

417 in the spec for a single request. 

418 :type _headers: dict, optional 

419 :return: Returns the result object. 

420 """ # noqa: E501 

421 

422 _param = self._get_event_serialize( 

423 event_id=event_id, 

424 ruleset_id=ruleset_id, 

425 _request_auth=_request_auth, 

426 _content_type=_content_type, 

427 _headers=_headers, 

428 ) 

429 

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

431 '200': 'Event', 

432 '400': 'ErrorResponse', 

433 '403': 'ErrorResponse', 

434 '404': 'ErrorResponse', 

435 '429': 'ErrorResponse', 

436 '500': 'ErrorResponse', 

437 } 

438 

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

440 response_data.read() 

441 return self.api_client.response_deserialize( 

442 response_data=response_data, 

443 response_types_map=_response_types_map, 

444 ) 

445 

446 @validate_call 

447 def get_event_without_preload_content( 

448 self, 

449 event_id: Annotated[ 

450 StrictStr, 

451 Field( 

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

453 ), 

454 ], 

455 ruleset_id: Annotated[ 

456 Optional[StrictStr], 

457 Field( 

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

459 ), 

460 ] = None, 

461 _request_timeout: Union[ 

462 None, 

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

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

465 ] = None, 

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

467 _content_type: Optional[StrictStr] = None, 

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

469 ) -> RESTResponseType: 

470 """Get an event by event ID 

471 

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

473 

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

475 :type event_id: str 

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

477 :type ruleset_id: str 

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

479 number provided, it will be total request 

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

481 (connection, read) timeouts. 

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

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

484 request; this effectively ignores the 

485 authentication in the spec for a single request. 

486 :type _request_auth: dict, optional 

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

488 :type _content_type: str, Optional 

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

490 request; this effectively ignores the headers 

491 in the spec for a single request. 

492 :type _headers: dict, optional 

493 :return: Returns the result object. 

494 """ # noqa: E501 

495 

496 _param = self._get_event_serialize( 

497 event_id=event_id, 

498 ruleset_id=ruleset_id, 

499 _request_auth=_request_auth, 

500 _content_type=_content_type, 

501 _headers=_headers, 

502 ) 

503 

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

505 '200': 'Event', 

506 '400': 'ErrorResponse', 

507 '403': 'ErrorResponse', 

508 '404': 'ErrorResponse', 

509 '429': 'ErrorResponse', 

510 '500': 'ErrorResponse', 

511 } 

512 

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

514 return response_data.response 

515 

516 def _get_event_serialize( 

517 self, 

518 event_id: str, 

519 ruleset_id: Optional[str], 

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

521 _content_type: Optional[StrictStr], 

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

523 ) -> RequestSerialized: 

524 

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

526 

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

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

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

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

531 _files: dict[ 

532 str, 

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

534 ] = {} 

535 _body_params: Optional[Any] = None 

536 

537 # process the path parameters 

538 if event_id is not None: 

539 _path_params['event_id'] = event_id 

540 

541 # process the query parameters 

542 if ruleset_id is not None: 

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

544 

545 # set the HTTP header `Accept` 

546 if 'Accept' not in _header_params: 

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

548 

549 # authentication setting 

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

551 

552 return self.api_client.param_serialize( 

553 method='GET', 

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

555 path_params=_path_params, 

556 query_params=_query_params, 

557 header_params=_header_params, 

558 body=_body_params, 

559 post_params=_form_params, 

560 files=_files, 

561 auth_settings=_auth_settings, 

562 collection_formats=_collection_formats, 

563 _request_auth=_request_auth, 

564 ) 

565 

566 @validate_call 

567 def search_events( 

568 self, 

569 limit: Annotated[ 

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

571 Field( 

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

573 ), 

574 ] = None, 

575 pagination_key: Annotated[ 

576 Optional[StrictStr], 

577 Field( 

578 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 100 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` ' 

579 ), 

580 ] = None, 

581 visitor_id: Annotated[ 

582 Optional[StrictStr], 

583 Field( 

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

585 ), 

586 ] = None, 

587 high_recall_id: Annotated[ 

588 Optional[StrictStr], 

589 Field( 

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

591 ), 

592 ] = None, 

593 bot: Annotated[ 

594 Optional[SearchEventsBot], 

595 Field( 

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

597 ), 

598 ] = None, 

599 bot_info: Annotated[ 

600 Optional[SearchEventsBotInfo], 

601 Field( 

602 description='Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. ' 

603 ), 

604 ] = None, 

605 bot_info_category: Annotated[ 

606 Optional[list[BotInfoCategory]], 

607 Field( 

608 description='Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. ' 

609 ), 

610 ] = None, 

611 bot_info_identity: Annotated[ 

612 Optional[list[BotInfoIdentity]], 

613 Field( 

614 description='Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. ' 

615 ), 

616 ] = None, 

617 bot_info_confidence: Annotated[ 

618 Optional[list[BotInfoConfidence]], 

619 Field( 

620 description='Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. ' 

621 ), 

622 ] = None, 

623 bot_info_provider: Annotated[ 

624 Optional[list[StrictStr]], 

625 Field( 

626 description='Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. ' 

627 ), 

628 ] = None, 

629 bot_info_name: Annotated[ 

630 Optional[list[StrictStr]], 

631 Field( 

632 description='Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. ' 

633 ), 

634 ] = None, 

635 ip_address: Annotated[ 

636 Optional[StrictStr], 

637 Field( 

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

639 ), 

640 ] = None, 

641 asn: Annotated[ 

642 Optional[StrictStr], 

643 Field( 

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

645 ), 

646 ] = None, 

647 linked_id: Annotated[ 

648 Optional[StrictStr], 

649 Field( 

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

651 ), 

652 ] = None, 

653 url: Annotated[ 

654 Optional[StrictStr], 

655 Field( 

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

657 ), 

658 ] = None, 

659 bundle_id: Annotated[ 

660 Optional[StrictStr], 

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

662 ] = None, 

663 package_name: Annotated[ 

664 Optional[StrictStr], 

665 Field( 

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

667 ), 

668 ] = None, 

669 origin: Annotated[ 

670 Optional[StrictStr], 

671 Field( 

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

673 ), 

674 ] = None, 

675 start: Annotated[ 

676 Optional[SearchEventsStartParameter], 

677 Field( 

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

679 ), 

680 ] = None, 

681 end: Annotated[ 

682 Optional[SearchEventsEndParameter], 

683 Field( 

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

685 ), 

686 ] = None, 

687 reverse: Annotated[ 

688 Optional[StrictBool], 

689 Field( 

690 description='When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). ' 

691 ), 

692 ] = None, 

693 suspect: Annotated[ 

694 Optional[StrictBool], 

695 Field( 

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

697 ), 

698 ] = None, 

699 vpn: Annotated[ 

700 Optional[StrictBool], 

701 Field( 

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

703 ), 

704 ] = None, 

705 virtual_machine: Annotated[ 

706 Optional[StrictBool], 

707 Field( 

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

709 ), 

710 ] = None, 

711 tampering: Annotated[ 

712 Optional[StrictBool], 

713 Field( 

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

715 ), 

716 ] = None, 

717 anti_detect_browser: Annotated[ 

718 Optional[StrictBool], 

719 Field( 

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

721 ), 

722 ] = None, 

723 incognito: Annotated[ 

724 Optional[StrictBool], 

725 Field( 

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

727 ), 

728 ] = None, 

729 privacy_settings: Annotated[ 

730 Optional[StrictBool], 

731 Field( 

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

733 ), 

734 ] = None, 

735 jailbroken: Annotated[ 

736 Optional[StrictBool], 

737 Field( 

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

739 ), 

740 ] = None, 

741 frida: Annotated[ 

742 Optional[StrictBool], 

743 Field( 

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

745 ), 

746 ] = None, 

747 factory_reset: Annotated[ 

748 Optional[StrictBool], 

749 Field( 

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

751 ), 

752 ] = None, 

753 cloned_app: Annotated[ 

754 Optional[StrictBool], 

755 Field( 

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

757 ), 

758 ] = None, 

759 emulator: Annotated[ 

760 Optional[StrictBool], 

761 Field( 

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

763 ), 

764 ] = None, 

765 root_apps: Annotated[ 

766 Optional[StrictBool], 

767 Field( 

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

769 ), 

770 ] = None, 

771 vpn_confidence: Annotated[ 

772 Optional[SearchEventsVpnConfidence], 

773 Field( 

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

775 ), 

776 ] = None, 

777 min_suspect_score: Annotated[ 

778 Optional[Union[StrictFloat, StrictInt]], 

779 Field( 

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

781 ), 

782 ] = None, 

783 developer_tools: Annotated[ 

784 Optional[StrictBool], 

785 Field( 

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

787 ), 

788 ] = None, 

789 location_spoofing: Annotated[ 

790 Optional[StrictBool], 

791 Field( 

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

793 ), 

794 ] = None, 

795 mitm_attack: Annotated[ 

796 Optional[StrictBool], 

797 Field( 

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

799 ), 

800 ] = None, 

801 rare_device: Annotated[ 

802 Optional[StrictBool], 

803 Field( 

804 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

805 ), 

806 ] = None, 

807 rare_device_percentile_bucket: Annotated[ 

808 Optional[SearchEventsRareDevicePercentileBucket], 

809 Field( 

810 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

811 ), 

812 ] = None, 

813 proxy: Annotated[ 

814 Optional[StrictBool], 

815 Field( 

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

817 ), 

818 ] = None, 

819 sdk_version: Annotated[ 

820 Optional[StrictStr], 

821 Field( 

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

823 ), 

824 ] = None, 

825 sdk_platform: Annotated[ 

826 Optional[SearchEventsSdkPlatform], 

827 Field( 

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

829 ), 

830 ] = None, 

831 environment: Annotated[ 

832 Optional[list[StrictStr]], 

833 Field( 

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

835 ), 

836 ] = None, 

837 proximity_id: Annotated[ 

838 Optional[StrictStr], 

839 Field( 

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

841 ), 

842 ] = None, 

843 total_hits: Annotated[ 

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

845 Field( 

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

847 ), 

848 ] = None, 

849 tor_node: Annotated[ 

850 Optional[StrictBool], 

851 Field( 

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

853 ), 

854 ] = None, 

855 incremental_identification_status: Annotated[ 

856 Optional[SearchEventsIncrementalIdentificationStatus], 

857 Field( 

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

859 ), 

860 ] = None, 

861 simulator: Annotated[ 

862 Optional[StrictBool], 

863 Field( 

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

865 ), 

866 ] = None, 

867 _request_timeout: Union[ 

868 None, 

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

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

871 ] = None, 

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

873 _content_type: Optional[StrictStr] = None, 

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

875 ) -> EventSearch: 

876 """Search events 

877 

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

879 

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

881 :type limit: int 

882 :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 100 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` 

883 :type pagination_key: str 

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

885 :type visitor_id: str 

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

887 :type high_recall_id: str 

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

889 :type bot: SearchEventsBot 

890 :param bot_info: Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. 

891 :type bot_info: SearchEventsBotInfo 

892 :param bot_info_category: Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. 

893 :type bot_info_category: List[BotInfoCategory] 

894 :param bot_info_identity: Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. 

895 :type bot_info_identity: List[BotInfoIdentity] 

896 :param bot_info_confidence: Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. 

897 :type bot_info_confidence: List[BotInfoConfidence] 

898 :param bot_info_provider: Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. 

899 :type bot_info_provider: List[str] 

900 :param bot_info_name: Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. 

901 :type bot_info_name: List[str] 

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

903 :type ip_address: str 

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

905 :type asn: str 

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

907 :type linked_id: str 

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

909 :type url: str 

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

911 :type bundle_id: str 

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

913 :type package_name: str 

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

915 :type origin: str 

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

917 :type start: SearchEventsStartParameter 

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

919 :type end: SearchEventsEndParameter 

920 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). 

921 :type reverse: bool 

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

923 :type suspect: bool 

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

925 :type vpn: bool 

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

927 :type virtual_machine: bool 

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

929 :type tampering: bool 

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

931 :type anti_detect_browser: bool 

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

933 :type incognito: bool 

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

935 :type privacy_settings: bool 

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

937 :type jailbroken: bool 

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

939 :type frida: bool 

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

941 :type factory_reset: bool 

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

943 :type cloned_app: bool 

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

945 :type emulator: bool 

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

947 :type root_apps: bool 

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

949 :type vpn_confidence: SearchEventsVpnConfidence 

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

951 :type min_suspect_score: float 

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

953 :type developer_tools: bool 

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

955 :type location_spoofing: bool 

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

957 :type mitm_attack: bool 

958 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

959 :type rare_device: bool 

960 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

961 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

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

963 :type proxy: bool 

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

965 :type sdk_version: str 

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

967 :type sdk_platform: SearchEventsSdkPlatform 

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

969 :type environment: List[str] 

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

971 :type proximity_id: str 

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

973 :type total_hits: int 

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

975 :type tor_node: bool 

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

977 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

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

979 :type simulator: bool 

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

981 number provided, it will be total request 

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

983 (connection, read) timeouts. 

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

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

986 request; this effectively ignores the 

987 authentication in the spec for a single request. 

988 :type _request_auth: dict, optional 

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

990 :type _content_type: str, Optional 

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

992 request; this effectively ignores the headers 

993 in the spec for a single request. 

994 :type _headers: dict, optional 

995 :return: Returns the result object. 

996 """ # noqa: E501 

997 

998 _param = self._search_events_serialize( 

999 limit=limit, 

1000 pagination_key=pagination_key, 

1001 visitor_id=visitor_id, 

1002 high_recall_id=high_recall_id, 

1003 bot=bot, 

1004 bot_info=bot_info, 

1005 bot_info_category=bot_info_category, 

1006 bot_info_identity=bot_info_identity, 

1007 bot_info_confidence=bot_info_confidence, 

1008 bot_info_provider=bot_info_provider, 

1009 bot_info_name=bot_info_name, 

1010 ip_address=ip_address, 

1011 asn=asn, 

1012 linked_id=linked_id, 

1013 url=url, 

1014 bundle_id=bundle_id, 

1015 package_name=package_name, 

1016 origin=origin, 

1017 start=start, 

1018 end=end, 

1019 reverse=reverse, 

1020 suspect=suspect, 

1021 vpn=vpn, 

1022 virtual_machine=virtual_machine, 

1023 tampering=tampering, 

1024 anti_detect_browser=anti_detect_browser, 

1025 incognito=incognito, 

1026 privacy_settings=privacy_settings, 

1027 jailbroken=jailbroken, 

1028 frida=frida, 

1029 factory_reset=factory_reset, 

1030 cloned_app=cloned_app, 

1031 emulator=emulator, 

1032 root_apps=root_apps, 

1033 vpn_confidence=vpn_confidence, 

1034 min_suspect_score=min_suspect_score, 

1035 developer_tools=developer_tools, 

1036 location_spoofing=location_spoofing, 

1037 mitm_attack=mitm_attack, 

1038 rare_device=rare_device, 

1039 rare_device_percentile_bucket=rare_device_percentile_bucket, 

1040 proxy=proxy, 

1041 sdk_version=sdk_version, 

1042 sdk_platform=sdk_platform, 

1043 environment=environment, 

1044 proximity_id=proximity_id, 

1045 total_hits=total_hits, 

1046 tor_node=tor_node, 

1047 incremental_identification_status=incremental_identification_status, 

1048 simulator=simulator, 

1049 _request_auth=_request_auth, 

1050 _content_type=_content_type, 

1051 _headers=_headers, 

1052 ) 

1053 

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

1055 '200': 'EventSearch', 

1056 '400': 'ErrorResponse', 

1057 '403': 'ErrorResponse', 

1058 '500': 'ErrorResponse', 

1059 } 

1060 

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

1062 response_data.read() 

1063 return self.api_client.response_deserialize( 

1064 response_data=response_data, 

1065 response_types_map=_response_types_map, 

1066 ).data 

1067 

1068 @validate_call 

1069 def search_events_with_http_info( 

1070 self, 

1071 limit: Annotated[ 

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

1073 Field( 

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

1075 ), 

1076 ] = None, 

1077 pagination_key: Annotated[ 

1078 Optional[StrictStr], 

1079 Field( 

1080 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 100 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` ' 

1081 ), 

1082 ] = None, 

1083 visitor_id: Annotated[ 

1084 Optional[StrictStr], 

1085 Field( 

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

1087 ), 

1088 ] = None, 

1089 high_recall_id: Annotated[ 

1090 Optional[StrictStr], 

1091 Field( 

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

1093 ), 

1094 ] = None, 

1095 bot: Annotated[ 

1096 Optional[SearchEventsBot], 

1097 Field( 

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

1099 ), 

1100 ] = None, 

1101 bot_info: Annotated[ 

1102 Optional[SearchEventsBotInfo], 

1103 Field( 

1104 description='Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. ' 

1105 ), 

1106 ] = None, 

1107 bot_info_category: Annotated[ 

1108 Optional[list[BotInfoCategory]], 

1109 Field( 

1110 description='Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. ' 

1111 ), 

1112 ] = None, 

1113 bot_info_identity: Annotated[ 

1114 Optional[list[BotInfoIdentity]], 

1115 Field( 

1116 description='Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. ' 

1117 ), 

1118 ] = None, 

1119 bot_info_confidence: Annotated[ 

1120 Optional[list[BotInfoConfidence]], 

1121 Field( 

1122 description='Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. ' 

1123 ), 

1124 ] = None, 

1125 bot_info_provider: Annotated[ 

1126 Optional[list[StrictStr]], 

1127 Field( 

1128 description='Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. ' 

1129 ), 

1130 ] = None, 

1131 bot_info_name: Annotated[ 

1132 Optional[list[StrictStr]], 

1133 Field( 

1134 description='Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. ' 

1135 ), 

1136 ] = None, 

1137 ip_address: Annotated[ 

1138 Optional[StrictStr], 

1139 Field( 

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

1141 ), 

1142 ] = None, 

1143 asn: Annotated[ 

1144 Optional[StrictStr], 

1145 Field( 

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

1147 ), 

1148 ] = None, 

1149 linked_id: Annotated[ 

1150 Optional[StrictStr], 

1151 Field( 

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

1153 ), 

1154 ] = None, 

1155 url: Annotated[ 

1156 Optional[StrictStr], 

1157 Field( 

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

1159 ), 

1160 ] = None, 

1161 bundle_id: Annotated[ 

1162 Optional[StrictStr], 

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

1164 ] = None, 

1165 package_name: Annotated[ 

1166 Optional[StrictStr], 

1167 Field( 

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

1169 ), 

1170 ] = None, 

1171 origin: Annotated[ 

1172 Optional[StrictStr], 

1173 Field( 

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

1175 ), 

1176 ] = None, 

1177 start: Annotated[ 

1178 Optional[SearchEventsStartParameter], 

1179 Field( 

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

1181 ), 

1182 ] = None, 

1183 end: Annotated[ 

1184 Optional[SearchEventsEndParameter], 

1185 Field( 

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

1187 ), 

1188 ] = None, 

1189 reverse: Annotated[ 

1190 Optional[StrictBool], 

1191 Field( 

1192 description='When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). ' 

1193 ), 

1194 ] = None, 

1195 suspect: Annotated[ 

1196 Optional[StrictBool], 

1197 Field( 

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

1199 ), 

1200 ] = None, 

1201 vpn: Annotated[ 

1202 Optional[StrictBool], 

1203 Field( 

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

1205 ), 

1206 ] = None, 

1207 virtual_machine: Annotated[ 

1208 Optional[StrictBool], 

1209 Field( 

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

1211 ), 

1212 ] = None, 

1213 tampering: Annotated[ 

1214 Optional[StrictBool], 

1215 Field( 

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

1217 ), 

1218 ] = None, 

1219 anti_detect_browser: Annotated[ 

1220 Optional[StrictBool], 

1221 Field( 

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

1223 ), 

1224 ] = None, 

1225 incognito: Annotated[ 

1226 Optional[StrictBool], 

1227 Field( 

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

1229 ), 

1230 ] = None, 

1231 privacy_settings: Annotated[ 

1232 Optional[StrictBool], 

1233 Field( 

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

1235 ), 

1236 ] = None, 

1237 jailbroken: Annotated[ 

1238 Optional[StrictBool], 

1239 Field( 

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

1241 ), 

1242 ] = None, 

1243 frida: Annotated[ 

1244 Optional[StrictBool], 

1245 Field( 

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

1247 ), 

1248 ] = None, 

1249 factory_reset: Annotated[ 

1250 Optional[StrictBool], 

1251 Field( 

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

1253 ), 

1254 ] = None, 

1255 cloned_app: Annotated[ 

1256 Optional[StrictBool], 

1257 Field( 

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

1259 ), 

1260 ] = None, 

1261 emulator: Annotated[ 

1262 Optional[StrictBool], 

1263 Field( 

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

1265 ), 

1266 ] = None, 

1267 root_apps: Annotated[ 

1268 Optional[StrictBool], 

1269 Field( 

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

1271 ), 

1272 ] = None, 

1273 vpn_confidence: Annotated[ 

1274 Optional[SearchEventsVpnConfidence], 

1275 Field( 

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

1277 ), 

1278 ] = None, 

1279 min_suspect_score: Annotated[ 

1280 Optional[Union[StrictFloat, StrictInt]], 

1281 Field( 

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

1283 ), 

1284 ] = None, 

1285 developer_tools: Annotated[ 

1286 Optional[StrictBool], 

1287 Field( 

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

1289 ), 

1290 ] = None, 

1291 location_spoofing: Annotated[ 

1292 Optional[StrictBool], 

1293 Field( 

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

1295 ), 

1296 ] = None, 

1297 mitm_attack: Annotated[ 

1298 Optional[StrictBool], 

1299 Field( 

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

1301 ), 

1302 ] = None, 

1303 rare_device: Annotated[ 

1304 Optional[StrictBool], 

1305 Field( 

1306 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

1307 ), 

1308 ] = None, 

1309 rare_device_percentile_bucket: Annotated[ 

1310 Optional[SearchEventsRareDevicePercentileBucket], 

1311 Field( 

1312 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

1313 ), 

1314 ] = None, 

1315 proxy: Annotated[ 

1316 Optional[StrictBool], 

1317 Field( 

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

1319 ), 

1320 ] = None, 

1321 sdk_version: Annotated[ 

1322 Optional[StrictStr], 

1323 Field( 

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

1325 ), 

1326 ] = None, 

1327 sdk_platform: Annotated[ 

1328 Optional[SearchEventsSdkPlatform], 

1329 Field( 

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

1331 ), 

1332 ] = None, 

1333 environment: Annotated[ 

1334 Optional[list[StrictStr]], 

1335 Field( 

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

1337 ), 

1338 ] = None, 

1339 proximity_id: Annotated[ 

1340 Optional[StrictStr], 

1341 Field( 

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

1343 ), 

1344 ] = None, 

1345 total_hits: Annotated[ 

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

1347 Field( 

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

1349 ), 

1350 ] = None, 

1351 tor_node: Annotated[ 

1352 Optional[StrictBool], 

1353 Field( 

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

1355 ), 

1356 ] = None, 

1357 incremental_identification_status: Annotated[ 

1358 Optional[SearchEventsIncrementalIdentificationStatus], 

1359 Field( 

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

1361 ), 

1362 ] = None, 

1363 simulator: Annotated[ 

1364 Optional[StrictBool], 

1365 Field( 

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

1367 ), 

1368 ] = None, 

1369 _request_timeout: Union[ 

1370 None, 

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

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

1373 ] = None, 

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

1375 _content_type: Optional[StrictStr] = None, 

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

1377 ) -> ApiResponse[EventSearch]: 

1378 """Search events 

1379 

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

1381 

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

1383 :type limit: int 

1384 :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 100 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` 

1385 :type pagination_key: str 

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

1387 :type visitor_id: str 

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

1389 :type high_recall_id: str 

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

1391 :type bot: SearchEventsBot 

1392 :param bot_info: Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. 

1393 :type bot_info: SearchEventsBotInfo 

1394 :param bot_info_category: Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. 

1395 :type bot_info_category: List[BotInfoCategory] 

1396 :param bot_info_identity: Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. 

1397 :type bot_info_identity: List[BotInfoIdentity] 

1398 :param bot_info_confidence: Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. 

1399 :type bot_info_confidence: List[BotInfoConfidence] 

1400 :param bot_info_provider: Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. 

1401 :type bot_info_provider: List[str] 

1402 :param bot_info_name: Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. 

1403 :type bot_info_name: List[str] 

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

1405 :type ip_address: str 

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

1407 :type asn: str 

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

1409 :type linked_id: str 

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

1411 :type url: str 

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

1413 :type bundle_id: str 

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

1415 :type package_name: str 

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

1417 :type origin: str 

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

1419 :type start: SearchEventsStartParameter 

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

1421 :type end: SearchEventsEndParameter 

1422 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). 

1423 :type reverse: bool 

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

1425 :type suspect: bool 

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

1427 :type vpn: bool 

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

1429 :type virtual_machine: bool 

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

1431 :type tampering: bool 

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

1433 :type anti_detect_browser: bool 

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

1435 :type incognito: bool 

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

1437 :type privacy_settings: bool 

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

1439 :type jailbroken: bool 

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

1441 :type frida: bool 

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

1443 :type factory_reset: bool 

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

1445 :type cloned_app: bool 

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

1447 :type emulator: bool 

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

1449 :type root_apps: bool 

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

1451 :type vpn_confidence: SearchEventsVpnConfidence 

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

1453 :type min_suspect_score: float 

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

1455 :type developer_tools: bool 

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

1457 :type location_spoofing: bool 

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

1459 :type mitm_attack: bool 

1460 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

1461 :type rare_device: bool 

1462 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

1463 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

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

1465 :type proxy: bool 

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

1467 :type sdk_version: str 

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

1469 :type sdk_platform: SearchEventsSdkPlatform 

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

1471 :type environment: List[str] 

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

1473 :type proximity_id: str 

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

1475 :type total_hits: int 

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

1477 :type tor_node: bool 

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

1479 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

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

1481 :type simulator: bool 

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

1483 number provided, it will be total request 

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

1485 (connection, read) timeouts. 

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

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

1488 request; this effectively ignores the 

1489 authentication in the spec for a single request. 

1490 :type _request_auth: dict, optional 

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

1492 :type _content_type: str, Optional 

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

1494 request; this effectively ignores the headers 

1495 in the spec for a single request. 

1496 :type _headers: dict, optional 

1497 :return: Returns the result object. 

1498 """ # noqa: E501 

1499 

1500 _param = self._search_events_serialize( 

1501 limit=limit, 

1502 pagination_key=pagination_key, 

1503 visitor_id=visitor_id, 

1504 high_recall_id=high_recall_id, 

1505 bot=bot, 

1506 bot_info=bot_info, 

1507 bot_info_category=bot_info_category, 

1508 bot_info_identity=bot_info_identity, 

1509 bot_info_confidence=bot_info_confidence, 

1510 bot_info_provider=bot_info_provider, 

1511 bot_info_name=bot_info_name, 

1512 ip_address=ip_address, 

1513 asn=asn, 

1514 linked_id=linked_id, 

1515 url=url, 

1516 bundle_id=bundle_id, 

1517 package_name=package_name, 

1518 origin=origin, 

1519 start=start, 

1520 end=end, 

1521 reverse=reverse, 

1522 suspect=suspect, 

1523 vpn=vpn, 

1524 virtual_machine=virtual_machine, 

1525 tampering=tampering, 

1526 anti_detect_browser=anti_detect_browser, 

1527 incognito=incognito, 

1528 privacy_settings=privacy_settings, 

1529 jailbroken=jailbroken, 

1530 frida=frida, 

1531 factory_reset=factory_reset, 

1532 cloned_app=cloned_app, 

1533 emulator=emulator, 

1534 root_apps=root_apps, 

1535 vpn_confidence=vpn_confidence, 

1536 min_suspect_score=min_suspect_score, 

1537 developer_tools=developer_tools, 

1538 location_spoofing=location_spoofing, 

1539 mitm_attack=mitm_attack, 

1540 rare_device=rare_device, 

1541 rare_device_percentile_bucket=rare_device_percentile_bucket, 

1542 proxy=proxy, 

1543 sdk_version=sdk_version, 

1544 sdk_platform=sdk_platform, 

1545 environment=environment, 

1546 proximity_id=proximity_id, 

1547 total_hits=total_hits, 

1548 tor_node=tor_node, 

1549 incremental_identification_status=incremental_identification_status, 

1550 simulator=simulator, 

1551 _request_auth=_request_auth, 

1552 _content_type=_content_type, 

1553 _headers=_headers, 

1554 ) 

1555 

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

1557 '200': 'EventSearch', 

1558 '400': 'ErrorResponse', 

1559 '403': 'ErrorResponse', 

1560 '500': 'ErrorResponse', 

1561 } 

1562 

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

1564 response_data.read() 

1565 return self.api_client.response_deserialize( 

1566 response_data=response_data, 

1567 response_types_map=_response_types_map, 

1568 ) 

1569 

1570 @validate_call 

1571 def search_events_without_preload_content( 

1572 self, 

1573 limit: Annotated[ 

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

1575 Field( 

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

1577 ), 

1578 ] = None, 

1579 pagination_key: Annotated[ 

1580 Optional[StrictStr], 

1581 Field( 

1582 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 100 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` ' 

1583 ), 

1584 ] = None, 

1585 visitor_id: Annotated[ 

1586 Optional[StrictStr], 

1587 Field( 

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

1589 ), 

1590 ] = None, 

1591 high_recall_id: Annotated[ 

1592 Optional[StrictStr], 

1593 Field( 

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

1595 ), 

1596 ] = None, 

1597 bot: Annotated[ 

1598 Optional[SearchEventsBot], 

1599 Field( 

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

1601 ), 

1602 ] = None, 

1603 bot_info: Annotated[ 

1604 Optional[SearchEventsBotInfo], 

1605 Field( 

1606 description='Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. ' 

1607 ), 

1608 ] = None, 

1609 bot_info_category: Annotated[ 

1610 Optional[list[BotInfoCategory]], 

1611 Field( 

1612 description='Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. ' 

1613 ), 

1614 ] = None, 

1615 bot_info_identity: Annotated[ 

1616 Optional[list[BotInfoIdentity]], 

1617 Field( 

1618 description='Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. ' 

1619 ), 

1620 ] = None, 

1621 bot_info_confidence: Annotated[ 

1622 Optional[list[BotInfoConfidence]], 

1623 Field( 

1624 description='Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. ' 

1625 ), 

1626 ] = None, 

1627 bot_info_provider: Annotated[ 

1628 Optional[list[StrictStr]], 

1629 Field( 

1630 description='Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. ' 

1631 ), 

1632 ] = None, 

1633 bot_info_name: Annotated[ 

1634 Optional[list[StrictStr]], 

1635 Field( 

1636 description='Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. ' 

1637 ), 

1638 ] = None, 

1639 ip_address: Annotated[ 

1640 Optional[StrictStr], 

1641 Field( 

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

1643 ), 

1644 ] = None, 

1645 asn: Annotated[ 

1646 Optional[StrictStr], 

1647 Field( 

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

1649 ), 

1650 ] = None, 

1651 linked_id: Annotated[ 

1652 Optional[StrictStr], 

1653 Field( 

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

1655 ), 

1656 ] = None, 

1657 url: Annotated[ 

1658 Optional[StrictStr], 

1659 Field( 

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

1661 ), 

1662 ] = None, 

1663 bundle_id: Annotated[ 

1664 Optional[StrictStr], 

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

1666 ] = None, 

1667 package_name: Annotated[ 

1668 Optional[StrictStr], 

1669 Field( 

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

1671 ), 

1672 ] = None, 

1673 origin: Annotated[ 

1674 Optional[StrictStr], 

1675 Field( 

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

1677 ), 

1678 ] = None, 

1679 start: Annotated[ 

1680 Optional[SearchEventsStartParameter], 

1681 Field( 

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

1683 ), 

1684 ] = None, 

1685 end: Annotated[ 

1686 Optional[SearchEventsEndParameter], 

1687 Field( 

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

1689 ), 

1690 ] = None, 

1691 reverse: Annotated[ 

1692 Optional[StrictBool], 

1693 Field( 

1694 description='When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). ' 

1695 ), 

1696 ] = None, 

1697 suspect: Annotated[ 

1698 Optional[StrictBool], 

1699 Field( 

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

1701 ), 

1702 ] = None, 

1703 vpn: Annotated[ 

1704 Optional[StrictBool], 

1705 Field( 

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

1707 ), 

1708 ] = None, 

1709 virtual_machine: Annotated[ 

1710 Optional[StrictBool], 

1711 Field( 

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

1713 ), 

1714 ] = None, 

1715 tampering: Annotated[ 

1716 Optional[StrictBool], 

1717 Field( 

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

1719 ), 

1720 ] = None, 

1721 anti_detect_browser: Annotated[ 

1722 Optional[StrictBool], 

1723 Field( 

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

1725 ), 

1726 ] = None, 

1727 incognito: Annotated[ 

1728 Optional[StrictBool], 

1729 Field( 

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

1731 ), 

1732 ] = None, 

1733 privacy_settings: Annotated[ 

1734 Optional[StrictBool], 

1735 Field( 

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

1737 ), 

1738 ] = None, 

1739 jailbroken: Annotated[ 

1740 Optional[StrictBool], 

1741 Field( 

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

1743 ), 

1744 ] = None, 

1745 frida: Annotated[ 

1746 Optional[StrictBool], 

1747 Field( 

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

1749 ), 

1750 ] = None, 

1751 factory_reset: Annotated[ 

1752 Optional[StrictBool], 

1753 Field( 

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

1755 ), 

1756 ] = None, 

1757 cloned_app: Annotated[ 

1758 Optional[StrictBool], 

1759 Field( 

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

1761 ), 

1762 ] = None, 

1763 emulator: Annotated[ 

1764 Optional[StrictBool], 

1765 Field( 

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

1767 ), 

1768 ] = None, 

1769 root_apps: Annotated[ 

1770 Optional[StrictBool], 

1771 Field( 

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

1773 ), 

1774 ] = None, 

1775 vpn_confidence: Annotated[ 

1776 Optional[SearchEventsVpnConfidence], 

1777 Field( 

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

1779 ), 

1780 ] = None, 

1781 min_suspect_score: Annotated[ 

1782 Optional[Union[StrictFloat, StrictInt]], 

1783 Field( 

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

1785 ), 

1786 ] = None, 

1787 developer_tools: Annotated[ 

1788 Optional[StrictBool], 

1789 Field( 

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

1791 ), 

1792 ] = None, 

1793 location_spoofing: Annotated[ 

1794 Optional[StrictBool], 

1795 Field( 

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

1797 ), 

1798 ] = None, 

1799 mitm_attack: Annotated[ 

1800 Optional[StrictBool], 

1801 Field( 

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

1803 ), 

1804 ] = None, 

1805 rare_device: Annotated[ 

1806 Optional[StrictBool], 

1807 Field( 

1808 description='Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

1809 ), 

1810 ] = None, 

1811 rare_device_percentile_bucket: Annotated[ 

1812 Optional[SearchEventsRareDevicePercentileBucket], 

1813 Field( 

1814 description='Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). ' 

1815 ), 

1816 ] = None, 

1817 proxy: Annotated[ 

1818 Optional[StrictBool], 

1819 Field( 

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

1821 ), 

1822 ] = None, 

1823 sdk_version: Annotated[ 

1824 Optional[StrictStr], 

1825 Field( 

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

1827 ), 

1828 ] = None, 

1829 sdk_platform: Annotated[ 

1830 Optional[SearchEventsSdkPlatform], 

1831 Field( 

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

1833 ), 

1834 ] = None, 

1835 environment: Annotated[ 

1836 Optional[list[StrictStr]], 

1837 Field( 

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

1839 ), 

1840 ] = None, 

1841 proximity_id: Annotated[ 

1842 Optional[StrictStr], 

1843 Field( 

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

1845 ), 

1846 ] = None, 

1847 total_hits: Annotated[ 

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

1849 Field( 

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

1851 ), 

1852 ] = None, 

1853 tor_node: Annotated[ 

1854 Optional[StrictBool], 

1855 Field( 

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

1857 ), 

1858 ] = None, 

1859 incremental_identification_status: Annotated[ 

1860 Optional[SearchEventsIncrementalIdentificationStatus], 

1861 Field( 

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

1863 ), 

1864 ] = None, 

1865 simulator: Annotated[ 

1866 Optional[StrictBool], 

1867 Field( 

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

1869 ), 

1870 ] = None, 

1871 _request_timeout: Union[ 

1872 None, 

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

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

1875 ] = None, 

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

1877 _content_type: Optional[StrictStr] = None, 

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

1879 ) -> RESTResponseType: 

1880 """Search events 

1881 

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

1883 

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

1885 :type limit: int 

1886 :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 100 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` 

1887 :type pagination_key: str 

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

1889 :type visitor_id: str 

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

1891 :type high_recall_id: str 

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

1893 :type bot: SearchEventsBot 

1894 :param bot_info: Filter events by their Bot Info result, specifically: - `all` - events where any kind of bot was detected. - `none` - events where no bot was detected. 

1895 :type bot_info: SearchEventsBotInfo 

1896 :param bot_info_category: Filter events by their Bot Info Category. Multiple categories can be provided using the repeated keys syntax. For example, `bot_info_category=ai_agent&bot_info_category=ai_assistant`, will match events with a Bot Info Category of `ai_agent` or `ai_assistant`. Other notations like comma-separated or bracket notation are not supported. 

1897 :type bot_info_category: List[BotInfoCategory] 

1898 :param bot_info_identity: Filter events by their Bot Info Identity type. Multiple identity types can be provided using the repeated keys syntax. For example, `bot_info_identity=verified&bot_info_identity=signed`, will match events with a Bot Info Identity of `verified` or `signed`. Other notations like comma-separated or bracket notation are not supported. 

1899 :type bot_info_identity: List[BotInfoIdentity] 

1900 :param bot_info_confidence: Filter events by their Bot Info Confidence. Multiple confidences can be provided using the repeated keys syntax. For example, `bot_info_confidence=high&bot_info_confidence=medium`, will match events with a Bot Info Confidence of `high` or `medium`. Other notations like comma-separated or bracket notation are not supported. 

1901 :type bot_info_confidence: List[BotInfoConfidence] 

1902 :param bot_info_provider: Filter events by their Bot Info Provider. The provider must match exactly, partial or wildcard matching is not supported. Multiple Providers can be provided using the repeated keys syntax. For example, `bot_info_provider=OpenAI&bot_info_provider=AWS`, will match events with a Bot Info Provider of `OpenAI` or `AWS`. Other notations like comma-separated or bracket notation are not supported. 

1903 :type bot_info_provider: List[str] 

1904 :param bot_info_name: Filter events by their Bot Info Name. The name must match exactly, partial or wildcard matching is not supported. Multiple Names can be provided using the repeated keys syntax. For example, `bot_info_name=ChatGPT%20Agent&bot_info_name=Bedrock%20AgentCore`, will match events with a Bot Info Name of `ChatGPT Agent` or `Bedrock AgentCore`. Other notations like comma-separated or bracket notation are not supported. 

1905 :type bot_info_name: List[str] 

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

1907 :type ip_address: str 

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

1909 :type asn: str 

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

1911 :type linked_id: str 

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

1913 :type url: str 

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

1915 :type bundle_id: str 

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

1917 :type package_name: str 

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

1919 :type origin: str 

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

1921 :type start: SearchEventsStartParameter 

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

1923 :type end: SearchEventsEndParameter 

1924 :param reverse: When `true`, sort events oldest first (ascending timestamp order). Defaults to `false` (newest first, descending timestamp order). 

1925 :type reverse: bool 

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

1927 :type suspect: bool 

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

1929 :type vpn: bool 

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

1931 :type virtual_machine: bool 

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

1933 :type tampering: bool 

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

1935 :type anti_detect_browser: bool 

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

1937 :type incognito: bool 

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

1939 :type privacy_settings: bool 

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

1941 :type jailbroken: bool 

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

1943 :type frida: bool 

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

1945 :type factory_reset: bool 

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

1947 :type cloned_app: bool 

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

1949 :type emulator: bool 

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

1951 :type root_apps: bool 

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

1953 :type vpn_confidence: SearchEventsVpnConfidence 

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

1955 :type min_suspect_score: float 

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

1957 :type developer_tools: bool 

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

1959 :type location_spoofing: bool 

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

1961 :type mitm_attack: bool 

1962 :param rare_device: Filter events by Device Rarity detection result. > Note: When using this parameter, only events with the `rare_device` property set to `true` or `false` are returned. Events without a Device Rarity Smart Signal result are left out of the response. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

1963 :type rare_device: bool 

1964 :param rare_device_percentile_bucket: Filter events by Device Rarity percentile bucket. `<p95` - device configuration is in the bottom 95% (most common). `p95-p99` - device is in the 95th to 99th percentile. `p99-p99.5` - device is in the 99th to 99.5th percentile. `p99.5-p99.9` - device is in the 99.5th to 99.9th percentile. `p99.9+` - device is in the top 0.1% (rarest). `not_seen` - device configuration has never been observed before. > This Smart Signal is currently in beta and only available to select customers. If you are interested, please [contact our support team](https://fingerprint.com/support/). 

1965 :type rare_device_percentile_bucket: SearchEventsRareDevicePercentileBucket 

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

1967 :type proxy: bool 

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

1969 :type sdk_version: str 

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

1971 :type sdk_platform: SearchEventsSdkPlatform 

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

1973 :type environment: List[str] 

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

1975 :type proximity_id: str 

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

1977 :type total_hits: int 

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

1979 :type tor_node: bool 

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

1981 :type incremental_identification_status: SearchEventsIncrementalIdentificationStatus 

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

1983 :type simulator: bool 

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

1985 number provided, it will be total request 

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

1987 (connection, read) timeouts. 

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

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

1990 request; this effectively ignores the 

1991 authentication in the spec for a single request. 

1992 :type _request_auth: dict, optional 

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

1994 :type _content_type: str, Optional 

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

1996 request; this effectively ignores the headers 

1997 in the spec for a single request. 

1998 :type _headers: dict, optional 

1999 :return: Returns the result object. 

2000 """ # noqa: E501 

2001 

2002 _param = self._search_events_serialize( 

2003 limit=limit, 

2004 pagination_key=pagination_key, 

2005 visitor_id=visitor_id, 

2006 high_recall_id=high_recall_id, 

2007 bot=bot, 

2008 bot_info=bot_info, 

2009 bot_info_category=bot_info_category, 

2010 bot_info_identity=bot_info_identity, 

2011 bot_info_confidence=bot_info_confidence, 

2012 bot_info_provider=bot_info_provider, 

2013 bot_info_name=bot_info_name, 

2014 ip_address=ip_address, 

2015 asn=asn, 

2016 linked_id=linked_id, 

2017 url=url, 

2018 bundle_id=bundle_id, 

2019 package_name=package_name, 

2020 origin=origin, 

2021 start=start, 

2022 end=end, 

2023 reverse=reverse, 

2024 suspect=suspect, 

2025 vpn=vpn, 

2026 virtual_machine=virtual_machine, 

2027 tampering=tampering, 

2028 anti_detect_browser=anti_detect_browser, 

2029 incognito=incognito, 

2030 privacy_settings=privacy_settings, 

2031 jailbroken=jailbroken, 

2032 frida=frida, 

2033 factory_reset=factory_reset, 

2034 cloned_app=cloned_app, 

2035 emulator=emulator, 

2036 root_apps=root_apps, 

2037 vpn_confidence=vpn_confidence, 

2038 min_suspect_score=min_suspect_score, 

2039 developer_tools=developer_tools, 

2040 location_spoofing=location_spoofing, 

2041 mitm_attack=mitm_attack, 

2042 rare_device=rare_device, 

2043 rare_device_percentile_bucket=rare_device_percentile_bucket, 

2044 proxy=proxy, 

2045 sdk_version=sdk_version, 

2046 sdk_platform=sdk_platform, 

2047 environment=environment, 

2048 proximity_id=proximity_id, 

2049 total_hits=total_hits, 

2050 tor_node=tor_node, 

2051 incremental_identification_status=incremental_identification_status, 

2052 simulator=simulator, 

2053 _request_auth=_request_auth, 

2054 _content_type=_content_type, 

2055 _headers=_headers, 

2056 ) 

2057 

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

2059 '200': 'EventSearch', 

2060 '400': 'ErrorResponse', 

2061 '403': 'ErrorResponse', 

2062 '500': 'ErrorResponse', 

2063 } 

2064 

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

2066 return response_data.response 

2067 

2068 def _search_events_serialize( 

2069 self, 

2070 limit: Optional[int], 

2071 pagination_key: Optional[str], 

2072 visitor_id: Optional[str], 

2073 high_recall_id: Optional[str], 

2074 bot: Optional[SearchEventsBot], 

2075 bot_info: Optional[SearchEventsBotInfo], 

2076 bot_info_category: Optional[list[BotInfoCategory]], 

2077 bot_info_identity: Optional[list[BotInfoIdentity]], 

2078 bot_info_confidence: Optional[list[BotInfoConfidence]], 

2079 bot_info_provider: Optional[list[str]], 

2080 bot_info_name: Optional[list[str]], 

2081 ip_address: Optional[str], 

2082 asn: Optional[str], 

2083 linked_id: Optional[str], 

2084 url: Optional[str], 

2085 bundle_id: Optional[str], 

2086 package_name: Optional[str], 

2087 origin: Optional[str], 

2088 start: Optional[SearchEventsStartParameter], 

2089 end: Optional[SearchEventsEndParameter], 

2090 reverse: Optional[bool], 

2091 suspect: Optional[bool], 

2092 vpn: Optional[bool], 

2093 virtual_machine: Optional[bool], 

2094 tampering: Optional[bool], 

2095 anti_detect_browser: Optional[bool], 

2096 incognito: Optional[bool], 

2097 privacy_settings: Optional[bool], 

2098 jailbroken: Optional[bool], 

2099 frida: Optional[bool], 

2100 factory_reset: Optional[bool], 

2101 cloned_app: Optional[bool], 

2102 emulator: Optional[bool], 

2103 root_apps: Optional[bool], 

2104 vpn_confidence: Optional[SearchEventsVpnConfidence], 

2105 min_suspect_score: Optional[float], 

2106 developer_tools: Optional[bool], 

2107 location_spoofing: Optional[bool], 

2108 mitm_attack: Optional[bool], 

2109 rare_device: Optional[bool], 

2110 rare_device_percentile_bucket: Optional[SearchEventsRareDevicePercentileBucket], 

2111 proxy: Optional[bool], 

2112 sdk_version: Optional[str], 

2113 sdk_platform: Optional[SearchEventsSdkPlatform], 

2114 environment: Optional[list[str]], 

2115 proximity_id: Optional[str], 

2116 total_hits: Optional[int], 

2117 tor_node: Optional[bool], 

2118 incremental_identification_status: Optional[SearchEventsIncrementalIdentificationStatus], 

2119 simulator: Optional[bool], 

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

2121 _content_type: Optional[StrictStr], 

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

2123 ) -> RequestSerialized: 

2124 

2125 _collection_formats: dict[str, str] = { 

2126 'bot_info_category': 'multi', 

2127 'bot_info_identity': 'multi', 

2128 'bot_info_confidence': 'multi', 

2129 'bot_info_provider': 'multi', 

2130 'bot_info_name': 'multi', 

2131 'environment': 'multi', 

2132 } 

2133 

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

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

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

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

2138 _files: dict[ 

2139 str, 

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

2141 ] = {} 

2142 _body_params: Optional[Any] = None 

2143 

2144 # process the query parameters 

2145 if limit is not None: 

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

2147 

2148 # process the query parameters 

2149 if pagination_key is not None: 

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

2151 

2152 # process the query parameters 

2153 if visitor_id is not None: 

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

2155 

2156 # process the query parameters 

2157 if high_recall_id is not None: 

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

2159 

2160 # process the query parameters 

2161 if bot is not None: 

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

2163 

2164 # process the query parameters 

2165 if bot_info is not None: 

2166 _query_params.append(('bot_info', bot_info.value)) 

2167 

2168 # process the query parameters 

2169 if bot_info_category is not None: 

2170 _query_params.append(('bot_info_category', bot_info_category)) 

2171 

2172 # process the query parameters 

2173 if bot_info_identity is not None: 

2174 _query_params.append(('bot_info_identity', bot_info_identity)) 

2175 

2176 # process the query parameters 

2177 if bot_info_confidence is not None: 

2178 _query_params.append(('bot_info_confidence', bot_info_confidence)) 

2179 

2180 # process the query parameters 

2181 if bot_info_provider is not None: 

2182 _query_params.append(('bot_info_provider', bot_info_provider)) 

2183 

2184 # process the query parameters 

2185 if bot_info_name is not None: 

2186 _query_params.append(('bot_info_name', bot_info_name)) 

2187 

2188 # process the query parameters 

2189 if ip_address is not None: 

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

2191 

2192 # process the query parameters 

2193 if asn is not None: 

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

2195 

2196 # process the query parameters 

2197 if linked_id is not None: 

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

2199 

2200 # process the query parameters 

2201 if url is not None: 

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

2203 

2204 # process the query parameters 

2205 if bundle_id is not None: 

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

2207 

2208 # process the query parameters 

2209 if package_name is not None: 

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

2211 

2212 # process the query parameters 

2213 if origin is not None: 

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

2215 

2216 # process the query parameters 

2217 if start is not None: 

2218 if isinstance(start, datetime): 

2219 _query_params.append(('start', start.isoformat(timespec='microseconds'))) 

2220 elif isinstance(start, date): 

2221 _query_params.append(('start', start.isoformat())) 

2222 else: 

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

2224 # process the query parameters 

2225 if end is not None: 

2226 if isinstance(end, datetime): 

2227 _query_params.append(('end', end.isoformat(timespec='microseconds'))) 

2228 elif isinstance(end, date): 

2229 _query_params.append(('end', end.isoformat())) 

2230 else: 

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

2232 # process the query parameters 

2233 if reverse is not None: 

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

2235 

2236 # process the query parameters 

2237 if suspect is not None: 

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

2239 

2240 # process the query parameters 

2241 if vpn is not None: 

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

2243 

2244 # process the query parameters 

2245 if virtual_machine is not None: 

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

2247 

2248 # process the query parameters 

2249 if tampering is not None: 

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

2251 

2252 # process the query parameters 

2253 if anti_detect_browser is not None: 

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

2255 

2256 # process the query parameters 

2257 if incognito is not None: 

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

2259 

2260 # process the query parameters 

2261 if privacy_settings is not None: 

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

2263 

2264 # process the query parameters 

2265 if jailbroken is not None: 

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

2267 

2268 # process the query parameters 

2269 if frida is not None: 

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

2271 

2272 # process the query parameters 

2273 if factory_reset is not None: 

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

2275 

2276 # process the query parameters 

2277 if cloned_app is not None: 

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

2279 

2280 # process the query parameters 

2281 if emulator is not None: 

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

2283 

2284 # process the query parameters 

2285 if root_apps is not None: 

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

2287 

2288 # process the query parameters 

2289 if vpn_confidence is not None: 

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

2291 

2292 # process the query parameters 

2293 if min_suspect_score is not None: 

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

2295 

2296 # process the query parameters 

2297 if developer_tools is not None: 

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

2299 

2300 # process the query parameters 

2301 if location_spoofing is not None: 

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

2303 

2304 # process the query parameters 

2305 if mitm_attack is not None: 

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

2307 

2308 # process the query parameters 

2309 if rare_device is not None: 

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

2311 

2312 # process the query parameters 

2313 if rare_device_percentile_bucket is not None: 

2314 _query_params.append( 

2315 ('rare_device_percentile_bucket', rare_device_percentile_bucket.value) 

2316 ) 

2317 

2318 # process the query parameters 

2319 if proxy is not None: 

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

2321 

2322 # process the query parameters 

2323 if sdk_version is not None: 

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

2325 

2326 # process the query parameters 

2327 if sdk_platform is not None: 

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

2329 

2330 # process the query parameters 

2331 if environment is not None: 

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

2333 

2334 # process the query parameters 

2335 if proximity_id is not None: 

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

2337 

2338 # process the query parameters 

2339 if total_hits is not None: 

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

2341 

2342 # process the query parameters 

2343 if tor_node is not None: 

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

2345 

2346 # process the query parameters 

2347 if incremental_identification_status is not None: 

2348 _query_params.append( 

2349 ('incremental_identification_status', incremental_identification_status.value) 

2350 ) 

2351 

2352 # process the query parameters 

2353 if simulator is not None: 

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

2355 

2356 # set the HTTP header `Accept` 

2357 if 'Accept' not in _header_params: 

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

2359 

2360 # authentication setting 

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

2362 

2363 return self.api_client.param_serialize( 

2364 method='GET', 

2365 resource_path='/events', 

2366 path_params=_path_params, 

2367 query_params=_query_params, 

2368 header_params=_header_params, 

2369 body=_body_params, 

2370 post_params=_form_params, 

2371 files=_files, 

2372 auth_settings=_auth_settings, 

2373 collection_formats=_collection_formats, 

2374 _request_auth=_request_auth, 

2375 ) 

2376 

2377 @validate_call 

2378 def update_event( 

2379 self, 

2380 event_id: Annotated[ 

2381 StrictStr, 

2382 Field( 

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

2384 ), 

2385 ], 

2386 event_update: EventUpdate, 

2387 _request_timeout: Union[ 

2388 None, 

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

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

2391 ] = None, 

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

2393 _content_type: Optional[StrictStr] = None, 

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

2395 ) -> None: 

2396 """Update an event 

2397 

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

2399 

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

2401 :type event_id: str 

2402 :param event_update: (required) 

2403 :type event_update: EventUpdate 

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

2405 number provided, it will be total request 

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

2407 (connection, read) timeouts. 

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

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

2410 request; this effectively ignores the 

2411 authentication in the spec for a single request. 

2412 :type _request_auth: dict, optional 

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

2414 :type _content_type: str, Optional 

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

2416 request; this effectively ignores the headers 

2417 in the spec for a single request. 

2418 :type _headers: dict, optional 

2419 :return: Returns the result object. 

2420 """ # noqa: E501 

2421 

2422 _param = self._update_event_serialize( 

2423 event_id=event_id, 

2424 event_update=event_update, 

2425 _request_auth=_request_auth, 

2426 _content_type=_content_type, 

2427 _headers=_headers, 

2428 ) 

2429 

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

2431 '200': None, 

2432 '400': 'ErrorResponse', 

2433 '403': 'ErrorResponse', 

2434 '404': 'ErrorResponse', 

2435 '409': 'ErrorResponse', 

2436 } 

2437 

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

2439 response_data.read() 

2440 self.api_client.response_deserialize( 

2441 response_data=response_data, 

2442 response_types_map=_response_types_map, 

2443 ) 

2444 

2445 @validate_call 

2446 def update_event_with_http_info( 

2447 self, 

2448 event_id: Annotated[ 

2449 StrictStr, 

2450 Field( 

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

2452 ), 

2453 ], 

2454 event_update: EventUpdate, 

2455 _request_timeout: Union[ 

2456 None, 

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

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

2459 ] = None, 

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

2461 _content_type: Optional[StrictStr] = None, 

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

2463 ) -> ApiResponse[None]: 

2464 """Update an event 

2465 

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

2467 

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

2469 :type event_id: str 

2470 :param event_update: (required) 

2471 :type event_update: EventUpdate 

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

2473 number provided, it will be total request 

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

2475 (connection, read) timeouts. 

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

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

2478 request; this effectively ignores the 

2479 authentication in the spec for a single request. 

2480 :type _request_auth: dict, optional 

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

2482 :type _content_type: str, Optional 

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

2484 request; this effectively ignores the headers 

2485 in the spec for a single request. 

2486 :type _headers: dict, optional 

2487 :return: Returns the result object. 

2488 """ # noqa: E501 

2489 

2490 _param = self._update_event_serialize( 

2491 event_id=event_id, 

2492 event_update=event_update, 

2493 _request_auth=_request_auth, 

2494 _content_type=_content_type, 

2495 _headers=_headers, 

2496 ) 

2497 

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

2499 '200': None, 

2500 '400': 'ErrorResponse', 

2501 '403': 'ErrorResponse', 

2502 '404': 'ErrorResponse', 

2503 '409': 'ErrorResponse', 

2504 } 

2505 

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

2507 response_data.read() 

2508 return self.api_client.response_deserialize( 

2509 response_data=response_data, 

2510 response_types_map=_response_types_map, 

2511 ) 

2512 

2513 @validate_call 

2514 def update_event_without_preload_content( 

2515 self, 

2516 event_id: Annotated[ 

2517 StrictStr, 

2518 Field( 

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

2520 ), 

2521 ], 

2522 event_update: EventUpdate, 

2523 _request_timeout: Union[ 

2524 None, 

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

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

2527 ] = None, 

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

2529 _content_type: Optional[StrictStr] = None, 

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

2531 ) -> RESTResponseType: 

2532 """Update an event 

2533 

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

2535 

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

2537 :type event_id: str 

2538 :param event_update: (required) 

2539 :type event_update: EventUpdate 

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

2541 number provided, it will be total request 

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

2543 (connection, read) timeouts. 

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

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

2546 request; this effectively ignores the 

2547 authentication in the spec for a single request. 

2548 :type _request_auth: dict, optional 

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

2550 :type _content_type: str, Optional 

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

2552 request; this effectively ignores the headers 

2553 in the spec for a single request. 

2554 :type _headers: dict, optional 

2555 :return: Returns the result object. 

2556 """ # noqa: E501 

2557 

2558 _param = self._update_event_serialize( 

2559 event_id=event_id, 

2560 event_update=event_update, 

2561 _request_auth=_request_auth, 

2562 _content_type=_content_type, 

2563 _headers=_headers, 

2564 ) 

2565 

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

2567 '200': None, 

2568 '400': 'ErrorResponse', 

2569 '403': 'ErrorResponse', 

2570 '404': 'ErrorResponse', 

2571 '409': 'ErrorResponse', 

2572 } 

2573 

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

2575 return response_data.response 

2576 

2577 def _update_event_serialize( 

2578 self, 

2579 event_id: str, 

2580 event_update: EventUpdate, 

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

2582 _content_type: Optional[StrictStr], 

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

2584 ) -> RequestSerialized: 

2585 

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

2587 

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

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

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

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

2592 _files: dict[ 

2593 str, 

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

2595 ] = {} 

2596 _body_params: Optional[Any] = None 

2597 

2598 # process the path parameters 

2599 if event_id is not None: 

2600 _path_params['event_id'] = event_id 

2601 

2602 # process the body parameter 

2603 if event_update is not None: 

2604 _body_params = event_update 

2605 

2606 # set the HTTP header `Accept` 

2607 if 'Accept' not in _header_params: 

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

2609 

2610 # set the HTTP header `Content-Type` 

2611 if _content_type: 

2612 _header_params['Content-Type'] = _content_type 

2613 else: 

2614 _default_content_type = self.api_client.select_header_content_type( 

2615 ['application/json'] 

2616 ) 

2617 if _default_content_type is not None: 

2618 _header_params['Content-Type'] = _default_content_type 

2619 

2620 # authentication setting 

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

2622 

2623 return self.api_client.param_serialize( 

2624 method='PATCH', 

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

2626 path_params=_path_params, 

2627 query_params=_query_params, 

2628 header_params=_header_params, 

2629 body=_body_params, 

2630 post_params=_form_params, 

2631 files=_files, 

2632 auth_settings=_auth_settings, 

2633 collection_formats=_collection_formats, 

2634 _request_auth=_request_auth, 

2635 )