custom_fields
Creates, updates, deletes, gets or lists a custom_fields resource.
Overview
| Name | custom_fields |
| Type | Resource |
| Id | pagerduty.incident_types.custom_fields |
Fields
The following fields are returned by SELECT queries:
- get
- list
The incident type custom 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 | object | (title: Boolean) |
description | string | A description of the data this field contains. |
enabled | boolean | Whether the custom field is enabled. |
field_options | array | The options for the custom field. Applies only to single_value_fixed and multi_value_fixed field types. Optionally included in response based on query parameter. |
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) |
incident_type | string | The id of the incident type the custom field is associated with. |
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 name, though it is not intended to be an identifier. |
type | string | (field) |
updated_at | string (date-time) | The date/time the object was last updated. |
The custom fields for the incident type requested. Passing in include[]=field_options will return the field options for the custom field.
| 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 | object | (title: Boolean) |
description | string | A description of the data this field contains. |
enabled | boolean | Whether the custom field is enabled. |
field_options | array | The options for the custom field. Applies only to single_value_fixed and multi_value_fixed field types. Optionally included in response based on query parameter. |
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) |
incident_type | string | The id of the incident type the custom field is associated with. |
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 name, though it is not intended to be an identifier. |
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 | type_id_or_name, field_id | include[] | Get a custom field for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.read<br /> |
list | select | type_id_or_name | include[] | List the custom fields for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.read<br /> |
create | insert | type_id_or_name, field | Create a Custom Field for an Incident Type<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
update | update | type_id_or_name, field_id, field | Update a custom field for an incident type. Field Options can also be updated within the same call.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
delete | delete | type_id_or_name, field_id | Delete a custom field for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<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. |
type_id_or_name | string | The ID or name of the Incident Type. |
include[] | string | Array of additional details to include. |
SELECT examples
- get
- list
Get a custom field for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.read<br />
SELECT
id,
name,
display_name,
created_at,
data_type,
default_value,
description,
enabled,
field_options,
field_type,
incident_type,
self,
summary,
type,
updated_at
FROM pagerduty.incident_types.custom_fields
WHERE type_id_or_name = '{{ type_id_or_name }}' -- required
AND field_id = '{{ field_id }}' -- required
AND include[] = '{{ include[] }}'
;
List the custom fields for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.read<br />
SELECT
id,
name,
display_name,
created_at,
data_type,
default_value,
description,
enabled,
field_options,
field_type,
incident_type,
self,
summary,
type,
updated_at
FROM pagerduty.incident_types.custom_fields
WHERE type_id_or_name = '{{ type_id_or_name }}' -- required
AND include[] = '{{ include[] }}'
;
INSERT examples
- create
- Manifest
Create a Custom Field for an Incident Type<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.write<br />
INSERT INTO pagerduty.incident_types.custom_fields (
field,
type_id_or_name
)
SELECT
'{{ field }}' /* required */,
'{{ type_id_or_name }}'
RETURNING
field
;
# Description fields are for documentation purposes
- name: custom_fields
props:
- name: type_id_or_name
value: "{{ type_id_or_name }}"
description: Required parameter for the custom_fields resource.
- name: field
description: |
Details of the custom field to be created.
value:
name: "{{ name }}"
display_name: "{{ display_name }}"
data_type: "{{ data_type }}"
field_type: "{{ field_type }}"
description: "{{ description }}"
enabled: {{ enabled }}
default_value: "{{ default_value }}"
field_options:
- data:
data_type: "{{ data_type }}"
value: "{{ value }}"
id: "{{ id }}"
type: "{{ type }}"
updated_at: "{{ updated_at }}"
created_at: "{{ created_at }}"
UPDATE examples
- update
Update a custom field for an incident type. Field Options can also be updated within the same call.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.write<br />
UPDATE pagerduty.incident_types.custom_fields
SET
field = '{{ field }}'
WHERE
type_id_or_name = '{{ type_id_or_name }}' --required
AND field_id = '{{ field_id }}' --required
AND field = '{{ field }}' --required
RETURNING
field;
DELETE examples
- delete
Delete a custom field for an incident type.<br /><br />Custom Fields (CF) are a feature which will allow customers to extend Incidents with their own custom data,<br />to provide additional context and support features such as customized filtering, search and analytics.<br />Custom Fields can be applied to different incident types.<br /><br />Scoped OAuth requires: custom_fields.write<br />
DELETE FROM pagerduty.incident_types.custom_fields
WHERE type_id_or_name = '{{ type_id_or_name }}' --required
AND field_id = '{{ field_id }}' --required
;