incidents
Creates, updates, deletes, gets or lists an incidents resource.
Overview
| Name | incidents | 
| Type | Resource | 
| Id | datadog.service_management.incidents | 
Fields
The following fields are returned by SELECT queries:
- get_incident
- list_incidents
- search_incidents
| Name | Datatype | Description | 
|---|---|---|
| id | string | The incident's ID. (example: 00000000-0000-0000-1234-000000000000) | 
| attributes | object | The incident's attributes from a response. | 
| relationships | object | The incident's relationships from a response. | 
| type | string | Incident resource type. (default: incidents, example: incidents) | 
| Name | Datatype | Description | 
|---|---|---|
| id | string | The incident's ID. (example: 00000000-0000-0000-1234-000000000000) | 
| attributes | object | The incident's attributes from a response. | 
| relationships | object | The incident's relationships from a response. | 
| type | string | Incident resource type. (default: incidents, example: incidents) | 
| Name | Datatype | Description | 
|---|---|---|
| attributes | object | Attributes returned by an incident search. | 
| type | string | Incident search result type. (default: incidents_search_results, example: incidents_search_results) | 
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description | 
|---|---|---|---|---|
| get_incident | select | incident_id,region | include | Get the details of an incident by incident_id. | 
| list_incidents | select | region | include,page[size],page[offset] | Get all incidents for the user's organization. | 
| search_incidents | select | query,region | include,sort,page[size],page[offset] | Search for incidents matching a certain query. | 
| create_incident | insert | region,data__data | Create an incident. | |
| update_incident | update | incident_id,region,data__data | include | Updates an incident. Provide only the attributes that should be updated as this request is a partial update. | 
| delete_incident | delete | incident_id,region | Deletes an existing incident from the users organization. | 
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description | 
|---|---|---|
| incident_id | string | The UUID of the incident. | 
| query | string | Specifies which incidents should be returned. The query can contain any number of incident facets joined by ANDs, along with multiple values for each of those facets joined byORs. For example:state:active AND severity:(SEV-2 OR SEV-1). | 
| region | string | (default: datadoghq.com) | 
| include | array | Specifies which types of related objects should be included in the response. | 
| page[offset] | integer (int64) | Specific offset to use as the beginning of the returned page. | 
| page[size] | integer (int64) | Size for a given page. The maximum allowed value is 100. | 
| sort | string | Specifies the order of returned incidents. | 
SELECT examples
- get_incident
- list_incidents
- search_incidents
Get the details of an incident by incident_id.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incidents
WHERE incident_id = '{{ incident_id }}' -- required
AND region = '{{ region }}' -- required
AND include = '{{ include }}'
;
Get all incidents for the user's organization.
SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incidents
WHERE region = '{{ region }}' -- required
AND include = '{{ include }}'
AND page[size] = '{{ page[size] }}'
AND page[offset] = '{{ page[offset] }}'
;
Search for incidents matching a certain query.
SELECT
attributes,
type
FROM datadog.service_management.incidents
WHERE query = '{{ query }}' -- required
AND region = '{{ region }}' -- required
AND include = '{{ include }}'
AND sort = '{{ sort }}'
AND page[size] = '{{ page[size] }}'
AND page[offset] = '{{ page[offset] }}'
;
INSERT examples
- create_incident
- Manifest
Create an incident.
INSERT INTO datadog.service_management.incidents (
data__data,
region
)
SELECT 
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data,
included
;
# Description fields are for documentation purposes
- name: incidents
  props:
    - name: region
      value: string
      description: Required parameter for the incidents resource.
    - name: data
      value: object
      description: |
        Incident data for a create request.
UPDATE examples
- update_incident
Updates an incident. Provide only the attributes that should be updated as this request is a partial update.
UPDATE datadog.service_management.incidents
SET 
data__data = '{{ data }}'
WHERE 
incident_id = '{{ incident_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;
DELETE examples
- delete_incident
Deletes an existing incident from the users organization.
DELETE FROM datadog.service_management.incidents
WHERE incident_id = '{{ incident_id }}' --required
AND region = '{{ region }}' --required
;