@@ -197,6 +197,44 @@ components:
197
197
items:
198
198
$ref: '#/components/schemas/IncidentRelatedObject'
199
199
type: array
200
+ IncidentSearchIncludeQueryParameter:
201
+ description: Specifies which types of related objects should be included in
202
+ the response.
203
+ in: query
204
+ name: include
205
+ required: false
206
+ schema:
207
+ $ref: '#/components/schemas/IncidentRelatedObject'
208
+ IncidentSearchQueryQueryParameter:
209
+ description: 'Specifies which incidents should be returned. After entering a
210
+ search query in your [Incidents page][1],
211
+
212
+ use the query parameter value in the URL of the page as the value for this
213
+ parameter.
214
+
215
+
216
+ The query can contain any number of incident facets joined by `ANDs`, along
217
+ with multiple values for each of
218
+
219
+ those facets joined by `OR`s, for instance: `query="state:active AND severity:(SEV-2
220
+ OR SEV-1)"`.
221
+
222
+
223
+ [1]: https://app.datadoghq.com/incidents'
224
+ explode: false
225
+ in: query
226
+ name: query
227
+ required: true
228
+ schema:
229
+ type: string
230
+ IncidentSearchSortQueryParameter:
231
+ description: Specifies the order of returned incidents.
232
+ explode: false
233
+ in: query
234
+ name: sort
235
+ required: false
236
+ schema:
237
+ $ref: '#/components/schemas/IncidentSearchSortOrder'
200
238
IncidentServiceIDPathParameter:
201
239
description: The ID of the incident service.
202
240
in: path
@@ -4010,6 +4048,220 @@ components:
4010
4048
last_modified_by_user:
4011
4049
$ref: '#/components/schemas/RelationshipToUser'
4012
4050
type: object
4051
+ IncidentSearchResponse:
4052
+ description: Response with incidents and facets.
4053
+ properties:
4054
+ data:
4055
+ $ref: '#/components/schemas/IncidentSearchResponseData'
4056
+ included:
4057
+ description: Included related resources that the user requested.
4058
+ items:
4059
+ $ref: '#/components/schemas/IncidentResponseIncludedItem'
4060
+ readOnly: true
4061
+ type: array
4062
+ required:
4063
+ - data
4064
+ type: object
4065
+ IncidentSearchResponseAttributes:
4066
+ description: Attributes returned by an incident search.
4067
+ properties:
4068
+ facets:
4069
+ $ref: '#/components/schemas/IncidentSearchResponseFacetsData'
4070
+ incidents:
4071
+ description: Incidents returned by the search.
4072
+ items:
4073
+ $ref: '#/components/schemas/IncidentSearchResponseIncidentsData'
4074
+ type: array
4075
+ total:
4076
+ description: Number of incidents returned by the search.
4077
+ example: 10
4078
+ format: int32
4079
+ maximum: 2147483647
4080
+ type: integer
4081
+ required:
4082
+ - facets
4083
+ - incidents
4084
+ - total
4085
+ type: object
4086
+ IncidentSearchResponseData:
4087
+ description: Data returned by an incident search.
4088
+ properties:
4089
+ attributes:
4090
+ $ref: '#/components/schemas/IncidentSearchResponseAttributes'
4091
+ type:
4092
+ $ref: '#/components/schemas/IncidentSearchResultsType'
4093
+ type: object
4094
+ IncidentSearchResponseFacetCount:
4095
+ description: Count of the facet value appearing in search results.
4096
+ example: 5
4097
+ format: int32
4098
+ maximum: 2147483647
4099
+ type: integer
4100
+ IncidentSearchResponseFacetsData:
4101
+ description: Facet data for incidents returned by a search query.
4102
+ properties:
4103
+ commander:
4104
+ description: Facet data for incident commander users.
4105
+ items:
4106
+ $ref: '#/components/schemas/IncidentSearchResponseUserFacetData'
4107
+ type: array
4108
+ created_by:
4109
+ description: Facet data for incident creator users.
4110
+ items:
4111
+ $ref: '#/components/schemas/IncidentSearchResponseUserFacetData'
4112
+ type: array
4113
+ fields:
4114
+ description: Facet data for incident property fields.
4115
+ items:
4116
+ $ref: '#/components/schemas/IncidentSearchResponsePropertyFieldFacetData'
4117
+ type: array
4118
+ impact:
4119
+ description: Facet data for incident impact attributes.
4120
+ items:
4121
+ $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData'
4122
+ type: array
4123
+ last_modified_by:
4124
+ description: Facet data for incident last modified by users.
4125
+ items:
4126
+ $ref: '#/components/schemas/IncidentSearchResponseUserFacetData'
4127
+ type: array
4128
+ postmortem:
4129
+ description: Facet data for incident postmortem existence.
4130
+ items:
4131
+ $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData'
4132
+ type: array
4133
+ responder:
4134
+ description: Facet data for incident responder users.
4135
+ items:
4136
+ $ref: '#/components/schemas/IncidentSearchResponseUserFacetData'
4137
+ type: array
4138
+ severity:
4139
+ description: Facet data for incident severity attributes.
4140
+ items:
4141
+ $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData'
4142
+ type: array
4143
+ state:
4144
+ description: Facet data for incident state attributes.
4145
+ items:
4146
+ $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData'
4147
+ type: array
4148
+ time_to_repair:
4149
+ description: Facet data for incident time to repair metrics.
4150
+ items:
4151
+ $ref: '#/components/schemas/IncidentSearchResponseNumericFacetData'
4152
+ type: array
4153
+ time_to_resolve:
4154
+ description: Facet data for incident time to resolve metrics.
4155
+ items:
4156
+ $ref: '#/components/schemas/IncidentSearchResponseNumericFacetData'
4157
+ type: array
4158
+ type: object
4159
+ IncidentSearchResponseFieldFacetData:
4160
+ description: Facet value and number of occurrences for a property field of an
4161
+ incident.
4162
+ properties:
4163
+ count:
4164
+ $ref: '#/components/schemas/IncidentSearchResponseFacetCount'
4165
+ name:
4166
+ description: The facet value appearing in search results.
4167
+ example: SEV-2
4168
+ type: string
4169
+ type: object
4170
+ IncidentSearchResponseIncidentsData:
4171
+ description: Incident returned by the search.
4172
+ properties:
4173
+ data:
4174
+ $ref: '#/components/schemas/IncidentResponseData'
4175
+ required:
4176
+ - data
4177
+ type: object
4178
+ IncidentSearchResponseNumericFacetData:
4179
+ description: Facet data numeric attributes of an incident.
4180
+ properties:
4181
+ aggregates:
4182
+ $ref: '#/components/schemas/IncidentSearchResponseNumericFacetDataAggregates'
4183
+ name:
4184
+ description: Name of the incident property field.
4185
+ example: time_to_repair
4186
+ type: string
4187
+ required:
4188
+ - name
4189
+ - aggregates
4190
+ type: object
4191
+ IncidentSearchResponseNumericFacetDataAggregates:
4192
+ description: Aggregate information for numeric incident data.
4193
+ properties:
4194
+ max:
4195
+ description: Maximum value of the numeric aggregates.
4196
+ example: 1234.0
4197
+ format: double
4198
+ nullable: true
4199
+ type: number
4200
+ min:
4201
+ description: Minimum value of the numeric aggregates.
4202
+ example: 20.0
4203
+ format: double
4204
+ nullable: true
4205
+ type: number
4206
+ type: object
4207
+ IncidentSearchResponsePropertyFieldFacetData:
4208
+ description: Facet data for the incident property fields.
4209
+ properties:
4210
+ aggregates:
4211
+ $ref: '#/components/schemas/IncidentSearchResponseNumericFacetDataAggregates'
4212
+ facets:
4213
+ description: Facet data for the property field of an incident.
4214
+ items:
4215
+ $ref: '#/components/schemas/IncidentSearchResponseFieldFacetData'
4216
+ type: array
4217
+ name:
4218
+ description: Name of the incident property field.
4219
+ example: Severity
4220
+ type: string
4221
+ required:
4222
+ - facets
4223
+ - name
4224
+ type: object
4225
+ IncidentSearchResponseUserFacetData:
4226
+ description: Facet data for user attributes of an incident.
4227
+ properties:
4228
+ count:
4229
+ $ref: '#/components/schemas/IncidentSearchResponseFacetCount'
4230
+ email:
4231
+ description: Email of the user.
4232
+
4233
+ type: string
4234
+ handle:
4235
+ description: Handle of the user.
4236
+
4237
+ type: string
4238
+ name:
4239
+ description: Name of the user.
4240
+ example: Datadog User
4241
+ type: string
4242
+ uuid:
4243
+ description: ID of the user.
4244
+ example: 773b045d-ccf8-4808-bd3b-955ef6a8c940
4245
+ type: string
4246
+ type: object
4247
+ IncidentSearchResultsType:
4248
+ default: incidents_search_results
4249
+ description: Incident search result type.
4250
+ enum:
4251
+ - incidents_search_results
4252
+ example: incidents_search_results
4253
+ type: string
4254
+ x-enum-varnames:
4255
+ - INCIDENTS_SEARCH_RESULTS
4256
+ IncidentSearchSortOrder:
4257
+ description: The ways searched incidents can be sorted.
4258
+ enum:
4259
+ - created
4260
+ - -created
4261
+ type: string
4262
+ x-enum-varnames:
4263
+ - CREATED_ASCENDING
4264
+ - CREATED_DESCENDING
4013
4265
IncidentServiceCreateAttributes:
4014
4266
description: The incident service's attributes for a create request.
4015
4267
properties:
@@ -13185,6 +13437,42 @@ paths:
13185
13437
x-unstable: '**Note**: This endpoint is in public beta.
13186
13438
13187
13439
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
13440
+ /api/v2/incidents/search:
13441
+ get:
13442
+ description: Search for incidents matching a certain query.
13443
+ operationId: SearchIncidents
13444
+ parameters:
13445
+ - $ref: '#/components/parameters/IncidentSearchIncludeQueryParameter'
13446
+ - $ref: '#/components/parameters/IncidentSearchQueryQueryParameter'
13447
+ - $ref: '#/components/parameters/IncidentSearchSortQueryParameter'
13448
+ responses:
13449
+ '200':
13450
+ content:
13451
+ application/json:
13452
+ schema:
13453
+ $ref: '#/components/schemas/IncidentSearchResponse'
13454
+ description: OK
13455
+ '400':
13456
+ $ref: '#/components/responses/BadRequestResponse'
13457
+ '401':
13458
+ $ref: '#/components/responses/UnauthorizedResponse'
13459
+ '403':
13460
+ $ref: '#/components/responses/ForbiddenResponse'
13461
+ '404':
13462
+ $ref: '#/components/responses/NotFoundResponse'
13463
+ '429':
13464
+ $ref: '#/components/responses/TooManyRequestsResponse'
13465
+ security:
13466
+ - apiKeyAuth: []
13467
+ appKeyAuth: []
13468
+ - AuthZ:
13469
+ - incident_read
13470
+ summary: Search for incidents
13471
+ tags:
13472
+ - Incidents
13473
+ x-unstable: '**Note**: This endpoint is in public beta.
13474
+
13475
+ If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
13188
13476
/api/v2/incidents/{incident_id}:
13189
13477
delete:
13190
13478
description: Deletes an existing incident from the users organization.
0 commit comments