Skip to navigation

Create approval resource

View as Markdown

Creates a approval resource and returns it with its server-assigned id and version.

Send the fields at the top level of the body. Don’t send id or version.num; version.change_description is required.

Authentication

AuthorizationBearer

JWT bearer token authentication. Include the Configuration API key in the Authorization header as ‘Bearer <token>’.

Request

This endpoint expects an object.
connector_idstringRequiredformat: "uuid">=1 character

The connector these approval settings apply to. Each connector and resource type pair can have only one configuration; cannot be changed after creation. ID of an existing connector (GET /configurations/v1alpha1/platform/connectors).

resource_typeenumRequired

The approval record type these settings apply to, such as REQUEST_ITEM, CHANGE_REQUEST, or TIME_OFF_REQUEST. Cannot be changed after creation.

versionobjectRequired
Document version. On update, send back the num from your last read.
buttonslist of objectsOptional
Buttons shown to the approver, defining the actions they can take or links to external systems.
mapper_benderobjectOptional
Data mapping that builds the approval record from external system attributes, controlling how it looks to the approver. If empty, the system defaults are used.
augmenter_benderobjectOptional

Data mapping that adds extra details to the approval record. Its input includes the output of mapper_bender and data from augmenting_data_retrievers. If empty, the system defaults are used.

augmenting_data_retrieverslist of objectsOptional

Data retrievers that fetch additional details for approval records. Their output is available to augmenter_bender.

record_prefilter_dslstringOptional
DSL rule selecting which approval records are processed and stored. Excluded records send no notifications and do not appear in the approver's queue. Leave empty to include all. Must be a valid MWDSL expression.
database_filter_dslstringOptional
DSL rule filtering approval records by their fields. Excluded records send no notifications and do not appear in the approver's queue. Must be a valid MWDSL expression.
notification_filter_dslstringOptional
DSL rule selecting which approval records send a notification to the approver. Records without a notification still appear in the approver's queue. Must be a valid MWDSL expression.
external_resource_keyslist of stringsOptional
External system resource keys that map to this resource type, for systems that have multiple resource types.

Response

The created approval resource
idstringOptionalRead-only
Unique identifier of this configuration, assigned by the server.
connector_idstringOptionalformat: "uuid">=1 character

The connector these approval settings apply to. Each connector and resource type pair can have only one configuration; cannot be changed after creation. ID of an existing connector (GET /configurations/v1alpha1/platform/connectors).

resource_typeenumOptional

The approval record type these settings apply to, such as REQUEST_ITEM, CHANGE_REQUEST, or TIME_OFF_REQUEST. Cannot be changed after creation.

buttonslist of objectsOptional
Buttons shown to the approver, defining the actions they can take or links to external systems.
mapper_benderobjectOptional
Data mapping that builds the approval record from external system attributes, controlling how it looks to the approver. If empty, the system defaults are used.
augmenter_benderobjectOptional

Data mapping that adds extra details to the approval record. Its input includes the output of mapper_bender and data from augmenting_data_retrievers. If empty, the system defaults are used.

augmenting_data_retrieverslist of objectsOptional

Data retrievers that fetch additional details for approval records. Their output is available to augmenter_bender.

record_prefilter_dslstringOptional
DSL rule selecting which approval records are processed and stored. Excluded records send no notifications and do not appear in the approver's queue. Leave empty to include all.
database_filter_dslstringOptional
DSL rule filtering approval records by their fields. Excluded records send no notifications and do not appear in the approver's queue.
notification_filter_dslstringOptional
DSL rule selecting which approval records send a notification to the approver. Records without a notification still appear in the approver's queue.
external_resource_keyslist of stringsOptional
External system resource keys that map to this resource type, for systems that have multiple resource types.
updated_timedatetimeOptionalRead-only
When the configuration was last updated.
updated_bystringOptionalRead-only
Who last updated the configuration.
versionobjectOptional
Document version. On update, send back the num from your last read.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error