Skip to main content

incident_fields

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

Overview

Nameincident_fields
TypeResource
Idpagerduty.custom_fields.incident_fields

Fields

The following fields are returned by SELECT queries:

The field requested.

NameDatatypeDescription
idstringThe ID of the resource.
namestringThe name of the field. May include ASCII characters, specifically lowercase letters, digits, and underescores. The name for a Field must be unique and cannot be changed once created. (title: Field Name)
display_namestringThe human-readable name of the field. This must be unique across an account.
created_atstring (date-time)The date/time the object was created at.
data_typestringThe kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url)
default_value
descriptionstringA description of the data this field contains.
field_optionsarrayThe fixed list of value options that may be stored in this field.
field_typestringThe type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed)
selfstring (url)The API show URL at which the object is accessible
summarystringA short-form, server-generated string that provides succinct, important information about an object suitable for primary labeling of an entity in a client. In many cases, this will be identical to display_name.
typestring (field)
updated_atstring (date-time)The date/time the object was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfield_idinclude[]<br /><!-- theme: warning --><br />> ### Deprecated<br />> This endpoint is deprecated and only works for fields on the Base Incident Type. &lt;br />> For more flexibility, we recommend using the Incident Types endpoint: &lt;br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}<br /><br />Show detailed information about a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.read<br />
listselectinclude[]<br /><!-- theme: warning --><br />> ### Deprecated<br />> This endpoint is deprecated and only works for fields on the Base Incident Type. &lt;br />> For more flexibility, we recommend using the Incident Types endpoint: &lt;br />> /incidents/types/{type_id_or_name}/custom_fields<br /><br />List Custom Fields on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.read<br />
createinsertfield<br /><!-- theme: warning --><br />> ### Deprecated<br />> This endpoint is deprecated and only works for fields on the Base Incident Type. &lt;br />> For more flexibility, we recommend using the Incident Types endpoint: &lt;br />> /incidents/types/{type_id_or_name}/custom_fields<br /><br />Creates a new Custom Field on the Base Incident Type, along with the Field Options if provided. &lt;br />An account may have up to 10 Fields.<br /><br />Scoped OAuth requires: custom_fields.write<br />
updateupdatefield_id, field<br /><!-- theme: warning --><br />> ### Deprecated<br />> This endpoint is deprecated and only works for fields on the Base Incident Type. &lt;br />> For more flexibility, we recommend using the Incident Types endpoint: &lt;br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}<br /><br />Update a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.write<br />
deletedeletefield_id<br /><!-- theme: warning --><br />> ### Deprecated<br />> This endpoint is deprecated and only works for fields on the Base Incident Type. &lt;br />> For more flexibility, we recommend using the Incident Types endpoint: &lt;br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}<br /><br />Delete a Custom Field from the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.write<br />

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 field.
include[]stringArray of additional details to include.

SELECT examples


<!-- theme: warning -->
> ### Deprecated
> This endpoint is deprecated and only works for fields on the Base Incident Type. <br />> For more flexibility, we recommend using the Incident Types endpoint: <br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}

Show detailed information about a Custom Field on the Base Incident Type.

Scoped OAuth requires: custom_fields.read

SELECT
id,
name,
display_name,
created_at,
data_type,
default_value,
description,
field_options,
field_type,
self,
summary,
type,
updated_at
FROM pagerduty.custom_fields.incident_fields
WHERE field_id = '{{ field_id }}' -- required
AND include[] = '{{ include[] }}'
;

INSERT examples


<!-- theme: warning -->
> ### Deprecated
> This endpoint is deprecated and only works for fields on the Base Incident Type. <br />> For more flexibility, we recommend using the Incident Types endpoint: <br />> /incidents/types/{type_id_or_name}/custom_fields

Creates a new Custom Field on the Base Incident Type, along with the Field Options if provided. <br />An account may have up to 10 Fields.

Scoped OAuth requires: custom_fields.write

INSERT INTO pagerduty.custom_fields.incident_fields (
field
)
SELECT
'{{ field }}' /* required */
RETURNING
field
;

UPDATE examples


<!-- theme: warning -->
> ### Deprecated
> This endpoint is deprecated and only works for fields on the Base Incident Type. <br />> For more flexibility, we recommend using the Incident Types endpoint: <br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}

Update a Custom Field on the Base Incident Type.

Scoped OAuth requires: custom_fields.write

UPDATE pagerduty.custom_fields.incident_fields
SET
field = '{{ field }}'
WHERE
field_id = '{{ field_id }}' --required
AND field = '{{ field }}' --required
RETURNING
field;

DELETE examples


<!-- theme: warning -->
> ### Deprecated
> This endpoint is deprecated and only works for fields on the Base Incident Type. <br />> For more flexibility, we recommend using the Incident Types endpoint: <br />> /incidents/types/{type_id_or_name}/custom_fields/{field_id}

Delete a Custom Field from the Base Incident Type.

Scoped OAuth requires: custom_fields.write

DELETE FROM pagerduty.custom_fields.incident_fields
WHERE field_id = '{{ field_id }}' --required
;