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
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",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text"
}
]
}
Retrieve workflow by tag or ID.
API key must have the View workflows
permission.
The tag or unique, auto-generated identifier for the workflow.
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",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text"
}
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
Icon tag for the workflow
Whether the workflow is a draft
Name of the workflow
Template for the response when the workflow is run
Tag of the workflow
POST /api/v1/workflows HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 400
{
"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",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text"
}
{
"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",
"filter": {
"type": "GLOBAL"
},
"iconTag": "text",
"isDraft": true,
"name": "text",
"runResponseTemplate": "text",
"runRestrictionPolicies": [
{
"id": "text",
"type": "USER"
}
],
"tag": "text"
}
Validates YAML descriptor.
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
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.
DELETE /api/v1/workflows/{tagOrId} HTTP/1.1
Host: api.getcortexapp.com
Authorization: Bearer JWT
Accept: */*
No content
Last updated
Was this helpful?