Skip to main content

incident_user_defined_fields

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

Overview

Nameincident_user_defined_fields
TypeResource
Iddatadog.service_management.incident_user_defined_fields

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the user-defined field. (example: 00000000-0000-0000-0000-000000000000)
attributesobjectAttributes of an incident user-defined field.
relationshipsobjectRelationships of an incident user-defined field.
typestringThe incident user defined fields type. (user_defined_field) (example: user_defined_field)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_incident_user_defined_fieldselectfield_idincludeGet details of an incident user-defined field.
list_incident_user_defined_fieldsselectpage[size], page[number], include-deleted, filter[incident-type], includeGet a list of all incident user-defined fields.
create_incident_user_defined_fieldinsertdataincludeCreate an incident user-defined field.
update_incident_user_defined_fieldupdatefield_id, dataincludeUpdate an incident user-defined field.
delete_incident_user_defined_fielddeletefield_idDelete an incident user-defined field.

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
field_idstringThe ID of the incident user-defined field.
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[incident-type]stringFilter results to fields associated with the given incident type UUID.
includestringComma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type".
include-deletedbooleanWhen true, include soft-deleted fields in the response.
page[number]integer (int64)The page number to retrieve, starting at 0.
page[size]integer (int64)The number of results to return per page. Must be between 0 and 1000.

SELECT examples

Get details of an incident user-defined field.

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

INSERT examples

Create an incident user-defined field.

INSERT INTO datadog.service_management.incident_user_defined_fields (
data,
include
)
SELECT
'{{ data }}' /* required */,
'{{ include }}'
RETURNING
data
;

UPDATE examples

Update an incident user-defined field.

UPDATE datadog.service_management.incident_user_defined_fields
SET
data = '{{ data }}'
WHERE
field_id = '{{ field_id }}' --required
AND data = '{{ data }}' --required
AND include = '{{ include}}'
RETURNING
data;

DELETE examples

Delete an incident user-defined field.

DELETE FROM datadog.service_management.incident_user_defined_fields
WHERE field_id = '{{ field_id }}' --required
;