Skip to main content

incident_services

Creates, updates, deletes, gets or lists an incident_services resource.

Overview

Nameincident_services
TypeResource
Iddatadog.service_management.incident_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe incident service's ID. (example: 00000000-0000-0000-0000-000000000000)
attributesobjectThe incident service's attributes from a response.
relationshipsobjectThe incident service's relationships.
typestringIncident service resource type. (default: services, example: services)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_serviceselectservice_id, regionincludeGet details of an incident service. If the include[users] query parameter is provided,
the included attribute will contain the users related to these incident services.
list_incident_servicesselectregioninclude, page[size], page[offset], filterGet all incident services uploaded for the requesting user's organization. If the include[users] query parameter is provided, the included attribute will contain the users related to these incident services.
create_incident_serviceinsertregion, data__dataCreates a new incident service.
update_incident_serviceupdateservice_id, region, data__dataUpdates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.
delete_incident_servicedeleteservice_id, regionDeletes an existing incident service.

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.

NameDatatypeDescription
regionstring(default: datadoghq.com)
service_idstringThe ID of the incident service.
filterstringA search query that filters services by name.
includestringSpecifies 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.

SELECT examples

Get details of an incident service. If the include[users] query parameter is provided,
the included attribute will contain the users related to these incident services.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_services
WHERE service_id = '{{ service_id }}' -- required
AND region = '{{ region }}' -- required
AND include = '{{ include }}'
;

INSERT examples

Creates a new incident service.

INSERT INTO datadog.service_management.incident_services (
data__data,
region
)
SELECT
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data,
included
;

UPDATE examples

Updates an existing incident service. Only provide the attributes which should be updated as this request is a partial update.

UPDATE datadog.service_management.incident_services
SET
data__data = '{{ data }}'
WHERE
service_id = '{{ service_id }}' --required
AND region = '{{ region }}' --required
AND data__data = '{{ data }}' --required
RETURNING
data,
included;

DELETE examples

Deletes an existing incident service.

DELETE FROM datadog.service_management.incident_services
WHERE service_id = '{{ service_id }}' --required
AND region = '{{ region }}' --required
;