Workflows
Use these operations to interact with Workflows in Cortex.
Required permissions
View Workflows: Your API key must have the
View Workflows
permission.Create or update Workflows: Your API key must have the
Edit Workflows
permission.Callback a paused async HTTP block: Your API key must have
Edit Workflow Runs
permission.
Operations
List workflows.
API key must have the View workflows
permission.
When true, returns the list of actions for each workflow. Defaults to false.
false
When set, only returns workflows with the given substring in the name or description.
Number of results to return per page, between 1 and 1000. Default 250.
250
Page number to return, 0-indexed. Default 0.
0
Successfully found workflows
Access denied
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/workflows HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"page": 1,
"total": 1,
"totalPages": 1,
"workflows": [
{
"actions": [
{
"isRootAction": true,
"name": "text",
"outgoingActions": [
"text"
],
"schema": {
"type": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"httpMethod": "GET",
"payload": "text",
"url": "text"
},
"slug": "text"
}
],
"description": "text",
"failedRunResponseTemplate": "text",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"restrictActionCompletionToRunnerUser": true,
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text",
"variables": [
{
"defaultValue": {},
"slug": "text",
"type": "STRING"
}
]
}
]
}
Retrieve workflow by tag or ID.
API key must have the View workflows
permission.
The tag or unique, auto-generated identifier for the workflow.
Successfully found workflow
Access denied
Workflow not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
GET /api/v1/workflows/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
{
"actions": [
{
"isRootAction": true,
"name": "text",
"outgoingActions": [
"text"
],
"schema": {
"type": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"httpMethod": "GET",
"payload": "text",
"url": "text"
},
"slug": "text"
}
],
"description": "text",
"failedRunResponseTemplate": "text",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"restrictActionCompletionToRunnerUser": true,
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text",
"variables": [
{
"defaultValue": {},
"slug": "text",
"type": "STRING"
}
]
}
Create or update new workflow.
API key must have the Edit workflows
permission.
Note: If a workflow with the same tag already exists, it will be updated.
Description of the workflow
Template for the response when the workflow run fails
Icon tag for the workflow
Whether the workflow is a draft
Name of the workflow
If true, only the user who started the workflow can complete actions. Defaults to false.
Template for the response when the workflow is completed successfully
Tag of the workflow
Workflow created successfully
Bad request
Access denied
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/workflows HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 543
{
"actions": [
{
"isRootAction": true,
"name": "text",
"outgoingActions": [
"text"
],
"schema": {
"type": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"httpMethod": "GET",
"payload": "text",
"url": "text"
},
"slug": "text"
}
],
"description": "text",
"failedRunResponseTemplate": "text",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"restrictActionCompletionToRunnerUser": true,
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text",
"variables": [
{
"defaultValue": {},
"slug": "text",
"type": "STRING"
}
]
}
{
"actions": [
{
"isRootAction": true,
"name": "text",
"outgoingActions": [
"text"
],
"schema": {
"type": "text",
"headers": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"httpMethod": "GET",
"payload": "text",
"url": "text"
},
"slug": "text"
}
],
"description": "text",
"failedRunResponseTemplate": "text",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"restrictActionCompletionToRunnerUser": true,
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text",
"variables": [
{
"defaultValue": {},
"slug": "text",
"type": "STRING"
}
]
}
Validates YAML descriptor.
Validation result
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/workflows/validate HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
{
"ok": true,
"violations": [
{
"description": "text",
"endLine": 1,
"paths": [
"text"
],
"pointer": "text",
"ruleLink": "text",
"startLine": 1,
"title": "text",
"violationType": "MUST"
}
]
}
Updates an asynchronous HTTP request Workflow block.
API key must have the Edit workflow runs
permission.
The tag or unique, auto-generated identifier for the workflow.
Callback ID; Provided by the Workflow block when it runs
Human readable message to be shown to the user
Status of the callback request. UPDATE
keeps the workflow paused
Successfully received Workflow callback
No content
Bad request
Access denied
Workflow run or block not found
Workflow block is not waiting for callback
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
POST /api/v1/workflows/{tagOrId}/callback/{callbackId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"message": "text",
"response": {
"ANY_ADDITIONAL_PROPERTY": {}
},
"status": "SUCCESS"
}
No content
Delete workflow by tag or ID.
API key must have the Edit workflows
permission.
The tag or unique, auto-generated identifier for the workflow.
Workflow deleted successfully
No content
Workflow not found
The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.
DELETE /api/v1/workflows/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
No content
Last updated
Was this helpful?