API Reference
Collections
Records
Workflows
- GETDiscover Workflows
- GETGet Discoverable Workflow
- GETGet Discoverable Workflow Version
- POSTRun Discoverable Workflow
- POSTCancel a Discoverable Workflow Run
- GETGet Workflows
- GETGet a Workflow
- GETGet Workflow Runs
- POSTRun a Workflow
- POSTReplay a Workflow Run
- GETGet a Workflow Run
- POSTCancel a Workflow Run
- GETGet Workflow Versions
- GETGet a Workflow Version
Tests
Variables
Cancel Test
Cancel a running workflow test by its ID.
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}/cancel
{
"id": "<string>",
"name": "<string>",
"status": "PASSED",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<any>",
"output_logs": [
"<any>"
],
"status": "PASSED"
}
],
"expectations_passing_count": 123,
"expectations_failing_count": 123,
"workflow_id": "<string>",
"run": {
"id": "<string>",
"result": "<any>",
"input": {},
"output": {},
"status": "RUNNING",
"origin": "WORKFLOW",
"error": "<string>",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"app_id": "<string>",
"workflow_app_id": "<string>",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"note": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"rollback_version": 123,
"notes": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"note": "<string>"
}
]
},
"collection_id": "<string>",
"record_id": "<string>",
"version": 123,
"usage": {
"total": 123,
"steps": {}
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}
Path Parameters
The ID of the app
The ID of the workflow
The ID of the test
Query Parameters
all
Response
Detailed information about a workflow test
Unique identifier for the workflow test
Name of the workflow test
Status of the workflow test
DRAFT
, CANCELLED
, RUNNING
, FAILED
, PASSED
Number of passing expectations
Number of failing expectations
Identifier of the associated workflow
Run details of the workflow test
Unique identifier for the run
Output of the run
Detailed information about the step run
Status of the step run, must be RUNNING
RUNNING
Key of the step run
1 - 128
Output of the step run
ID of the workflow run that ran this step
ID of the app that this step belongs to
ID of the workflow
ID of the app that the workflow belongs to
Status of the step run
PENDING
, RUNNING
, CANCELLED
, COMPLETED
, SKIPPED
, FAILED
Origin of the step run
WORKFLOW
, RECORD
, TEST
, ENDPOINT
Error message if the step run failed
Credits usage of the step run
Result of the workflow step run
Output of the workflow step run
Timestamp of when the step run started
Status of the run
PENDING
, RUNNING
, CANCELLED
, COMPLETED
, SKIPPED
, FAILED
Origin of the run
WORKFLOW
, RECORD
, TEST
, ENDPOINT
Timestamp of when the run started
Timestamp of when the run ended
ID of the associated app where the run was triggered from
ID of the associated app where the workflow belongs to
ID of the associated workflow
Draft version of the workflow
Unique key for the workflow version
Input definition of the workflow
The file type allows users to upload files
The type of the input field
file
The name of the input field
1024
The description of the input field
10240
Indicates whether the input field is optional
Indicates whether the input field can contain multiple values
The placeholder of the input field
512
Display options for the file field
The order of the input field relative to other fields in the form
x > 0
Whether to make the field a configuration field (only visible in the configuration tab)
Allowed mime types for the file field (e.g. image/*, application/pdf)
Flag to extract contents from the file
Flag to extract images from the file
Default config input values of the workflow
Input options of the workflow
Display options for the input fields
Controls how the label and input field are arranged (inline or stacked)
inline
, stacked
Controls how the field container behaves in terms of width and positioning
grid
, full
, center
Indicates whether the input field is hidden from the UI
Steps of the workflow at the time this version was deployed
The type of the step
note
A unique key for the step
1 - 128
The note content (markdown supported)
A condition to determine if the step should run
A loop condition for the step to repeat running until the condition is met
Whether to throw an error if the step fails
Whether the step is connected to the input
The step keys that this step connects to
The position of the step on the canvas
The size of the step on the canvas
Details of the workflow version used for the run
Unique identifier for the workflow version
App id where the workflow version belongs to
Workflow id where the version belongs to
Description of the workflow at the time this version was deployed
Version number
Release notes
Date when the version was deployed
Unique key for the workflow version
Input definition of the workflow
The file type allows users to upload files
The type of the input field
file
The name of the input field
1024
The description of the input field
10240
Indicates whether the input field is optional
Indicates whether the input field can contain multiple values
The placeholder of the input field
512
Display options for the file field
The order of the input field relative to other fields in the form
x > 0
Whether to make the field a configuration field (only visible in the configuration tab)
Allowed mime types for the file field (e.g. image/*, application/pdf)
Flag to extract contents from the file
Flag to extract images from the file
Default config input values of the workflow
Input options of the workflow
Display options for the input fields
Controls how the label and input field are arranged (inline or stacked)
inline
, stacked
Controls how the field container behaves in terms of width and positioning
grid
, full
, center
Indicates whether the input field is hidden from the UI
Steps of the workflow at the time this version was deployed
The type of the step
note
A unique key for the step
1 - 128
The note content (markdown supported)
A condition to determine if the step should run
A loop condition for the step to repeat running until the condition is met
Whether to throw an error if the step fails
Whether the step is connected to the input
The step keys that this step connects to
The position of the step on the canvas
The size of the step on the canvas
Version number from which this version was rolled back
Timestamp of when the run was created
Timestamp of when the run was last updated
Result of the run
Error message if the run failed
ID of the associated collection
ID of the associated record
Version number of the workflow
Creation date of the workflow test
Last update date of the workflow test
Default input values for the workflow test
Default input values for the workflow test
List of expectations that will be executed for the workflow test
Unique key for the expectation (max 256 characters)
1 - 256
Name of the expectation (max 256 characters)
1 - 256
Unique identifier for the expectation
256
JavaScript code that results in a boolean value determining if the expectation passed or failed
10240
Output of the expectation
Status of the expectation
PASSED
, FAILED
Was this page helpful?
curl --request POST \
--url https://api.withcortex.ai/apps/{app_id}/workflows/{workflow_id}/tests/{test_id}/cancel
{
"id": "<string>",
"name": "<string>",
"status": "PASSED",
"input": {},
"input_default": {},
"input_context": {},
"expectations": [
{
"key": "<string>",
"name": "<string>",
"expectation_id": "<string>",
"script": "<string>",
"output": "<any>",
"output_logs": [
"<any>"
],
"status": "PASSED"
}
],
"expectations_passing_count": 123,
"expectations_failing_count": 123,
"workflow_id": "<string>",
"run": {
"id": "<string>",
"result": "<any>",
"input": {},
"output": {},
"status": "RUNNING",
"origin": "WORKFLOW",
"error": "<string>",
"started_at": "2023-12-25",
"ended_at": "2023-12-25",
"app_id": "<string>",
"workflow_app_id": "<string>",
"workflow_id": "<string>",
"workflow_version_draft": {
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"note": "<string>"
}
]
},
"workflow_version": {
"id": "<string>",
"app_id": "<string>",
"workflow_id": "<string>",
"description": "<string>",
"version": 123,
"rollback_version": 123,
"notes": "<string>",
"created_by": {
"id": "<string>",
"name": "<string>"
},
"created_at": "2023-12-25",
"key": "<string>",
"input": {},
"input_default": {},
"input_options": {
"display": {
"field": "inline",
"container": "grid",
"hidden": true
}
},
"steps": [
{
"type": "note",
"key": "<string>",
"conditional": "<string>",
"loop": "<string>",
"throw_on_error": true,
"input_connected": true,
"destinations": [
"<string>"
],
"position": [
123
],
"size": [
101
],
"note": "<string>"
}
]
},
"collection_id": "<string>",
"record_id": "<string>",
"version": 123,
"usage": {
"total": 123,
"steps": {}
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
},
"created_at": "2023-12-25",
"updated_at": "2023-12-25"
}