incident_fields
Creates, updates, deletes, gets or lists an incident_fields resource.
Overview
| Name | incident_fields |
| Type | Resource |
| Id | pagerduty.custom_fields.incident_fields |
Fields
The following fields are returned by SELECT queries:
- get
- list
The field requested.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The 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_name | string | The human-readable name of the field. This must be unique across an account. |
created_at | string (date-time) | The date/time the object was created at. |
data_type | string | The kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url) |
default_value | | |
description | string | A description of the data this field contains. |
field_options | array | The fixed list of value options that may be stored in this field. |
field_type | string | The type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed) |
self | string (url) | The API show URL at which the object is accessible |
summary | string | A 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. |
type | string | (field) |
updated_at | string (date-time) | The date/time the object was last updated. |
A list of fields.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The 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_name | string | The human-readable name of the field. This must be unique across an account. |
created_at | string (date-time) | The date/time the object was created at. |
data_type | string | The kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url) |
default_value | | |
description | string | A description of the data this field contains. |
field_options | array | The fixed list of value options that may be stored in this field. |
field_type | string | The type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed) |
self | string (url) | The API show URL at which the object is accessible |
summary | string | A 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. |
type | string | (field) |
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 |
|---|---|---|---|---|
get | select | field_id | include[] | <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}<br /><br />Show detailed information about a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.read<br /> |
list | select | include[] | <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<br /><br />List Custom Fields on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.read<br /> | |
create | insert | field | <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<br /><br />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.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
update | update | field_id, field | <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}<br /><br />Update a Custom Field on the Base Incident Type.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
delete | delete | 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}<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.
| Name | Datatype | Description |
|---|---|---|
field_id | string | The ID of the field. |
include[] | string | Array of additional details to include. |
SELECT examples
- get
- 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}
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[] }}'
;
<!-- 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
List Custom Fields 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 include[] = '{{ include[] }}'
;
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
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
;
# Description fields are for documentation purposes
- name: incident_fields
props:
- name: field
value:
created_at: "{{ created_at }}"
data_type: "{{ data_type }}"
default_value: "{{ default_value }}"
description: "{{ description }}"
display_name: "{{ display_name }}"
field_options:
- data:
data_type: "{{ data_type }}"
value: "{{ value }}"
id: "{{ id }}"
type: "{{ type }}"
updated_at: "{{ updated_at }}"
created_at: "{{ created_at }}"
field_type: "{{ field_type }}"
id: "{{ id }}"
name: "{{ name }}"
self: "{{ self }}"
summary: "{{ summary }}"
type: "{{ type }}"
updated_at: "{{ updated_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}
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
- 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}
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
;