Skip to main content

custom_fields

Creates, updates, deletes, gets or lists a custom_fields resource.

Overview

Namecustom_fields
TypeResource
Idpagerduty.incident_types.custom_fields

Fields

The following fields are returned by SELECT queries:

The incident type custom 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_valueobject (title: Boolean)
descriptionstringA description of the data this field contains.
enabledbooleanWhether the custom field is enabled.
field_optionsarrayThe 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_typestringThe type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed)
incident_typestringThe id of the incident type the custom field is associated with.
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 name, though it is not intended to be an identifier.
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
getselecttype_id_or_name, field_idinclude[]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 />
listselecttype_id_or_nameinclude[]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 />
createinserttype_id_or_name, fieldCreate 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 />
updateupdatetype_id_or_name, field_id, fieldUpdate 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 />
deletedeletetype_id_or_name, field_idDelete 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.

NameDatatypeDescription
field_idstringThe ID of the field.
type_id_or_namestringThe ID or name of the Incident Type.
include[]stringArray of additional details to include.

SELECT examples

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[] }}'
;

INSERT examples

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
;

UPDATE examples

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 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
;