Skip to main content

customfields_fields

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

Overview

Namecustomfields_fields
TypeResource
Idpagerduty.custom_fields.customfields_fields

Fields

The following fields are returned by SELECT queries:

The field requested.

NameDatatypeDescription
idstringThe ID of the resource.
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.
datatypestringThe kind of data the custom field is allowed to contain.
descriptionstringA description of the data this field contains.
field_optionsarrayThe fixed list of value options that may be stored in this field.
fixed_optionsbooleanIf true, restricts the values allowed to be stored in the custom field to a limited set of options (configured via the Field Option sub-resource). Must be false if datatype is "boolean", "url", or "datetime"
multi_valuebooleanIf true, allows the custom field to store a set of multiple values. Must be false if datatype is not "string" or "url"
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
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
get_custom_fields_fieldselectfield_id, X-EARLY-ACCESSinclude[]Show detailed information about a field.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
list_custom_fields_fieldsselectX-EARLY-ACCESSlimit, offset, total, include[]List fields.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
create_custom_fields_fieldinsertX-EARLY-ACCESS, data__fieldCreate a new Field, along with the Field Options if provided. An account may have up to 1000 Fields.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
delete_custom_fields_fielddeletefield_id, X-EARLY-ACCESSDelete a Field. Fields may not be deleted if they are used by a Field Schema.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
_list_custom_fields_fieldsexecX-EARLY-ACCESSlimit, offset, total, include[]List fields.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
_get_custom_fields_fieldexecfield_id, X-EARLY-ACCESSinclude[]Show detailed information about a field.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.
update_custom_fields_fieldexecfield_id, X-EARLY-ACCESS, fieldUpdate a field.

<!-- theme: warning -->

> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.

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
X-EARLY-ACCESSstringThis header indicates that this API endpoint is UNDER CONSTRUCTION and may change at any time. You MUST pass in this header and the above value. Do not use this endpoint in production, as it may change!
field_idstringThe ID of the field.
include[]stringArray of additional details to include.
limitintegerThe number of results per page.
offsetintegerOffset to start pagination search results.
totalbooleanBy default the total field in pagination responses is set to null to provide the fastest possible response times. Set total to true for this field to be populated. See our Pagination Docs for more information.

SELECT examples

Show detailed information about a field.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.

SELECT
id,
display_name,
created_at,
datatype,
description,
field_options,
fixed_options,
multi_value,
self,
summary,
type,
updated_at
FROM pagerduty.custom_fields.customfields_fields
WHERE field_id = '{{ field_id }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
AND include[] = '{{ include[] }}'
;

INSERT examples

Create a new Field, along with the Field Options if provided. An account may have up to 1000 Fields.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.

INSERT INTO pagerduty.custom_fields.customfields_fields (
data__field,
X-EARLY-ACCESS
)
SELECT
'{{ field }}' /* required */,
'{{ X-EARLY-ACCESS }}'
RETURNING
field
;

DELETE examples

Delete a Field. Fields may not be deleted if they are used by a Field Schema.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.

DELETE FROM pagerduty.custom_fields.customfields_fields
WHERE field_id = '{{ field_id }}' --required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' --required
;

Lifecycle Methods

List fields.

<!-- theme: warning -->
> ### Early Access
> This endpoint is in Early Access and may change at any time. You must pass in the X-EARLY-ACCESS header to access it.

EXEC pagerduty.custom_fields.customfields_fields._list_custom_fields_fields 
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required,
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }},
@include[]='{{ include[] }}'
;