Skip to main content

schema_assignments

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

Overview

Nameschema_assignments
TypeResource
Idpagerduty.custom_fields.schema_assignments

Fields

The following fields are returned by SELECT queries:

The list of Assignments

NameDatatypeDescription
idstringThe ID of the resource.
created_atstring (date-time)The date/time the object was created at.
schemaobject
serviceobject
typestringA string that determines the schema of the object. This must be the standard name for the entity, suffixed by _reference if the object is a reference.
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
list_schema_assignmentsselectfilter, X-EARLY-ACCESSlimit, offset, totalList Schema Assignments by service_id or schema_id

<!-- 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_schema_assignmentinsertX-EARLY-ACCESS, data__schema_assignmentAssign a new Schema to a service

<!-- 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_schema_assignmentdeleteid, X-EARLY-ACCESSRemove the Schema assigned to a service

<!-- 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_schema_assignmentsexecfilter, X-EARLY-ACCESSlimit, offset, totalList Schema Assignments by service_id or schema_id

<!-- 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!
filterobjectOne of service_id or schema_id is required.
idstringThe ID of the resource.
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

List Schema Assignments by service_id or schema_id

<!-- 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,
schema,
service,
type,
updated_at
FROM pagerduty.custom_fields.schema_assignments
WHERE filter = '{{ filter }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
;

INSERT examples

Assign a new Schema to a service

<!-- 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.schema_assignments (
data__schema_assignment,
X-EARLY-ACCESS
)
SELECT
'{{ schema_assignment }}' /* required */,
'{{ X-EARLY-ACCESS }}'
RETURNING
schema_assignment
;

DELETE examples

Remove the Schema assigned to a service

<!-- 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.schema_assignments
WHERE id = '{{ id }}' --required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' --required
;

Lifecycle Methods

List Schema Assignments by service_id or schema_id

<!-- 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.schema_assignments._list_schema_assignments 
@filter='{{ filter }}' --required,
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required,
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }}
;