Skip to main content

incident_attachments

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

Overview

Nameincident_attachments
TypeResource
Iddatadog.service_management.incident_attachments

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the attachment. (example: 00000000-abcd-0002-0000-000000000000)
attributesobjectThe attachment's attributes.
relationshipsobjectThe attachment's resource relationships.
typestringThe incident attachment resource type. (incident_attachments) (default: incident_attachments, example: incident_attachments)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_incident_attachmentsselectincident_idfilter[attachment_type], includeList incident attachments.
create_incident_attachmentinsertincident_idincludeCreate an incident attachment.
update_incident_attachmentupdateincident_id, attachment_idinclude
delete_incident_attachmentdeleteincident_id, attachment_id

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
attachment_idstringThe ID of the attachment.
incident_idstringThe UUID of the incident.
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.
filter[attachment_type]stringFilter attachments by type. Supported values are 1 (postmortem) and 2 (link).
includestringResource to include in the response. Supported value: last_modified_by_user.

SELECT examples

List incident attachments.

SELECT
id,
attributes,
relationships,
type
FROM datadog.service_management.incident_attachments
WHERE incident_id = '{{ incident_id }}' -- required
AND filter[attachment_type] = '{{ filter[attachment_type] }}'
AND include = '{{ include }}'
;

INSERT examples

Create an incident attachment.

INSERT INTO datadog.service_management.incident_attachments (
data,
incident_id,
include
)
SELECT
'{{ data }}',
'{{ incident_id }}',
'{{ include }}'
RETURNING
data,
included
;

UPDATE examples

No description available.

UPDATE datadog.service_management.incident_attachments
SET
data = '{{ data }}'
WHERE
incident_id = '{{ incident_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
AND include = '{{ include}}'
RETURNING
data,
included;

DELETE examples

No description available.

DELETE FROM datadog.service_management.incident_attachments
WHERE incident_id = '{{ incident_id }}' --required
AND attachment_id = '{{ attachment_id }}' --required
;