schemas
Creates, updates, deletes, gets or lists a schemas
resource.
Overview
Name | schemas |
Type | Resource |
Id | pagerduty.custom_fields.schemas |
Fields
The following fields are returned by SELECT
queries:
- get_custom_fields_schema
- list_custom_fields_schemas
The schema requested.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the resource. |
created_at | string (date-time) | The date/time the object was created at. |
description | string | A description of this schema. |
field_configurations | array | |
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 name , though it is not intended to be an identifier. |
title | string | The name of the schema. |
type | string | |
updated_at | string (date-time) | The date/time the object was last updated. |
A paginated list of schemas.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the resource. |
created_at | string (date-time) | The date/time the object was created at. |
description | string | A description of this schema. |
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 name , though it is not intended to be an identifier. |
title | string | The name of the schema. |
type | string | |
updated_at | string (date-time) | The date/time the object was last updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get_custom_fields_schema | select | schema_id , X-EARLY-ACCESS | include[] | Get detailed information about 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_schemas | select | X-EARLY-ACCESS | limit , offset , total | List all Schemas. <!-- 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 | insert | X-EARLY-ACCESS , data__schema | Create a new Schema, along with the Field Configurations if provided. An account may have up to 100 Schemas. <!-- 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_schema | delete | schema_id , X-EARLY-ACCESS | Delete a Schema. Schemas may not be deleted if they are in use by any 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_custom_fields_schemas | exec | X-EARLY-ACCESS | limit , offset , total | List all Schemas. <!-- 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_schema | exec | schema_id , X-EARLY-ACCESS | include[] | Get detailed information about 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. |
update_custom_fields_schema | exec | schema_id , X-EARLY-ACCESS , schema | Update a Schema, along with the Field Configurations if provided. <!-- 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.
Name | Datatype | Description |
---|---|---|
X-EARLY-ACCESS | string | This 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! |
schema_id | string | The ID of the schema. |
include[] | string | Array of additional details to include. Including field_configurations will also include full field details. |
limit | integer | The number of results per page. |
offset | integer | Offset to start pagination search results. |
total | boolean | By 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
- get_custom_fields_schema
- list_custom_fields_schemas
Get detailed information about 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.
SELECT
id,
created_at,
description,
field_configurations,
self,
summary,
title,
type,
updated_at
FROM pagerduty.custom_fields.schemas
WHERE schema_id = '{{ schema_id }}' -- required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
AND include[] = '{{ include[] }}'
;
List all Schemas.
<!-- 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,
description,
self,
summary,
title,
type,
updated_at
FROM pagerduty.custom_fields.schemas
WHERE X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' -- required
AND limit = '{{ limit }}'
AND offset = '{{ offset }}'
AND total = '{{ total }}'
;
INSERT
examples
- create_custom_fields_schema
- Manifest
Create a new Schema, along with the Field Configurations if provided. An account may have up to 100 Schemas.
<!-- 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.schemas (
data__schema,
X-EARLY-ACCESS
)
SELECT
'{{ schema }}' /* required */,
'{{ X-EARLY-ACCESS }}'
RETURNING
schema
;
# Description fields are for documentation purposes
- name: schemas
props:
- name: X-EARLY-ACCESS
value: string
description: Required parameter for the schemas resource.
- name: schema
value: object
DELETE
examples
- delete_custom_fields_schema
Delete a Schema. Schemas may not be deleted if they are in use by any 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.schemas
WHERE schema_id = '{{ schema_id }}' --required
AND X-EARLY-ACCESS = '{{ X-EARLY-ACCESS }}' --required
;
Lifecycle Methods
- _list_custom_fields_schemas
- _get_custom_fields_schema
- update_custom_fields_schema
List all Schemas.
<!-- 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.schemas._list_custom_fields_schemas
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required,
@limit='{{ limit }}',
@offset='{{ offset }}',
@total={{ total }}
;
Get detailed information about 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.
EXEC pagerduty.custom_fields.schemas._get_custom_fields_schema
@schema_id='{{ schema_id }}' --required,
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required,
@include[]='{{ include[] }}'
;
Update a Schema, along with the Field Configurations if provided.
<!-- 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.schemas.update_custom_fields_schema
@schema_id='{{ schema_id }}' --required,
@X-EARLY-ACCESS='{{ X-EARLY-ACCESS }}' --required
@@json=
'{
"schema": "{{ schema }}"
}'
;