service_fields
Creates, updates, deletes, gets or lists a service_fields resource.
Overview
| Name | service_fields |
| Type | Resource |
| Id | pagerduty.custom_fields.service_fields |
Fields
The following fields are returned by SELECT queries:
- get
- list
The field requested.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The 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_name | string | The human-readable name of the field. This must be unique across an account. |
created_at | string (date-time) | The date/time the object was created at. (title: Datetime) |
data_type | string | The kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url) |
description | string | A description of the data this field contains. |
enabled | boolean | Whether the field is enabled. (true, false) |
field_options | array | The 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_type | string | The type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed) |
self | string (url) | The API show URL at which the object is accessible |
summary | string | A 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. |
type | string | (field) |
updated_at | string (date-time) | The date/time the object was updated at. (title: Datetime) |
A list of fields.
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the resource. |
name | string | The 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_name | string | The human-readable name of the field. This must be unique across an account. |
created_at | string (date-time) | The date/time the object was created at. (title: Datetime) |
data_type | string | The kind of data the custom field is allowed to contain. (boolean, integer, float, string, datetime, url) |
description | string | A description of the data this field contains. |
enabled | boolean | Whether the field is enabled. (true, false) |
field_options | array | The 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_type | string | The type of data this field contains. In combination with the data_type field. (single_value, single_value_fixed, multi_value, multi_value_fixed) |
self | string (url) | The API show URL at which the object is accessible |
summary | string | A 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. |
type | string | (field) |
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 | include[] | Show detailed information about a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.read<br /> |
list | select | include[] | List Custom Fields available for Services.<br /><br />Scoped OAuth requires: custom_fields.read<br /> | |
create | insert | field | Creates a new Custom Field for Services, along with the Field Options if provided.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
update | update | field_id, field | Update a Custom Field for Services.<br /><br />Scoped OAuth requires: custom_fields.write<br /> | |
delete | delete | field_id | Delete 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.
| Name | Datatype | Description |
|---|---|---|
field_id | string | The ID of the field. |
include[] | string | Array of additional details to include. |
SELECT examples
- get
- list
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[] }}'
;
List Custom Fields available 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 include[] = '{{ include[] }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: service_fields
props:
- name: field
description: |
Details of the custom field to be created.
value:
data_type: "{{ data_type }}"
description: "{{ description }}"
display_name: "{{ display_name }}"
enabled: {{ enabled }}
field_options:
- data:
data_type: "{{ data_type }}"
value: "{{ value }}"
field_type: "{{ field_type }}"
name: "{{ name }}"
UPDATE examples
- update
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
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
;