Skip to main content

service_fields

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

Overview

Nameservice_fields
TypeResource
Idpagerduty.custom_fields.service_fields

Fields

The following fields are returned by SELECT queries:

The 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. (title: Datetime)
data_typestringThe kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url)
descriptionstringA description of the data this field contains.
enabledbooleanWhether the field is enabled. (true, false)
field_optionsarrayThe options for the custom field. Applies only to single_value_fixed and multi_value_fixed field types. These options are returned only if the include[] parameter specifies field_options.
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)
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 display_name.
typestring (field)
updated_atstring (date-time)The date/time the object was updated at. (title: Datetime)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfield_idinclude[]Show detailed information about a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.read<br />
listselectinclude[]List Custom Fields available for Services.<br /><br />Scoped OAuth requires: custom_fields.read<br />
createinsertfieldCreates a new Custom Field for Services, along with the Field Options if provided.<br /><br />Scoped OAuth requires: custom_fields.write<br />
updateupdatefield_id, fieldUpdate a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.write<br />
deletedeletefield_idDelete a Custom Field from Services.<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.
include[]stringArray of additional details to include.

SELECT examples

Show detailed information about a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.read<br />

SELECT
id,
name,
display_name,
created_at,
data_type,
description,
enabled,
field_options,
field_type,
self,
summary,
type,
updated_at
FROM pagerduty.custom_fields.service_fields
WHERE field_id = '{{ field_id }}' -- required
AND include[] = '{{ include[] }}'
;

INSERT examples

Creates a new Custom Field for Services, along with the Field Options if provided.<br /><br />Scoped OAuth requires: custom_fields.write<br />

INSERT INTO pagerduty.custom_fields.service_fields (
field
)
SELECT
'{{ field }}' /* required */
RETURNING
field
;

UPDATE examples

Update a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.write<br />

UPDATE pagerduty.custom_fields.service_fields
SET
field = '{{ field }}'
WHERE
field_id = '{{ field_id }}' --required
AND field = '{{ field }}' --required
RETURNING
field;

DELETE examples

Delete a Custom Field from Services.<br /><br />Scoped OAuth requires: custom_fields.write<br />

DELETE FROM pagerduty.custom_fields.service_fields
WHERE field_id = '{{ field_id }}' --required
;