Skip to navigation

Approval Resources

View as Markdown

tool.approval.resources

  • Endpoint: /tool/approval/resources | Methods: GET, PATCH, POST
  • Request shape: fields go at the top level of the JSON body, with no resource wrapper. The item’s id goes in the URL for reads and updates, not in the body.
  • Updates: a JSON merge-patch. Send only the fields you change, plus version: {num, change_description} with the num from your last read. Lists and maps you send replace the stored ones whole.

Endpoints

All paths are relative to https://api.moveworks.ai/configurations/v1alpha1. Each endpoint page lists the request and response schema, an example, and the errors it can return.

MethodPathEndpoint reference
GET/tool/approval/resourcesList approval resources
POST/tool/approval/resourcesCreate approval resource
GET/tool/approval/resources/{id}Get approval resource
PATCH/tool/approval/resources/{id}Update approval resource

Fields

FieldTypeRequiredNotes
idstringread-onlyUnique identifier of this configuration, assigned by the server.
connector_idstring✅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_typeenum✅The approval record type these settings apply to, such as REQUEST_ITEM, CHANGE_REQUEST, or TIME_OFF_REQUEST. Cannot be changed after creation. One of: REQUEST_ITEM, SERVICE_REQUEST, INCIDENT, CHANGE_REQUEST, TIME_OFF_REQUEST, ACCESS_REVIEW, POLICY_EXCEPTION, LEAVE_OF_ABSENCE, … (16 values).
buttonsarray<ButtonSettings>Buttons shown to the approver, defining the actions they can take or links to external systems.
link_strategyLinkStrategySettingsHow the approval record links to the external system.
mapper_benderobjectData 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_benderobjectData 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_retrieversarray<DataRetrieverSettings>Data retrievers that fetch additional details for approval records. Their output is available to augmenter_bender.
record_prefilter_dslstringDSL 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_dslstringDSL rule filtering approval records by their fields. Excluded records send no notifications and do not appear in the approver’s queue.
notification_filter_dslstringDSL rule selecting which approval records send a notification to the approver. Records without a notification still appear in the approver’s queue.
external_resource_keysarray<string>External system resource keys that map to this resource type, for systems that have multiple resource types.
updated_timestringread-onlyWhen the configuration was last updated.
updated_bystringread-onlyWho last updated the configuration.
versionVersion✅Document version. On update, send back the num from your last read.

Example create body

{
"connector_id": "<connector-uuid>",
"resource_type": "REQUEST_ITEM",
"buttons": [
{
"type": "approve",
"display_info": {
"title": "APPROVALS_APPROVE",
"style": "PRIMARY"
}
}
],
"link_strategy": {
"template": {
"url_template": "https://example.com/path"
}
},
"mapper_bender": {},
"augmenter_bender": {},
"augmenting_data_retrievers": [
{
"ticket_approval_data_retriever": {
"cached_tickets_enabled": true
}
}
],
"record_prefilter_dsl": "true",
"database_filter_dsl": "true",
"version": {
"change_description": "Create approval resource"
}
}