You can view the details of a workflow run via the API.
Get Workflow Run
To view a workflow run, send a GET request to https://api.copy.ai/api/workflow/<workflow_id>/run/<run_id>.
You will receive a response with the details of the workflow run.
For example:
{
"status": "success",
"data": {
"status": "COMPLETE",
"input": {
"Input 1": "Inputs vary depending on the workflow used.",
"Input 2": "The best way to see an example is to try it!"
},
"output": {
"Output 1": "Outputs vary depending on the workflow used.",
"Output 2": "The best way to see an example is to try it!"
},
"metadata": {
"api": true
},
"createdAt": "2023-04-06T22:34:46.704Z",
"id": "<run_id>",
"credits": 2
}
}
Run status types
| Status | Description |
|---|---|
NEW | The workflow run has just been created and is ready to be queued for processing. |
WAITING | The workflow run is waiting for required resources or conditions to be met before it can proceed. |
PROCESSING | The workflow run is currently being executed and processed. |
COMPLETE | The workflow run has successfully finished processing and all steps have been completed. |
RETRYING | The workflow run encountered an issue and is retrying the failed steps before proceeding. |
FAILED | The workflow run has failed to complete due to an error, and further retries were unsuccessful. |
Track or poll for progress
This endpoint can be used to check the progress of your workflow run in real-time.
You can do this by repeatedly calling the endpoint with a short delay between requests.
When the workflow is done running, the status will change to COMPLETE.
Copy.ai API key for authentication
Copy.ai API key
ID of the workflow
ID of the workflow run
Success
{
"status": "success",
"data": {
"output": {
"text": "workflow run output"
},
"metadata": {
"interestingValue": "doublelyInterestingValue"
},
"createdAt": "2023-09-27T18:34:13.091Z",
"id": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
"workflowRunId": "WRUN-dc46baf3-cb19-4424-be04-95ba630409bf",
"workflowId": "WCFG-84e56597-ebaf-4b49-a98c-75cacd4aecaa",
"credits": "9001"
}
}Bad Request
Not Found
{
"status": "error",
"errorCode": "NOT_FOUND"
}