service_field_options
Creates, updates, deletes, gets or lists a service_field_options resource.
Overview
| Name | service_field_options |
| Type | Resource |
| Id | pagerduty.custom_fields.service_field_options |
Fields
The following fields are returned by SELECT queries:
- get
- list
The requested field option.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
created_at | string (date-time) | The date/time the object was created at. (title: Datetime) |
data | object | |
type | string | (field_option) |
updated_at | string (date-time) | The date/time the object was updated at. (title: Datetime) |
List of field options.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
created_at | string (date-time) | The date/time the object was created at. (title: Datetime) |
data | object | |
type | string | (field_option) |
updated_at | string (date-time) | The date/time the object was updated at. (title: Datetime) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | field_id, field_option_id | Get a field option for a given field.<br /><br />Scoped OAuth requires: custom_fields.read<br /> | |
list | select | field_id | List all options for a given field.<br /><br />Scoped OAuth requires: custom_fields.read<br /> | |
create | insert | field_id, field_option | Create a new option for the given field.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
update | update | field_id, field_option_id, field_option | Update a field option for a given field.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
delete | delete | field_id, field_option_id | Delete a field option.<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. |
field_option_id | string | The ID of the field option. |
SELECT examples
- get
- list
Get a field option for a given field.<br /><br />Scoped OAuth requires: custom_fields.read<br />
SELECT
id,
created_at,
data,
type,
updated_at
FROM pagerduty.custom_fields.service_field_options
WHERE field_id = '{{ field_id }}' -- required
AND field_option_id = '{{ field_option_id }}' -- required
;
List all options for a given field.<br /><br />Scoped OAuth requires: custom_fields.read<br />
SELECT
id,
created_at,
data,
type,
updated_at
FROM pagerduty.custom_fields.service_field_options
WHERE field_id = '{{ field_id }}' -- required
;
INSERT examples
- create
- Manifest
Create a new option for the given field.<br /><br />Scoped OAuth requires: custom_fields.write<br />
INSERT INTO pagerduty.custom_fields.service_field_options (
field_option,
field_id
)
SELECT
'{{ field_option }}' /* required */,
'{{ field_id }}'
RETURNING
field_option
;
# Description fields are for documentation purposes
- name: service_field_options
props:
- name: field_id
value: "{{ field_id }}"
description: Required parameter for the service_field_options resource.
- name: field_option
description: |
An option for a custom field. Can only be applied to fields with a `field_type` of `single_value_fixed` or `multi_value_fixed`.
value:
data:
data_type: "{{ data_type }}"
value: "{{ value }}"
UPDATE examples
- update
Update a field option for a given field.<br /><br />Scoped OAuth requires: custom_fields.write<br />
UPDATE pagerduty.custom_fields.service_field_options
SET
field_option = '{{ field_option }}'
WHERE
field_id = '{{ field_id }}' --required
AND field_option_id = '{{ field_option_id }}' --required
AND field_option = '{{ field_option }}' --required
RETURNING
field_option;
DELETE examples
- delete
Delete a field option.<br /><br />Scoped OAuth requires: custom_fields.write<br />
DELETE FROM pagerduty.custom_fields.service_field_options
WHERE field_id = '{{ field_id }}' --required
AND field_option_id = '{{ field_option_id }}' --required
;