incident_field_options
Creates, updates, deletes, gets or lists an incident_field_options resource.
Overview
| Name | incident_field_options |
| Type | Resource |
| Id | pagerduty.custom_fields.incident_field_options |
Fields
The following fields are returned by SELECT queries:
- list
A list of field options.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
created_at | string (date-time) | The date/time the object was created at. |
data | object | |
type | string | (field_option) |
updated_at | string (date-time) | The date/time the object was last updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | field_id | <br /><!-- theme: warning --><br />> ### Deprecated<br />> 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<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 /> | |
create | insert | field_id, field_option | <br /><!-- theme: warning --><br />> ### Deprecated<br />> 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<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 /> | |
update | update | field_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. <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}<br /><br />Update a Field Option for a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
delete | delete | field_id, field_option_id | <br /><!-- theme: warning --><br />> ### Deprecated<br />> 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}<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.
| Name | Datatype | Description |
|---|---|---|
field_id | string | The ID of the field. |
field_option_id | string | The ID of the field option. |
SELECT examples
- list
<!-- 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
- create
- Manifest
<!-- 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
;
# Description fields are for documentation purposes
- name: incident_field_options
props:
- name: field_id
value: "{{ field_id }}"
description: Required parameter for the incident_field_options resource.
- name: field_option
value:
data:
data_type: "{{ data_type }}"
value: "{{ value }}"
id: "{{ id }}"
type: "{{ type }}"
updated_at: "{{ updated_at }}"
created_at: "{{ created_at }}"
UPDATE examples
- update
<!-- 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
- delete
<!-- 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
;