stackgen-sdk 0.1.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. stackgen/__init__.py +52 -0
  2. stackgen/_http.py +96 -0
  3. stackgen/_version.py +24 -0
  4. stackgen/aiden/__init__.py +9 -0
  5. stackgen/aiden/namespace.py +26 -0
  6. stackgen/aiden/runs.py +36 -0
  7. stackgen/aiden/webhook.py +185 -0
  8. stackgen/cli.py +33 -0
  9. stackgen/client.py +31 -0
  10. stackgen/config.py +88 -0
  11. stackgen/errors.py +41 -0
  12. stackgen/generated/.openapi-generator/FILES +141 -0
  13. stackgen/generated/.openapi-generator/VERSION +1 -0
  14. stackgen/generated/.openapi-generator-ignore +23 -0
  15. stackgen/generated/__init__.py +131 -0
  16. stackgen/generated/api/__init__.py +6 -0
  17. stackgen/generated/api/aiden_api.py +1806 -0
  18. stackgen/generated/api/sre_api.py +1618 -0
  19. stackgen/generated/api_client.py +801 -0
  20. stackgen/generated/api_response.py +21 -0
  21. stackgen/generated/configuration.py +600 -0
  22. stackgen/generated/exceptions.py +216 -0
  23. stackgen/generated/models/__init__.py +57 -0
  24. stackgen/generated/models/alert_analysis_status.py +40 -0
  25. stackgen/generated/models/alert_attention.py +39 -0
  26. stackgen/generated/models/alert_categorization_summary.py +97 -0
  27. stackgen/generated/models/alert_role.py +38 -0
  28. stackgen/generated/models/alert_sort_by.py +37 -0
  29. stackgen/generated/models/alert_status.py +38 -0
  30. stackgen/generated/models/alert_summary.py +95 -0
  31. stackgen/generated/models/alert_sync_run_status.py +38 -0
  32. stackgen/generated/models/alert_v1.py +213 -0
  33. stackgen/generated/models/artifact_info.py +98 -0
  34. stackgen/generated/models/error_response.py +91 -0
  35. stackgen/generated/models/investigate_alert_request.py +91 -0
  36. stackgen/generated/models/investigate_response.py +91 -0
  37. stackgen/generated/models/investigation.py +167 -0
  38. stackgen/generated/models/investigation_evidence.py +114 -0
  39. stackgen/generated/models/investigation_evidence_kind.py +44 -0
  40. stackgen/generated/models/investigation_evidence_source.py +39 -0
  41. stackgen/generated/models/investigation_hypothesis.py +112 -0
  42. stackgen/generated/models/investigation_plain_summary.py +104 -0
  43. stackgen/generated/models/investigation_prior_incident.py +109 -0
  44. stackgen/generated/models/investigation_recommended_next_step.py +101 -0
  45. stackgen/generated/models/investigation_ref.py +118 -0
  46. stackgen/generated/models/investigation_status.py +42 -0
  47. stackgen/generated/models/investigation_structured_hypothesis_entry.py +115 -0
  48. stackgen/generated/models/investigation_structured_limitation_entry.py +120 -0
  49. stackgen/generated/models/investigation_structured_rca.py +139 -0
  50. stackgen/generated/models/investigation_triage_metadata.py +134 -0
  51. stackgen/generated/models/json_error.py +91 -0
  52. stackgen/generated/models/list_alerts_response.py +119 -0
  53. stackgen/generated/models/list_investigations_response.py +101 -0
  54. stackgen/generated/models/pagination.py +91 -0
  55. stackgen/generated/models/schedule_run_status.py +39 -0
  56. stackgen/generated/models/schedule_target_type.py +38 -0
  57. stackgen/generated/models/session.py +141 -0
  58. stackgen/generated/models/session_responder_kind.py +40 -0
  59. stackgen/generated/models/signal_severity.py +40 -0
  60. stackgen/generated/models/sync_response.py +136 -0
  61. stackgen/generated/models/trigger_webhook202_response.py +98 -0
  62. stackgen/generated/models/webhook_run.py +129 -0
  63. stackgen/generated/models/webhook_run_detail.py +136 -0
  64. stackgen/generated/models/webhook_run_list_response.py +97 -0
  65. stackgen/generated/rest.py +258 -0
  66. stackgen/sre/__init__.py +5 -0
  67. stackgen/sre/namespace.py +57 -0
  68. stackgen/vault/__init__.py +5 -0
  69. stackgen/vault/namespace.py +17 -0
  70. stackgen_sdk-0.1.1.dist-info/METADATA +60 -0
  71. stackgen_sdk-0.1.1.dist-info/RECORD +73 -0
  72. stackgen_sdk-0.1.1.dist-info/WHEEL +4 -0
  73. stackgen_sdk-0.1.1.dist-info/entry_points.txt +2 -0
