Skip to main content

field_configurations

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

Overview

Namefield_configurations
TypeResource
Idpagerduty.custom_fields.field_configurations

Fields

The following fields are returned by SELECT queries:

The field configuration requested.

NameDatatypeDescription
idstringThe ID of the resource.
created_atstring (date-time)The date/time the object was created at.
default_valueobjectThe value to use for this field if none is provided. It must be specified if required is true.
fieldThe Field to be included in this schema. Each Field may only be used in one Field Configuration per schema.
requiredbooleanIf true, this Field must always have a value set for objects using this schema.
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_configurationselectschema_id, field_configuration_id, X-EARLY-ACCESSinclude[]Show detailed information about a Field Configuration.

<!-- 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_configurationsselectschema_id, X-EARLY-ACCESSinclude[]List all Field Configurations for the given 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.
create_custom_fields_field_configurationinsertschema_id, X-EARLY-ACCESS, data__field_configurationAdd a new Field Configuration to an existing Schema. A Schema may use at most 20 Fields, and so may have at most 20 Field Configurations.

<!-- 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_configurationdeleteschema_id, field_configuration_id, X-EARLY-ACCESSRemove a Field Configuration and its associated Field from a 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_field_configurationsexecschema_id, X-EARLY-ACCESSinclude[]List all Field Configurations for the given 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.
_get_custom_fields_field_configurationexecschema_id, field_configuration_id, X-EARLY-ACCESSinclude[]Show detailed information about a Field Configuration.

<!-- 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_configurationexecschema_id, field_configuration_id, X-EARLY-ACCESS, field_configurationUpdate settings for Field Configuration in 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.

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_configuration_idstringThe ID of the field configuration.
schema_idstringThe ID of the schema.
include[]stringArray of additional details to include.

SELECT examples

Show detailed information about a Field Configuration.

<!-- 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,
default_value,
field,
required,
type,
updated_at
FROM pagerduty.custom_fields.field_configurations
WHERE schema_id = '{{ schema_id }}' -- required
AND field_configuration_id = '{{ field_configuration_id }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
AND include[] = '{{ include[] }}'
;

INSERT examples

Add a new Field Configuration to an existing Schema. A Schema may use at most 20 Fields, and so may have at most 20 Field Configurations.

<!-- 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.field_configurations (
data__field_configuration,
schema_id,
X-EARLY-ACCESS
)
SELECT
'{{ field_configuration }}' /* required */,
'{{ schema_id }}',
'{{ X-EARLY-ACCESS }}'
RETURNING
field_configuration
;

DELETE examples

Remove a Field Configuration and its associated Field from a 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.field_configurations
WHERE schema_id = '{{ schema_id }}' --required
AND field_configuration_id = '{{ field_configuration_id }}' --required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' --required
;

Lifecycle Methods

List all Field Configurations for the given 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.

EXEC pagerduty.custom_fields.field_configurations._list_custom_fields_field_configurations 
@schema_id='{{ schema_id }}' --required,
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required,
@include[]='{{ include[] }}'
;