Skip to main content

incident_field_options

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

Overview

Nameincident_field_options
TypeResource
Idpagerduty.custom_fields.incident_field_options

Fields

The following fields are returned by SELECT queries:

A list of field options.

NameDatatypeDescription
idstringThe ID of the resource.
created_atstring (date-time)The date/time the object was created at.
dataobject
typestring (field_option)
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
listselectfield_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}/field_options<br /><br />List all enabled Field Options for a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.read<br />
createinsertfield_id, field_option<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}/field_options<br /><br />Create a new Field Option for a Custom Field on the Base Incident Type. Field Options may only be created for Fields that have field_options. A Field may have no more than 10 enabled options.<br /><br />Scoped OAuth requires: custom_fields.write<br />
updateupdatefield_id, field_option_id, field_option<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}/field_options/{field_option_id}<br /><br />Update a Field Option for a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.write<br />
deletedeletefield_id, field_option_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}/field_options/{field_option_id}<br /><br />Delete a Field Option for a Custom Field on 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.
field_option_idstringThe ID of the field option.

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}/field_options

List all enabled Field Options for a Custom Field on the Base Incident Type.

Scoped OAuth requires: custom_fields.read

SELECT
id,
created_at,
data,
type,
updated_at
FROM pagerduty.custom_fields.incident_field_options
WHERE field_id = '{{ field_id }}' -- required
;

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/{field_id}/field_options

Create a new Field Option for a Custom Field on the Base Incident Type. Field Options may only be created for Fields that have field_options. A Field may have no more than 10 enabled options.

Scoped OAuth requires: custom_fields.write

INSERT INTO pagerduty.custom_fields.incident_field_options (
field_option,
field_id
)
SELECT
'{{ field_option }}' /* required */,
'{{ field_id }}'
RETURNING
field_option
;

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}/field_options/{field_option_id}

Update a Field Option for a Custom Field on the Base Incident Type.

Scoped OAuth requires: custom_fields.write

UPDATE pagerduty.custom_fields.incident_field_options
SET
field_option = '{{ field_option }}'
WHERE
field_id = '{{ field_id }}' --required
AND field_option_id = '{{ field_option_id }}' --required
AND field_option = '{{ field_option }}' --required
RETURNING
field_option;

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}/field_options/{field_option_id}

Delete a Field Option for a Custom Field on the Base Incident Type.

Scoped OAuth requires: custom_fields.write

DELETE FROM pagerduty.custom_fields.incident_field_options
WHERE field_id = '{{ field_id }}' --required
AND field_option_id = '{{ field_option_id }}' --required
;