@@ -0,0 +1,1618 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ StackGen External API
5
+
6
+ Allowlisted StackGen API surface for the public SDK. Managed via api-docs/product/allowlists/external.yaml.
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from stackgen.generated.models.alert_attention import AlertAttention
23
+ from stackgen.generated.models.alert_role import AlertRole
24
+ from stackgen.generated.models.alert_sort_by import AlertSortBy
25
+ from stackgen.generated.models.alert_status import AlertStatus
26
+ from stackgen.generated.models.alert_v1 import AlertV1
27
+ from stackgen.generated.models.investigate_alert_request import InvestigateAlertRequest
28
+ from stackgen.generated.models.investigate_response import InvestigateResponse
29
+ from stackgen.generated.models.investigation import Investigation
30
+ from stackgen.generated.models.investigation_status import InvestigationStatus
31
+ from stackgen.generated.models.list_alerts_response import ListAlertsResponse
32
+ from stackgen.generated.models.list_investigations_response import ListInvestigationsResponse
33
+ from stackgen.generated.models.signal_severity import SignalSeverity
34
+
35
+ from stackgen.generated.api_client import ApiClient, RequestSerialized
36
+ from stackgen.generated.api_response import ApiResponse
37
+ from stackgen.generated.rest import RESTResponseType
38
+
39
+
40
+ class SREApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, api_client=None) -> None:
48
+ if api_client is None:
49
+ api_client = ApiClient.get_default()
50
+ self.api_client = api_client
51
+
52
+
53
+ @validate_call
54
+ def get_alert_v1(
55
+ self,
56
+ id: Annotated[StrictStr, Field(description="Internal alert UUID or stable source external_uid.")],
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Annotated[StrictFloat, Field(gt=0)]
63
+ ]
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> AlertV1:
70
+ """Get a single alert by id (alert detail / per-alert read)
71
+
72
+ Returns one alert by internal UUID or by source external_uid (e.g. Grafana fingerprint). Use this for alert detail, per-alert reads, and recovering a full title when a list payload is truncated or compressed. Use external_uid for shareable deep links; pagination is not required.
73
+
74
+ :param id: Internal alert UUID or stable source external_uid. (required)
75
+ :type id: str
76
+ :param _request_timeout: timeout setting for this request. If one
77
+ number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :type _request_timeout: int, tuple(int, int), optional
81
+ :param _request_auth: set to override the auth_settings for an a single
82
+ request; this effectively ignores the
83
+ authentication in the spec for a single request.
84
+ :type _request_auth: dict, optional
85
+ :param _content_type: force content-type for the request.
86
+ :type _content_type: str, Optional
87
+ :param _headers: set to override the headers for a single
88
+ request; this effectively ignores the headers
89
+ in the spec for a single request.
90
+ :type _headers: dict, optional
91
+ :param _host_index: set to override the host_index for a single
92
+ request; this effectively ignores the host_index
93
+ in the spec for a single request.
94
+ :type _host_index: int, optional
95
+ :return: Returns the result object.
96
+ """ # noqa: E501
97
+
98
+ _param = self._get_alert_v1_serialize(
99
+ id=id,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ '200': "AlertV1",
108
+ '404': "ErrorResponse",
109
+ }
110
+ response_data = self.api_client.call_api(
111
+ *_param,
112
+ _request_timeout=_request_timeout
113
+ )
114
+ response_data.read()
115
+ return self.api_client.response_deserialize(
116
+ response_data=response_data,
117
+ response_types_map=_response_types_map,
118
+ ).data
119
+
120
+
121
+ @validate_call
122
+ def get_alert_v1_with_http_info(
123
+ self,
124
+ id: Annotated[StrictStr, Field(description="Internal alert UUID or stable source external_uid.")],
125
+ _request_timeout: Union[
126
+ None,
127
+ Annotated[StrictFloat, Field(gt=0)],
128
+ Tuple[
129
+ Annotated[StrictFloat, Field(gt=0)],
130
+ Annotated[StrictFloat, Field(gt=0)]
131
+ ]
132
+ ] = None,
133
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
134
+ _content_type: Optional[StrictStr] = None,
135
+ _headers: Optional[Dict[StrictStr, Any]] = None,
136
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
137
+ ) -> ApiResponse[AlertV1]:
138
+ """Get a single alert by id (alert detail / per-alert read)
139
+
140
+ Returns one alert by internal UUID or by source external_uid (e.g. Grafana fingerprint). Use this for alert detail, per-alert reads, and recovering a full title when a list payload is truncated or compressed. Use external_uid for shareable deep links; pagination is not required.
141
+
142
+ :param id: Internal alert UUID or stable source external_uid. (required)
143
+ :type id: str
144
+ :param _request_timeout: timeout setting for this request. If one
145
+ number provided, it will be total request
146
+ timeout. It can also be a pair (tuple) of
147
+ (connection, read) timeouts.
148
+ :type _request_timeout: int, tuple(int, int), optional
149
+ :param _request_auth: set to override the auth_settings for an a single
150
+ request; this effectively ignores the
151
+ authentication in the spec for a single request.
152
+ :type _request_auth: dict, optional
153
+ :param _content_type: force content-type for the request.
154
+ :type _content_type: str, Optional
155
+ :param _headers: set to override the headers for a single
156
+ request; this effectively ignores the headers
157
+ in the spec for a single request.
158
+ :type _headers: dict, optional
159
+ :param _host_index: set to override the host_index for a single
160
+ request; this effectively ignores the host_index
161
+ in the spec for a single request.
162
+ :type _host_index: int, optional
163
+ :return: Returns the result object.
164
+ """ # noqa: E501
165
+
166
+ _param = self._get_alert_v1_serialize(
167
+ id=id,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index
172
+ )
173
+
174
+ _response_types_map: Dict[str, Optional[str]] = {
175
+ '200': "AlertV1",
176
+ '404': "ErrorResponse",
177
+ }
178
+ response_data = self.api_client.call_api(
179
+ *_param,
180
+ _request_timeout=_request_timeout
181
+ )
182
+ response_data.read()
183
+ return self.api_client.response_deserialize(
184
+ response_data=response_data,
185
+ response_types_map=_response_types_map,
186
+ )
187
+
188
+
189
+ @validate_call
190
+ def get_alert_v1_without_preload_content(
191
+ self,
192
+ id: Annotated[StrictStr, Field(description="Internal alert UUID or stable source external_uid.")],
193
+ _request_timeout: Union[
194
+ None,
195
+ Annotated[StrictFloat, Field(gt=0)],
196
+ Tuple[
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Annotated[StrictFloat, Field(gt=0)]
199
+ ]
200
+ ] = None,
201
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
+ _content_type: Optional[StrictStr] = None,
203
+ _headers: Optional[Dict[StrictStr, Any]] = None,
204
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
+ ) -> RESTResponseType:
206
+ """Get a single alert by id (alert detail / per-alert read)
207
+
208
+ Returns one alert by internal UUID or by source external_uid (e.g. Grafana fingerprint). Use this for alert detail, per-alert reads, and recovering a full title when a list payload is truncated or compressed. Use external_uid for shareable deep links; pagination is not required.
209
+
210
+ :param id: Internal alert UUID or stable source external_uid. (required)
211
+ :type id: str
212
+ :param _request_timeout: timeout setting for this request. If one
213
+ number provided, it will be total request
214
+ timeout. It can also be a pair (tuple) of
215
+ (connection, read) timeouts.
216
+ :type _request_timeout: int, tuple(int, int), optional
217
+ :param _request_auth: set to override the auth_settings for an a single
218
+ request; this effectively ignores the
219
+ authentication in the spec for a single request.
220
+ :type _request_auth: dict, optional
221
+ :param _content_type: force content-type for the request.
222
+ :type _content_type: str, Optional
223
+ :param _headers: set to override the headers for a single
224
+ request; this effectively ignores the headers
225
+ in the spec for a single request.
226
+ :type _headers: dict, optional
227
+ :param _host_index: set to override the host_index for a single
228
+ request; this effectively ignores the host_index
229
+ in the spec for a single request.
230
+ :type _host_index: int, optional
231
+ :return: Returns the result object.
232
+ """ # noqa: E501
233
+
234
+ _param = self._get_alert_v1_serialize(
235
+ id=id,
236
+ _request_auth=_request_auth,
237
+ _content_type=_content_type,
238
+ _headers=_headers,
239
+ _host_index=_host_index
240
+ )
241
+
242
+ _response_types_map: Dict[str, Optional[str]] = {
243
+ '200': "AlertV1",
244
+ '404': "ErrorResponse",
245
+ }
246
+ response_data = self.api_client.call_api(
247
+ *_param,
248
+ _request_timeout=_request_timeout
249
+ )
250
+ return response_data.response
251
+
252
+
253
+ def _get_alert_v1_serialize(
254
+ self,
255
+ id,
256
+ _request_auth,
257
+ _content_type,
258
+ _headers,
259
+ _host_index,
260
+ ) -> RequestSerialized:
261
+
262
+ _host = None
263
+
264
+ _collection_formats: Dict[str, str] = {
265
+ }
266
+
267
+ _path_params: Dict[str, str] = {}
268
+ _query_params: List[Tuple[str, str]] = []
269
+ _header_params: Dict[str, Optional[str]] = _headers or {}
270
+ _form_params: List[Tuple[str, str]] = []
271
+ _files: Dict[
272
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
273
+ ] = {}
274
+ _body_params: Optional[bytes] = None
275
+
276
+ # process the path parameters
277
+ if id is not None:
278
+ _path_params['id'] = id
279
+ # process the query parameters
280
+ # process the header parameters
281
+ # process the form parameters
282
+ # process the body parameter
283
+
284
+
285
+ # set the HTTP header `Accept`
286
+ if 'Accept' not in _header_params:
287
+ _header_params['Accept'] = self.api_client.select_header_accept(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+
293
+
294
+ # authentication setting
295
+ _auth_settings: List[str] = [
296
+ 'ApiToken'
297
+ ]
298
+
299
+ return self.api_client.param_serialize(
300
+ method='GET',
301
+ resource_path='/app/sre/api/v1/alerts/{id}',
302
+ path_params=_path_params,
303
+ query_params=_query_params,
304
+ header_params=_header_params,
305
+ body=_body_params,
306
+ post_params=_form_params,
307
+ files=_files,
308
+ auth_settings=_auth_settings,
309
+ collection_formats=_collection_formats,
310
+ _host=_host,
311
+ _request_auth=_request_auth
312
+ )
313
+
314
+
315
+
316
+
317
+ @validate_call
318
+ def get_investigation(
319
+ self,
320
+ id: StrictStr,
321
+ _request_timeout: Union[
322
+ None,
323
+ Annotated[StrictFloat, Field(gt=0)],
324
+ Tuple[
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Annotated[StrictFloat, Field(gt=0)]
327
+ ]
328
+ ] = None,
329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
330
+ _content_type: Optional[StrictStr] = None,
331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
333
+ ) -> Investigation:
334
+ """Get investigation details, evidence, and RCA by ID
335
+
336
+ Returns the complete caller-scoped investigation identified by its UUID, including lifecycle state, result summary, evidence, and RCA fields when available. Use this operation for investigation details or status when the investigation ID is already known; use listInvestigations first when the ID is unknown.
337
+
338
+ :param id: (required)
339
+ :type id: str
340
+ :param _request_timeout: timeout setting for this request. If one
341
+ number provided, it will be total request
342
+ timeout. It can also be a pair (tuple) of
343
+ (connection, read) timeouts.
344
+ :type _request_timeout: int, tuple(int, int), optional
345
+ :param _request_auth: set to override the auth_settings for an a single
346
+ request; this effectively ignores the
347
+ authentication in the spec for a single request.
348
+ :type _request_auth: dict, optional
349
+ :param _content_type: force content-type for the request.
350
+ :type _content_type: str, Optional
351
+ :param _headers: set to override the headers for a single
352
+ request; this effectively ignores the headers
353
+ in the spec for a single request.
354
+ :type _headers: dict, optional
355
+ :param _host_index: set to override the host_index for a single
356
+ request; this effectively ignores the host_index
357
+ in the spec for a single request.
358
+ :type _host_index: int, optional
359
+ :return: Returns the result object.
360
+ """ # noqa: E501
361
+
362
+ _param = self._get_investigation_serialize(
363
+ id=id,
364
+ _request_auth=_request_auth,
365
+ _content_type=_content_type,
366
+ _headers=_headers,
367
+ _host_index=_host_index
368
+ )
369
+
370
+ _response_types_map: Dict[str, Optional[str]] = {
371
+ '200': "Investigation",
372
+ '404': "ErrorResponse",
373
+ }
374
+ response_data = self.api_client.call_api(
375
+ *_param,
376
+ _request_timeout=_request_timeout
377
+ )
378
+ response_data.read()
379
+ return self.api_client.response_deserialize(
380
+ response_data=response_data,
381
+ response_types_map=_response_types_map,
382
+ ).data
383
+
384
+
385
+ @validate_call
386
+ def get_investigation_with_http_info(
387
+ self,
388
+ id: StrictStr,
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Annotated[StrictFloat, Field(gt=0)]
395
+ ]
396
+ ] = None,
397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
398
+ _content_type: Optional[StrictStr] = None,
399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
401
+ ) -> ApiResponse[Investigation]:
402
+ """Get investigation details, evidence, and RCA by ID
403
+
404
+ Returns the complete caller-scoped investigation identified by its UUID, including lifecycle state, result summary, evidence, and RCA fields when available. Use this operation for investigation details or status when the investigation ID is already known; use listInvestigations first when the ID is unknown.
405
+
406
+ :param id: (required)
407
+ :type id: str
408
+ :param _request_timeout: timeout setting for this request. If one
409
+ number provided, it will be total request
410
+ timeout. It can also be a pair (tuple) of
411
+ (connection, read) timeouts.
412
+ :type _request_timeout: int, tuple(int, int), optional
413
+ :param _request_auth: set to override the auth_settings for an a single
414
+ request; this effectively ignores the
415
+ authentication in the spec for a single request.
416
+ :type _request_auth: dict, optional
417
+ :param _content_type: force content-type for the request.
418
+ :type _content_type: str, Optional
419
+ :param _headers: set to override the headers for a single
420
+ request; this effectively ignores the headers
421
+ in the spec for a single request.
422
+ :type _headers: dict, optional
423
+ :param _host_index: set to override the host_index for a single
424
+ request; this effectively ignores the host_index
425
+ in the spec for a single request.
426
+ :type _host_index: int, optional
427
+ :return: Returns the result object.
428
+ """ # noqa: E501
429
+
430
+ _param = self._get_investigation_serialize(
431
+ id=id,
432
+ _request_auth=_request_auth,
433
+ _content_type=_content_type,
434
+ _headers=_headers,
435
+ _host_index=_host_index
436
+ )
437
+
438
+ _response_types_map: Dict[str, Optional[str]] = {
439
+ '200': "Investigation",
440
+ '404': "ErrorResponse",
441
+ }
442
+ response_data = self.api_client.call_api(
443
+ *_param,
444
+ _request_timeout=_request_timeout
445
+ )
446
+ response_data.read()
447
+ return self.api_client.response_deserialize(
448
+ response_data=response_data,
449
+ response_types_map=_response_types_map,
450
+ )
451
+
452
+
453
+ @validate_call
454
+ def get_investigation_without_preload_content(
455
+ self,
456
+ id: StrictStr,
457
+ _request_timeout: Union[
458
+ None,
459
+ Annotated[StrictFloat, Field(gt=0)],
460
+ Tuple[
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Annotated[StrictFloat, Field(gt=0)]
463
+ ]
464
+ ] = None,
465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
466
+ _content_type: Optional[StrictStr] = None,
467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
469
+ ) -> RESTResponseType:
470
+ """Get investigation details, evidence, and RCA by ID
471
+
472
+ Returns the complete caller-scoped investigation identified by its UUID, including lifecycle state, result summary, evidence, and RCA fields when available. Use this operation for investigation details or status when the investigation ID is already known; use listInvestigations first when the ID is unknown.
473
+
474
+ :param id: (required)
475
+ :type id: str
476
+ :param _request_timeout: timeout setting for this request. If one
477
+ number provided, it will be total request
478
+ timeout. It can also be a pair (tuple) of
479
+ (connection, read) timeouts.
480
+ :type _request_timeout: int, tuple(int, int), optional
481
+ :param _request_auth: set to override the auth_settings for an a single
482
+ request; this effectively ignores the
483
+ authentication in the spec for a single request.
484
+ :type _request_auth: dict, optional
485
+ :param _content_type: force content-type for the request.
486
+ :type _content_type: str, Optional
487
+ :param _headers: set to override the headers for a single
488
+ request; this effectively ignores the headers
489
+ in the spec for a single request.
490
+ :type _headers: dict, optional
491
+ :param _host_index: set to override the host_index for a single
492
+ request; this effectively ignores the host_index
493
+ in the spec for a single request.
494
+ :type _host_index: int, optional
495
+ :return: Returns the result object.
496
+ """ # noqa: E501
497
+
498
+ _param = self._get_investigation_serialize(
499
+ id=id,
500
+ _request_auth=_request_auth,
501
+ _content_type=_content_type,
502
+ _headers=_headers,
503
+ _host_index=_host_index
504
+ )
505
+
506
+ _response_types_map: Dict[str, Optional[str]] = {
507
+ '200': "Investigation",
508
+ '404': "ErrorResponse",
509
+ }
510
+ response_data = self.api_client.call_api(
511
+ *_param,
512
+ _request_timeout=_request_timeout
513
+ )
514
+ return response_data.response
515
+
516
+
517
+ def _get_investigation_serialize(
518
+ self,
519
+ id,
520
+ _request_auth,
521
+ _content_type,
522
+ _headers,
523
+ _host_index,
524
+ ) -> RequestSerialized:
525
+
526
+ _host = None
527
+
528
+ _collection_formats: Dict[str, str] = {
529
+ }
530
+
531
+ _path_params: Dict[str, str] = {}
532
+ _query_params: List[Tuple[str, str]] = []
533
+ _header_params: Dict[str, Optional[str]] = _headers or {}
534
+ _form_params: List[Tuple[str, str]] = []
535
+ _files: Dict[
536
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
537
+ ] = {}
538
+ _body_params: Optional[bytes] = None
539
+
540
+ # process the path parameters
541
+ if id is not None:
542
+ _path_params['id'] = id
543
+ # process the query parameters
544
+ # process the header parameters
545
+ # process the form parameters
546
+ # process the body parameter
547
+
548
+
549
+ # set the HTTP header `Accept`
550
+ if 'Accept' not in _header_params:
551
+ _header_params['Accept'] = self.api_client.select_header_accept(
552
+ [
553
+ 'application/json'
554
+ ]
555
+ )
556
+
557
+
558
+ # authentication setting
559
+ _auth_settings: List[str] = [
560
+ 'ApiToken'
561
+ ]
562
+
563
+ return self.api_client.param_serialize(
564
+ method='GET',
565
+ resource_path='/app/sre/api/v1/investigations/{id}',
566
+ path_params=_path_params,
567
+ query_params=_query_params,
568
+ header_params=_header_params,
569
+ body=_body_params,
570
+ post_params=_form_params,
571
+ files=_files,
572
+ auth_settings=_auth_settings,
573
+ collection_formats=_collection_formats,
574
+ _host=_host,
575
+ _request_auth=_request_auth
576
+ )
577
+
578
+
579
+
580
+
581
+ @validate_call
582
+ def investigate_alert(
583
+ self,
584
+ id: StrictStr,
585
+ investigate_alert_request: Optional[InvestigateAlertRequest] = None,
586
+ _request_timeout: Union[
587
+ None,
588
+ Annotated[StrictFloat, Field(gt=0)],
589
+ Tuple[
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Annotated[StrictFloat, Field(gt=0)]
592
+ ]
593
+ ] = None,
594
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
595
+ _content_type: Optional[StrictStr] = None,
596
+ _headers: Optional[Dict[StrictStr, Any]] = None,
597
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
598
+ ) -> InvestigateResponse:
599
+ """Start or retrieve a deep-dive investigation
600
+
601
+ If no investigation exists for this alert, creates an investigations row and launches a Aiden workflow. If one already exists (any status), returns it unchanged.
602
+
603
+ :param id: (required)
604
+ :type id: str
605
+ :param investigate_alert_request:
606
+ :type investigate_alert_request: InvestigateAlertRequest
607
+ :param _request_timeout: timeout setting for this request. If one
608
+ number provided, it will be total request
609
+ timeout. It can also be a pair (tuple) of
610
+ (connection, read) timeouts.
611
+ :type _request_timeout: int, tuple(int, int), optional
612
+ :param _request_auth: set to override the auth_settings for an a single
613
+ request; this effectively ignores the
614
+ authentication in the spec for a single request.
615
+ :type _request_auth: dict, optional
616
+ :param _content_type: force content-type for the request.
617
+ :type _content_type: str, Optional
618
+ :param _headers: set to override the headers for a single
619
+ request; this effectively ignores the headers
620
+ in the spec for a single request.
621
+ :type _headers: dict, optional
622
+ :param _host_index: set to override the host_index for a single
623
+ request; this effectively ignores the host_index
624
+ in the spec for a single request.
625
+ :type _host_index: int, optional
626
+ :return: Returns the result object.
627
+ """ # noqa: E501
628
+
629
+ _param = self._investigate_alert_serialize(
630
+ id=id,
631
+ investigate_alert_request=investigate_alert_request,
632
+ _request_auth=_request_auth,
633
+ _content_type=_content_type,
634
+ _headers=_headers,
635
+ _host_index=_host_index
636
+ )
637
+
638
+ _response_types_map: Dict[str, Optional[str]] = {
639
+ '200': "InvestigateResponse",
640
+ '404': "ErrorResponse",
641
+ }
642
+ response_data = self.api_client.call_api(
643
+ *_param,
644
+ _request_timeout=_request_timeout
645
+ )
646
+ response_data.read()
647
+ return self.api_client.response_deserialize(
648
+ response_data=response_data,
649
+ response_types_map=_response_types_map,
650
+ ).data
651
+
652
+
653
+ @validate_call
654
+ def investigate_alert_with_http_info(
655
+ self,
656
+ id: StrictStr,
657
+ investigate_alert_request: Optional[InvestigateAlertRequest] = None,
658
+ _request_timeout: Union[
659
+ None,
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Tuple[
662
+ Annotated[StrictFloat, Field(gt=0)],
663
+ Annotated[StrictFloat, Field(gt=0)]
664
+ ]
665
+ ] = None,
666
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
667
+ _content_type: Optional[StrictStr] = None,
668
+ _headers: Optional[Dict[StrictStr, Any]] = None,
669
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
670
+ ) -> ApiResponse[InvestigateResponse]:
671
+ """Start or retrieve a deep-dive investigation
672
+
673
+ If no investigation exists for this alert, creates an investigations row and launches a Aiden workflow. If one already exists (any status), returns it unchanged.
674
+
675
+ :param id: (required)
676
+ :type id: str
677
+ :param investigate_alert_request:
678
+ :type investigate_alert_request: InvestigateAlertRequest
679
+ :param _request_timeout: timeout setting for this request. If one
680
+ number provided, it will be total request
681
+ timeout. It can also be a pair (tuple) of
682
+ (connection, read) timeouts.
683
+ :type _request_timeout: int, tuple(int, int), optional
684
+ :param _request_auth: set to override the auth_settings for an a single
685
+ request; this effectively ignores the
686
+ authentication in the spec for a single request.
687
+ :type _request_auth: dict, optional
688
+ :param _content_type: force content-type for the request.
689
+ :type _content_type: str, Optional
690
+ :param _headers: set to override the headers for a single
691
+ request; this effectively ignores the headers
692
+ in the spec for a single request.
693
+ :type _headers: dict, optional
694
+ :param _host_index: set to override the host_index for a single
695
+ request; this effectively ignores the host_index
696
+ in the spec for a single request.
697
+ :type _host_index: int, optional
698
+ :return: Returns the result object.
699
+ """ # noqa: E501
700
+
701
+ _param = self._investigate_alert_serialize(
702
+ id=id,
703
+ investigate_alert_request=investigate_alert_request,
704
+ _request_auth=_request_auth,
705
+ _content_type=_content_type,
706
+ _headers=_headers,
707
+ _host_index=_host_index
708
+ )
709
+
710
+ _response_types_map: Dict[str, Optional[str]] = {
711
+ '200': "InvestigateResponse",
712
+ '404': "ErrorResponse",
713
+ }
714
+ response_data = self.api_client.call_api(
715
+ *_param,
716
+ _request_timeout=_request_timeout
717
+ )
718
+ response_data.read()
719
+ return self.api_client.response_deserialize(
720
+ response_data=response_data,
721
+ response_types_map=_response_types_map,
722
+ )
723
+
724
+
725
+ @validate_call
726
+ def investigate_alert_without_preload_content(
727
+ self,
728
+ id: StrictStr,
729
+ investigate_alert_request: Optional[InvestigateAlertRequest] = None,
730
+ _request_timeout: Union[
731
+ None,
732
+ Annotated[StrictFloat, Field(gt=0)],
733
+ Tuple[
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Annotated[StrictFloat, Field(gt=0)]
736
+ ]
737
+ ] = None,
738
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
739
+ _content_type: Optional[StrictStr] = None,
740
+ _headers: Optional[Dict[StrictStr, Any]] = None,
741
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
742
+ ) -> RESTResponseType:
743
+ """Start or retrieve a deep-dive investigation
744
+
745
+ If no investigation exists for this alert, creates an investigations row and launches a Aiden workflow. If one already exists (any status), returns it unchanged.
746
+
747
+ :param id: (required)
748
+ :type id: str
749
+ :param investigate_alert_request:
750
+ :type investigate_alert_request: InvestigateAlertRequest
751
+ :param _request_timeout: timeout setting for this request. If one
752
+ number provided, it will be total request
753
+ timeout. It can also be a pair (tuple) of
754
+ (connection, read) timeouts.
755
+ :type _request_timeout: int, tuple(int, int), optional
756
+ :param _request_auth: set to override the auth_settings for an a single
757
+ request; this effectively ignores the
758
+ authentication in the spec for a single request.
759
+ :type _request_auth: dict, optional
760
+ :param _content_type: force content-type for the request.
761
+ :type _content_type: str, Optional
762
+ :param _headers: set to override the headers for a single
763
+ request; this effectively ignores the headers
764
+ in the spec for a single request.
765
+ :type _headers: dict, optional
766
+ :param _host_index: set to override the host_index for a single
767
+ request; this effectively ignores the host_index
768
+ in the spec for a single request.
769
+ :type _host_index: int, optional
770
+ :return: Returns the result object.
771
+ """ # noqa: E501
772
+
773
+ _param = self._investigate_alert_serialize(
774
+ id=id,
775
+ investigate_alert_request=investigate_alert_request,
776
+ _request_auth=_request_auth,
777
+ _content_type=_content_type,
778
+ _headers=_headers,
779
+ _host_index=_host_index
780
+ )
781
+
782
+ _response_types_map: Dict[str, Optional[str]] = {
783
+ '200': "InvestigateResponse",
784
+ '404': "ErrorResponse",
785
+ }
786
+ response_data = self.api_client.call_api(
787
+ *_param,
788
+ _request_timeout=_request_timeout
789
+ )
790
+ return response_data.response
791
+
792
+
793
+ def _investigate_alert_serialize(
794
+ self,
795
+ id,
796
+ investigate_alert_request,
797
+ _request_auth,
798
+ _content_type,
799
+ _headers,
800
+ _host_index,
801
+ ) -> RequestSerialized:
802
+
803
+ _host = None
804
+
805
+ _collection_formats: Dict[str, str] = {
806
+ }
807
+
808
+ _path_params: Dict[str, str] = {}
809
+ _query_params: List[Tuple[str, str]] = []
810
+ _header_params: Dict[str, Optional[str]] = _headers or {}
811
+ _form_params: List[Tuple[str, str]] = []
812
+ _files: Dict[
813
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
814
+ ] = {}
815
+ _body_params: Optional[bytes] = None
816
+
817
+ # process the path parameters
818
+ if id is not None:
819
+ _path_params['id'] = id
820
+ # process the query parameters
821
+ # process the header parameters
822
+ # process the form parameters
823
+ # process the body parameter
824
+ if investigate_alert_request is not None:
825
+ _body_params = investigate_alert_request
826
+
827
+
828
+ # set the HTTP header `Accept`
829
+ if 'Accept' not in _header_params:
830
+ _header_params['Accept'] = self.api_client.select_header_accept(
831
+ [
832
+ 'application/json'
833
+ ]
834
+ )
835
+
836
+ # set the HTTP header `Content-Type`
837
+ if _content_type:
838
+ _header_params['Content-Type'] = _content_type
839
+ else:
840
+ _default_content_type = (
841
+ self.api_client.select_header_content_type(
842
+ [
843
+ 'application/json'
844
+ ]
845
+ )
846
+ )
847
+ if _default_content_type is not None:
848
+ _header_params['Content-Type'] = _default_content_type
849
+
850
+ # authentication setting
851
+ _auth_settings: List[str] = [
852
+ 'ApiToken'
853
+ ]
854
+
855
+ return self.api_client.param_serialize(
856
+ method='POST',
857
+ resource_path='/app/sre/api/v1/alerts/{id}/investigate',
858
+ path_params=_path_params,
859
+ query_params=_query_params,
860
+ header_params=_header_params,
861
+ body=_body_params,
862
+ post_params=_form_params,
863
+ files=_files,
864
+ auth_settings=_auth_settings,
865
+ collection_formats=_collection_formats,
866
+ _host=_host,
867
+ _request_auth=_request_auth
868
+ )
869
+
870
+
871
+
872
+
873
+ @validate_call
874
+ def list_alerts(
875
+ self,
876
+ status: Annotated[Optional[AlertStatus], Field(description="Filter by alert lifecycle status. Defaults to \"active\".")] = None,
877
+ attention: Annotated[Optional[AlertAttention], Field(description="Optional filter by triage attention category.")] = None,
878
+ source_type: Annotated[Optional[StrictStr], Field(description="Optional filter by alert source (e.g. \"grafana\").")] = None,
879
+ integration_names: Annotated[Optional[List[Annotated[str, Field(min_length=1, strict=True)]]], Field(description="Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided. ")] = None,
880
+ storm_id: Annotated[Optional[StrictStr], Field(description="Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation). ")] = None,
881
+ q: Annotated[Optional[StrictStr], Field(description="Optional case-insensitive search across alert titles and descriptions.")] = None,
882
+ signal_severity: Annotated[Optional[SignalSeverity], Field(description="Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination. ")] = None,
883
+ alert_role: Annotated[Optional[AlertRole], Field(description="Optional filter by correlated alert role (root signal vs downstream effect). ")] = None,
884
+ sort_by: Annotated[Optional[AlertSortBy], Field(description="List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break. ")] = None,
885
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
886
+ page_size: Optional[Annotated[int, Field(le=500, strict=True, ge=1)]] = None,
887
+ _request_timeout: Union[
888
+ None,
889
+ Annotated[StrictFloat, Field(gt=0)],
890
+ Tuple[
891
+ Annotated[StrictFloat, Field(gt=0)],
892
+ Annotated[StrictFloat, Field(gt=0)]
893
+ ]
894
+ ] = None,
895
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
896
+ _content_type: Optional[StrictStr] = None,
897
+ _headers: Optional[Dict[StrictStr, Any]] = None,
898
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
899
+ ) -> ListAlertsResponse:
900
+ """List or count alerts with filters and summary totals
901
+
902
+ Returns a paginated alert inventory plus summary totals. Use this operation for \"list alerts\", \"count alerts\", firing-alert inventory, queue filtering, and alert searches. Read the response summary for counts instead of counting the current page. The summary is always for status=active; use `status` to switch the returned list between the Active tab (default) and Ignored tab. When listing titles and the tool result is truncated or compressed, read visible `id` values and call GET /api/v1/alerts/{id} (getAlertV1) per alert — do not invent titles.
903
+
904
+ :param status: Filter by alert lifecycle status. Defaults to \"active\".
905
+ :type status: AlertStatus
906
+ :param attention: Optional filter by triage attention category.
907
+ :type attention: AlertAttention
908
+ :param source_type: Optional filter by alert source (e.g. \"grafana\").
909
+ :type source_type: str
910
+ :param integration_names: Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided.
911
+ :type integration_names: List[str]
912
+ :param storm_id: Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation).
913
+ :type storm_id: str
914
+ :param q: Optional case-insensitive search across alert titles and descriptions.
915
+ :type q: str
916
+ :param signal_severity: Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination.
917
+ :type signal_severity: SignalSeverity
918
+ :param alert_role: Optional filter by correlated alert role (root signal vs downstream effect).
919
+ :type alert_role: AlertRole
920
+ :param sort_by: List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break.
921
+ :type sort_by: AlertSortBy
922
+ :param page:
923
+ :type page: int
924
+ :param page_size:
925
+ :type page_size: int
926
+ :param _request_timeout: timeout setting for this request. If one
927
+ number provided, it will be total request
928
+ timeout. It can also be a pair (tuple) of
929
+ (connection, read) timeouts.
930
+ :type _request_timeout: int, tuple(int, int), optional
931
+ :param _request_auth: set to override the auth_settings for an a single
932
+ request; this effectively ignores the
933
+ authentication in the spec for a single request.
934
+ :type _request_auth: dict, optional
935
+ :param _content_type: force content-type for the request.
936
+ :type _content_type: str, Optional
937
+ :param _headers: set to override the headers for a single
938
+ request; this effectively ignores the headers
939
+ in the spec for a single request.
940
+ :type _headers: dict, optional
941
+ :param _host_index: set to override the host_index for a single
942
+ request; this effectively ignores the host_index
943
+ in the spec for a single request.
944
+ :type _host_index: int, optional
945
+ :return: Returns the result object.
946
+ """ # noqa: E501
947
+
948
+ _param = self._list_alerts_serialize(
949
+ status=status,
950
+ attention=attention,
951
+ source_type=source_type,
952
+ integration_names=integration_names,
953
+ storm_id=storm_id,
954
+ q=q,
955
+ signal_severity=signal_severity,
956
+ alert_role=alert_role,
957
+ sort_by=sort_by,
958
+ page=page,
959
+ page_size=page_size,
960
+ _request_auth=_request_auth,
961
+ _content_type=_content_type,
962
+ _headers=_headers,
963
+ _host_index=_host_index
964
+ )
965
+
966
+ _response_types_map: Dict[str, Optional[str]] = {
967
+ '200': "ListAlertsResponse",
968
+ }
969
+ response_data = self.api_client.call_api(
970
+ *_param,
971
+ _request_timeout=_request_timeout
972
+ )
973
+ response_data.read()
974
+ return self.api_client.response_deserialize(
975
+ response_data=response_data,
976
+ response_types_map=_response_types_map,
977
+ ).data
978
+
979
+
980
+ @validate_call
981
+ def list_alerts_with_http_info(
982
+ self,
983
+ status: Annotated[Optional[AlertStatus], Field(description="Filter by alert lifecycle status. Defaults to \"active\".")] = None,
984
+ attention: Annotated[Optional[AlertAttention], Field(description="Optional filter by triage attention category.")] = None,
985
+ source_type: Annotated[Optional[StrictStr], Field(description="Optional filter by alert source (e.g. \"grafana\").")] = None,
986
+ integration_names: Annotated[Optional[List[Annotated[str, Field(min_length=1, strict=True)]]], Field(description="Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided. ")] = None,
987
+ storm_id: Annotated[Optional[StrictStr], Field(description="Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation). ")] = None,
988
+ q: Annotated[Optional[StrictStr], Field(description="Optional case-insensitive search across alert titles and descriptions.")] = None,
989
+ signal_severity: Annotated[Optional[SignalSeverity], Field(description="Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination. ")] = None,
990
+ alert_role: Annotated[Optional[AlertRole], Field(description="Optional filter by correlated alert role (root signal vs downstream effect). ")] = None,
991
+ sort_by: Annotated[Optional[AlertSortBy], Field(description="List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break. ")] = None,
992
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
993
+ page_size: Optional[Annotated[int, Field(le=500, strict=True, ge=1)]] = None,
994
+ _request_timeout: Union[
995
+ None,
996
+ Annotated[StrictFloat, Field(gt=0)],
997
+ Tuple[
998
+ Annotated[StrictFloat, Field(gt=0)],
999
+ Annotated[StrictFloat, Field(gt=0)]
1000
+ ]
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> ApiResponse[ListAlertsResponse]:
1007
+ """List or count alerts with filters and summary totals
1008
+
1009
+ Returns a paginated alert inventory plus summary totals. Use this operation for \"list alerts\", \"count alerts\", firing-alert inventory, queue filtering, and alert searches. Read the response summary for counts instead of counting the current page. The summary is always for status=active; use `status` to switch the returned list between the Active tab (default) and Ignored tab. When listing titles and the tool result is truncated or compressed, read visible `id` values and call GET /api/v1/alerts/{id} (getAlertV1) per alert — do not invent titles.
1010
+
1011
+ :param status: Filter by alert lifecycle status. Defaults to \"active\".
1012
+ :type status: AlertStatus
1013
+ :param attention: Optional filter by triage attention category.
1014
+ :type attention: AlertAttention
1015
+ :param source_type: Optional filter by alert source (e.g. \"grafana\").
1016
+ :type source_type: str
1017
+ :param integration_names: Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided.
1018
+ :type integration_names: List[str]
1019
+ :param storm_id: Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation).
1020
+ :type storm_id: str
1021
+ :param q: Optional case-insensitive search across alert titles and descriptions.
1022
+ :type q: str
1023
+ :param signal_severity: Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination.
1024
+ :type signal_severity: SignalSeverity
1025
+ :param alert_role: Optional filter by correlated alert role (root signal vs downstream effect).
1026
+ :type alert_role: AlertRole
1027
+ :param sort_by: List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break.
1028
+ :type sort_by: AlertSortBy
1029
+ :param page:
1030
+ :type page: int
1031
+ :param page_size:
1032
+ :type page_size: int
1033
+ :param _request_timeout: timeout setting for this request. If one
1034
+ number provided, it will be total request
1035
+ timeout. It can also be a pair (tuple) of
1036
+ (connection, read) timeouts.
1037
+ :type _request_timeout: int, tuple(int, int), optional
1038
+ :param _request_auth: set to override the auth_settings for an a single
1039
+ request; this effectively ignores the
1040
+ authentication in the spec for a single request.
1041
+ :type _request_auth: dict, optional
1042
+ :param _content_type: force content-type for the request.
1043
+ :type _content_type: str, Optional
1044
+ :param _headers: set to override the headers for a single
1045
+ request; this effectively ignores the headers
1046
+ in the spec for a single request.
1047
+ :type _headers: dict, optional
1048
+ :param _host_index: set to override the host_index for a single
1049
+ request; this effectively ignores the host_index
1050
+ in the spec for a single request.
1051
+ :type _host_index: int, optional
1052
+ :return: Returns the result object.
1053
+ """ # noqa: E501
1054
+
1055
+ _param = self._list_alerts_serialize(
1056
+ status=status,
1057
+ attention=attention,
1058
+ source_type=source_type,
1059
+ integration_names=integration_names,
1060
+ storm_id=storm_id,
1061
+ q=q,
1062
+ signal_severity=signal_severity,
1063
+ alert_role=alert_role,
1064
+ sort_by=sort_by,
1065
+ page=page,
1066
+ page_size=page_size,
1067
+ _request_auth=_request_auth,
1068
+ _content_type=_content_type,
1069
+ _headers=_headers,
1070
+ _host_index=_host_index
1071
+ )
1072
+
1073
+ _response_types_map: Dict[str, Optional[str]] = {
1074
+ '200': "ListAlertsResponse",
1075
+ }
1076
+ response_data = self.api_client.call_api(
1077
+ *_param,
1078
+ _request_timeout=_request_timeout
1079
+ )
1080
+ response_data.read()
1081
+ return self.api_client.response_deserialize(
1082
+ response_data=response_data,
1083
+ response_types_map=_response_types_map,
1084
+ )
1085
+
1086
+
1087
+ @validate_call
1088
+ def list_alerts_without_preload_content(
1089
+ self,
1090
+ status: Annotated[Optional[AlertStatus], Field(description="Filter by alert lifecycle status. Defaults to \"active\".")] = None,
1091
+ attention: Annotated[Optional[AlertAttention], Field(description="Optional filter by triage attention category.")] = None,
1092
+ source_type: Annotated[Optional[StrictStr], Field(description="Optional filter by alert source (e.g. \"grafana\").")] = None,
1093
+ integration_names: Annotated[Optional[List[Annotated[str, Field(min_length=1, strict=True)]]], Field(description="Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided. ")] = None,
1094
+ storm_id: Annotated[Optional[StrictStr], Field(description="Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation). ")] = None,
1095
+ q: Annotated[Optional[StrictStr], Field(description="Optional case-insensitive search across alert titles and descriptions.")] = None,
1096
+ signal_severity: Annotated[Optional[SignalSeverity], Field(description="Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination. ")] = None,
1097
+ alert_role: Annotated[Optional[AlertRole], Field(description="Optional filter by correlated alert role (root signal vs downstream effect). ")] = None,
1098
+ sort_by: Annotated[Optional[AlertSortBy], Field(description="List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break. ")] = None,
1099
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
1100
+ page_size: Optional[Annotated[int, Field(le=500, strict=True, ge=1)]] = None,
1101
+ _request_timeout: Union[
1102
+ None,
1103
+ Annotated[StrictFloat, Field(gt=0)],
1104
+ Tuple[
1105
+ Annotated[StrictFloat, Field(gt=0)],
1106
+ Annotated[StrictFloat, Field(gt=0)]
1107
+ ]
1108
+ ] = None,
1109
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1110
+ _content_type: Optional[StrictStr] = None,
1111
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1112
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1113
+ ) -> RESTResponseType:
1114
+ """List or count alerts with filters and summary totals
1115
+
1116
+ Returns a paginated alert inventory plus summary totals. Use this operation for \"list alerts\", \"count alerts\", firing-alert inventory, queue filtering, and alert searches. Read the response summary for counts instead of counting the current page. The summary is always for status=active; use `status` to switch the returned list between the Active tab (default) and Ignored tab. When listing titles and the tool result is truncated or compressed, read visible `id` values and call GET /api/v1/alerts/{id} (getAlertV1) per alert — do not invent titles.
1117
+
1118
+ :param status: Filter by alert lifecycle status. Defaults to \"active\".
1119
+ :type status: AlertStatus
1120
+ :param attention: Optional filter by triage attention category.
1121
+ :type attention: AlertAttention
1122
+ :param source_type: Optional filter by alert source (e.g. \"grafana\").
1123
+ :type source_type: str
1124
+ :param integration_names: Optional filter by one or more integration instance names (e.g. prod-grafana, sandbox-observenow). Summary counts and the alert list are scoped to these integrations when provided.
1125
+ :type integration_names: List[str]
1126
+ :param storm_id: Optional filter by correlated incident storm UUID. Returns all active alerts in the same ingest storm (for linked-alert navigation).
1127
+ :type storm_id: str
1128
+ :param q: Optional case-insensitive search across alert titles and descriptions.
1129
+ :type q: str
1130
+ :param signal_severity: Optional filter by normalized monitor signal severity (Critical, High, Medium, Low, info). Matches raw upstream source_severity values in each bucket before pagination.
1131
+ :type signal_severity: SignalSeverity
1132
+ :param alert_role: Optional filter by correlated alert role (root signal vs downstream effect).
1133
+ :type alert_role: AlertRole
1134
+ :param sort_by: List ordering. `severity` (default) ranks by monitor display_priority. `impact` ranks by persisted blast-radius impact (env, scope, storm fanout) before severity as a tie-break.
1135
+ :type sort_by: AlertSortBy
1136
+ :param page:
1137
+ :type page: int
1138
+ :param page_size:
1139
+ :type page_size: int
1140
+ :param _request_timeout: timeout setting for this request. If one
1141
+ number provided, it will be total request
1142
+ timeout. It can also be a pair (tuple) of
1143
+ (connection, read) timeouts.
1144
+ :type _request_timeout: int, tuple(int, int), optional
1145
+ :param _request_auth: set to override the auth_settings for an a single
1146
+ request; this effectively ignores the
1147
+ authentication in the spec for a single request.
1148
+ :type _request_auth: dict, optional
1149
+ :param _content_type: force content-type for the request.
1150
+ :type _content_type: str, Optional
1151
+ :param _headers: set to override the headers for a single
1152
+ request; this effectively ignores the headers
1153
+ in the spec for a single request.
1154
+ :type _headers: dict, optional
1155
+ :param _host_index: set to override the host_index for a single
1156
+ request; this effectively ignores the host_index
1157
+ in the spec for a single request.
1158
+ :type _host_index: int, optional
1159
+ :return: Returns the result object.
1160
+ """ # noqa: E501
1161
+
1162
+ _param = self._list_alerts_serialize(
1163
+ status=status,
1164
+ attention=attention,
1165
+ source_type=source_type,
1166
+ integration_names=integration_names,
1167
+ storm_id=storm_id,
1168
+ q=q,
1169
+ signal_severity=signal_severity,
1170
+ alert_role=alert_role,
1171
+ sort_by=sort_by,
1172
+ page=page,
1173
+ page_size=page_size,
1174
+ _request_auth=_request_auth,
1175
+ _content_type=_content_type,
1176
+ _headers=_headers,
1177
+ _host_index=_host_index
1178
+ )
1179
+
1180
+ _response_types_map: Dict[str, Optional[str]] = {
1181
+ '200': "ListAlertsResponse",
1182
+ }
1183
+ response_data = self.api_client.call_api(
1184
+ *_param,
1185
+ _request_timeout=_request_timeout
1186
+ )
1187
+ return response_data.response
1188
+
1189
+
1190
+ def _list_alerts_serialize(
1191
+ self,
1192
+ status,
1193
+ attention,
1194
+ source_type,
1195
+ integration_names,
1196
+ storm_id,
1197
+ q,
1198
+ signal_severity,
1199
+ alert_role,
1200
+ sort_by,
1201
+ page,
1202
+ page_size,
1203
+ _request_auth,
1204
+ _content_type,
1205
+ _headers,
1206
+ _host_index,
1207
+ ) -> RequestSerialized:
1208
+
1209
+ _host = None
1210
+
1211
+ _collection_formats: Dict[str, str] = {
1212
+ 'integration_names': 'csv',
1213
+ }
1214
+
1215
+ _path_params: Dict[str, str] = {}
1216
+ _query_params: List[Tuple[str, str]] = []
1217
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1218
+ _form_params: List[Tuple[str, str]] = []
1219
+ _files: Dict[
1220
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1221
+ ] = {}
1222
+ _body_params: Optional[bytes] = None
1223
+
1224
+ # process the path parameters
1225
+ # process the query parameters
1226
+ if status is not None:
1227
+
1228
+ _query_params.append(('status', status.value))
1229
+
1230
+ if attention is not None:
1231
+
1232
+ _query_params.append(('attention', attention.value))
1233
+
1234
+ if source_type is not None:
1235
+
1236
+ _query_params.append(('source_type', source_type))
1237
+
1238
+ if integration_names is not None:
1239
+
1240
+ _query_params.append(('integration_names', integration_names))
1241
+
1242
+ if storm_id is not None:
1243
+
1244
+ _query_params.append(('storm_id', storm_id))
1245
+
1246
+ if q is not None:
1247
+
1248
+ _query_params.append(('q', q))
1249
+
1250
+ if signal_severity is not None:
1251
+
1252
+ _query_params.append(('signal_severity', signal_severity.value))
1253
+
1254
+ if alert_role is not None:
1255
+
1256
+ _query_params.append(('alert_role', alert_role.value))
1257
+
1258
+ if sort_by is not None:
1259
+
1260
+ _query_params.append(('sort_by', sort_by.value))
1261
+
1262
+ if page is not None:
1263
+
1264
+ _query_params.append(('page', page))
1265
+
1266
+ if page_size is not None:
1267
+
1268
+ _query_params.append(('page_size', page_size))
1269
+
1270
+ # process the header parameters
1271
+ # process the form parameters
1272
+ # process the body parameter
1273
+
1274
+
1275
+ # set the HTTP header `Accept`
1276
+ if 'Accept' not in _header_params:
1277
+ _header_params['Accept'] = self.api_client.select_header_accept(
1278
+ [
1279
+ 'application/json'
1280
+ ]
1281
+ )
1282
+
1283
+
1284
+ # authentication setting
1285
+ _auth_settings: List[str] = [
1286
+ 'ApiToken'
1287
+ ]
1288
+
1289
+ return self.api_client.param_serialize(
1290
+ method='GET',
1291
+ resource_path='/app/sre/api/v1/alerts',
1292
+ path_params=_path_params,
1293
+ query_params=_query_params,
1294
+ header_params=_header_params,
1295
+ body=_body_params,
1296
+ post_params=_form_params,
1297
+ files=_files,
1298
+ auth_settings=_auth_settings,
1299
+ collection_formats=_collection_formats,
1300
+ _host=_host,
1301
+ _request_auth=_request_auth
1302
+ )
1303
+
1304
+
1305
+
1306
+
1307
+ @validate_call
1308
+ def list_investigations(
1309
+ self,
1310
+ status: Annotated[Optional[InvestigationStatus], Field(description="Optional status filter.")] = None,
1311
+ alert_id: Annotated[Optional[StrictStr], Field(description="Filter to investigations for a single alert (UUID).")] = None,
1312
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
1313
+ page_size: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
1314
+ _request_timeout: Union[
1315
+ None,
1316
+ Annotated[StrictFloat, Field(gt=0)],
1317
+ Tuple[
1318
+ Annotated[StrictFloat, Field(gt=0)],
1319
+ Annotated[StrictFloat, Field(gt=0)]
1320
+ ]
1321
+ ] = None,
1322
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1323
+ _content_type: Optional[StrictStr] = None,
1324
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1325
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1326
+ ) -> ListInvestigationsResponse:
1327
+ """List or count investigations by status for the caller
1328
+
1329
+ Returns a paginated investigation inventory ordered by start time (most recent first) and scoped to the caller's tenant/owner. Use this operation for \"list investigations\", \"count investigations\", queued or completed investigation questions, and status re-checks. Read `total` for the full filtered count instead of counting the current page. Optional `status` narrows the result to one lifecycle bucket.
1330
+
1331
+ :param status: Optional status filter.
1332
+ :type status: InvestigationStatus
1333
+ :param alert_id: Filter to investigations for a single alert (UUID).
1334
+ :type alert_id: str
1335
+ :param page:
1336
+ :type page: int
1337
+ :param page_size:
1338
+ :type page_size: int
1339
+ :param _request_timeout: timeout setting for this request. If one
1340
+ number provided, it will be total request
1341
+ timeout. It can also be a pair (tuple) of
1342
+ (connection, read) timeouts.
1343
+ :type _request_timeout: int, tuple(int, int), optional
1344
+ :param _request_auth: set to override the auth_settings for an a single
1345
+ request; this effectively ignores the
1346
+ authentication in the spec for a single request.
1347
+ :type _request_auth: dict, optional
1348
+ :param _content_type: force content-type for the request.
1349
+ :type _content_type: str, Optional
1350
+ :param _headers: set to override the headers for a single
1351
+ request; this effectively ignores the headers
1352
+ in the spec for a single request.
1353
+ :type _headers: dict, optional
1354
+ :param _host_index: set to override the host_index for a single
1355
+ request; this effectively ignores the host_index
1356
+ in the spec for a single request.
1357
+ :type _host_index: int, optional
1358
+ :return: Returns the result object.
1359
+ """ # noqa: E501
1360
+
1361
+ _param = self._list_investigations_serialize(
1362
+ status=status,
1363
+ alert_id=alert_id,
1364
+ page=page,
1365
+ page_size=page_size,
1366
+ _request_auth=_request_auth,
1367
+ _content_type=_content_type,
1368
+ _headers=_headers,
1369
+ _host_index=_host_index
1370
+ )
1371
+
1372
+ _response_types_map: Dict[str, Optional[str]] = {
1373
+ '200': "ListInvestigationsResponse",
1374
+ }
1375
+ response_data = self.api_client.call_api(
1376
+ *_param,
1377
+ _request_timeout=_request_timeout
1378
+ )
1379
+ response_data.read()
1380
+ return self.api_client.response_deserialize(
1381
+ response_data=response_data,
1382
+ response_types_map=_response_types_map,
1383
+ ).data
1384
+
1385
+
1386
+ @validate_call
1387
+ def list_investigations_with_http_info(
1388
+ self,
1389
+ status: Annotated[Optional[InvestigationStatus], Field(description="Optional status filter.")] = None,
1390
+ alert_id: Annotated[Optional[StrictStr], Field(description="Filter to investigations for a single alert (UUID).")] = None,
1391
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
1392
+ page_size: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
1393
+ _request_timeout: Union[
1394
+ None,
1395
+ Annotated[StrictFloat, Field(gt=0)],
1396
+ Tuple[
1397
+ Annotated[StrictFloat, Field(gt=0)],
1398
+ Annotated[StrictFloat, Field(gt=0)]
1399
+ ]
1400
+ ] = None,
1401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1402
+ _content_type: Optional[StrictStr] = None,
1403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1405
+ ) -> ApiResponse[ListInvestigationsResponse]:
1406
+ """List or count investigations by status for the caller
1407
+
1408
+ Returns a paginated investigation inventory ordered by start time (most recent first) and scoped to the caller's tenant/owner. Use this operation for \"list investigations\", \"count investigations\", queued or completed investigation questions, and status re-checks. Read `total` for the full filtered count instead of counting the current page. Optional `status` narrows the result to one lifecycle bucket.
1409
+
1410
+ :param status: Optional status filter.
1411
+ :type status: InvestigationStatus
1412
+ :param alert_id: Filter to investigations for a single alert (UUID).
1413
+ :type alert_id: str
1414
+ :param page:
1415
+ :type page: int
1416
+ :param page_size:
1417
+ :type page_size: int
1418
+ :param _request_timeout: timeout setting for this request. If one
1419
+ number provided, it will be total request
1420
+ timeout. It can also be a pair (tuple) of
1421
+ (connection, read) timeouts.
1422
+ :type _request_timeout: int, tuple(int, int), optional
1423
+ :param _request_auth: set to override the auth_settings for an a single
1424
+ request; this effectively ignores the
1425
+ authentication in the spec for a single request.
1426
+ :type _request_auth: dict, optional
1427
+ :param _content_type: force content-type for the request.
1428
+ :type _content_type: str, Optional
1429
+ :param _headers: set to override the headers for a single
1430
+ request; this effectively ignores the headers
1431
+ in the spec for a single request.
1432
+ :type _headers: dict, optional
1433
+ :param _host_index: set to override the host_index for a single
1434
+ request; this effectively ignores the host_index
1435
+ in the spec for a single request.
1436
+ :type _host_index: int, optional
1437
+ :return: Returns the result object.
1438
+ """ # noqa: E501
1439
+
1440
+ _param = self._list_investigations_serialize(
1441
+ status=status,
1442
+ alert_id=alert_id,
1443
+ page=page,
1444
+ page_size=page_size,
1445
+ _request_auth=_request_auth,
1446
+ _content_type=_content_type,
1447
+ _headers=_headers,
1448
+ _host_index=_host_index
1449
+ )
1450
+
1451
+ _response_types_map: Dict[str, Optional[str]] = {
1452
+ '200': "ListInvestigationsResponse",
1453
+ }
1454
+ response_data = self.api_client.call_api(
1455
+ *_param,
1456
+ _request_timeout=_request_timeout
1457
+ )
1458
+ response_data.read()
1459
+ return self.api_client.response_deserialize(
1460
+ response_data=response_data,
1461
+ response_types_map=_response_types_map,
1462
+ )
1463
+
1464
+
1465
+ @validate_call
1466
+ def list_investigations_without_preload_content(
1467
+ self,
1468
+ status: Annotated[Optional[InvestigationStatus], Field(description="Optional status filter.")] = None,
1469
+ alert_id: Annotated[Optional[StrictStr], Field(description="Filter to investigations for a single alert (UUID).")] = None,
1470
+ page: Optional[Annotated[int, Field(strict=True, ge=1)]] = None,
1471
+ page_size: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None,
1472
+ _request_timeout: Union[
1473
+ None,
1474
+ Annotated[StrictFloat, Field(gt=0)],
1475
+ Tuple[
1476
+ Annotated[StrictFloat, Field(gt=0)],
1477
+ Annotated[StrictFloat, Field(gt=0)]
1478
+ ]
1479
+ ] = None,
1480
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1481
+ _content_type: Optional[StrictStr] = None,
1482
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1483
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1484
+ ) -> RESTResponseType:
1485
+ """List or count investigations by status for the caller
1486
+
1487
+ Returns a paginated investigation inventory ordered by start time (most recent first) and scoped to the caller's tenant/owner. Use this operation for \"list investigations\", \"count investigations\", queued or completed investigation questions, and status re-checks. Read `total` for the full filtered count instead of counting the current page. Optional `status` narrows the result to one lifecycle bucket.
1488
+
1489
+ :param status: Optional status filter.
1490
+ :type status: InvestigationStatus
1491
+ :param alert_id: Filter to investigations for a single alert (UUID).
1492
+ :type alert_id: str
1493
+ :param page:
1494
+ :type page: int
1495
+ :param page_size:
1496
+ :type page_size: int
1497
+ :param _request_timeout: timeout setting for this request. If one
1498
+ number provided, it will be total request
1499
+ timeout. It can also be a pair (tuple) of
1500
+ (connection, read) timeouts.
1501
+ :type _request_timeout: int, tuple(int, int), optional
1502
+ :param _request_auth: set to override the auth_settings for an a single
1503
+ request; this effectively ignores the
1504
+ authentication in the spec for a single request.
1505
+ :type _request_auth: dict, optional
1506
+ :param _content_type: force content-type for the request.
1507
+ :type _content_type: str, Optional
1508
+ :param _headers: set to override the headers for a single
1509
+ request; this effectively ignores the headers
1510
+ in the spec for a single request.
1511
+ :type _headers: dict, optional
1512
+ :param _host_index: set to override the host_index for a single
1513
+ request; this effectively ignores the host_index
1514
+ in the spec for a single request.
1515
+ :type _host_index: int, optional
1516
+ :return: Returns the result object.
1517
+ """ # noqa: E501
1518
+
1519
+ _param = self._list_investigations_serialize(
1520
+ status=status,
1521
+ alert_id=alert_id,
1522
+ page=page,
1523
+ page_size=page_size,
1524
+ _request_auth=_request_auth,
1525
+ _content_type=_content_type,
1526
+ _headers=_headers,
1527
+ _host_index=_host_index
1528
+ )
1529
+
1530
+ _response_types_map: Dict[str, Optional[str]] = {
1531
+ '200': "ListInvestigationsResponse",
1532
+ }
1533
+ response_data = self.api_client.call_api(
1534
+ *_param,
1535
+ _request_timeout=_request_timeout
1536
+ )
1537
+ return response_data.response
1538
+
1539
+
1540
+ def _list_investigations_serialize(
1541
+ self,
1542
+ status,
1543
+ alert_id,
1544
+ page,
1545
+ page_size,
1546
+ _request_auth,
1547
+ _content_type,
1548
+ _headers,
1549
+ _host_index,
1550
+ ) -> RequestSerialized:
1551
+
1552
+ _host = None
1553
+
1554
+ _collection_formats: Dict[str, str] = {
1555
+ }
1556
+
1557
+ _path_params: Dict[str, str] = {}
1558
+ _query_params: List[Tuple[str, str]] = []
1559
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1560
+ _form_params: List[Tuple[str, str]] = []
1561
+ _files: Dict[
1562
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1563
+ ] = {}
1564
+ _body_params: Optional[bytes] = None
1565
+
1566
+ # process the path parameters
1567
+ # process the query parameters
1568
+ if status is not None:
1569
+
1570
+ _query_params.append(('status', status.value))
1571
+
1572
+ if alert_id is not None:
1573
+
1574
+ _query_params.append(('alert_id', alert_id))
1575
+
1576
+ if page is not None:
1577
+
1578
+ _query_params.append(('page', page))
1579
+
1580
+ if page_size is not None:
1581
+
1582
+ _query_params.append(('page_size', page_size))
1583
+
1584
+ # process the header parameters
1585
+ # process the form parameters
1586
+ # process the body parameter
1587
+
1588
+
1589
+ # set the HTTP header `Accept`
1590
+ if 'Accept' not in _header_params:
1591
+ _header_params['Accept'] = self.api_client.select_header_accept(
1592
+ [
1593
+ 'application/json'
1594
+ ]
1595
+ )
1596
+
1597
+
1598
+ # authentication setting
1599
+ _auth_settings: List[str] = [
1600
+ 'ApiToken'
1601
+ ]
1602
+
1603
+ return self.api_client.param_serialize(
1604
+ method='GET',
1605
+ resource_path='/app/sre/api/v1/investigations',
1606
+ path_params=_path_params,
1607
+ query_params=_query_params,
1608
+ header_params=_header_params,
1609
+ body=_body_params,
1610
+ post_params=_form_params,
1611
+ files=_files,
1612
+ auth_settings=_auth_settings,
1613
+ collection_formats=_collection_formats,
1614
+ _host=_host,
1615
+ _request_auth=_request_auth
1616
+ )
1617
+
1618
+