Skip to main content

customfields_fields_field_options

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

Overview

Namecustomfields_fields_field_options
TypeResource
Idpagerduty.custom_fields.customfields_fields_field_options

Fields

The following fields are returned by SELECT queries:

The field option requested.

NameDatatypeDescription
idstringThe ID of the resource.
created_atstring (date-time)The date/time the object was created at.
data
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_field_optionselectfield_id, field_option_id, X-EARLY-ACCESSGet a Field Option.

<!-- 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_field_optionsselectfield_id, X-EARLY-ACCESSList all enabled Field Options for 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.
create_custom_fields_field_optioninsertfield_id, X-EARLY-ACCESS, data__field_optionCreate a new Field Option. Field Options may only be created for Fields where fixed_options is true. A Field may have no more than 10 enabled options.

<!-- 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_field_optiondeletefield_id, field_option_id, X-EARLY-ACCESSDelete a Field Option.

<!-- 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_field_optionsexecfield_id, X-EARLY-ACCESSList all enabled Field Options for 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.
_get_custom_fields_field_optionexecfield_id, field_option_id, X-EARLY-ACCESSGet a Field Option.

<!-- 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_field_optionexecfield_id, field_option_id, X-EARLY-ACCESS, field_optionUpdate Field Option for 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.
field_option_idstringThe ID of the field option.

SELECT examples

Get a Field Option.

<!-- 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,
created_at,
data,
type,
updated_at
FROM pagerduty.custom_fields.customfields_fields_field_options
WHERE field_id = '{{ field_id }}' -- required
AND field_option_id = '{{ field_option_id }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
;

INSERT examples

Create a new Field Option. Field Options may only be created for Fields where fixed_options is true. A Field may have no more than 10 enabled options.

<!-- 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_field_options (
data__field_option,
field_id,
X-EARLY-ACCESS
)
SELECT
'{{ field_option }}' /* required */,
'{{ field_id }}',
'{{ X-EARLY-ACCESS }}'
RETURNING
field_option
;

DELETE examples

Delete a Field Option.

<!-- 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_field_options
WHERE field_id = '{{ field_id }}' --required
AND field_option_id = '{{ field_option_id }}' --required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' --required
;

Lifecycle Methods

List all enabled Field Options for 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.

EXEC pagerduty.custom_fields.customfields_fields_field_options._list_custom_fields_field_options 
@field_id='{{ field_id }}' --required,
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required
;