List recent runs for an automation
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "ear_abc123def456",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"evidenceAutomationId": "aut_abc123def456",
"status": "pending",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"success": true,
"error": "<string>",
"evaluationStatus": "pass",
"evaluationReason": "<string>",
"triggeredBy": "manual",
"runDuration": 123,
"version": 123,
"taskId": "<string>",
"evidenceAutomation": {
"name": "<string>"
}
}
]Task Automations
List recent runs for an automation | Comp AI API
Returns the newest runs of an automation without logs or output. Use limit to choose how many (default 50, max 100). Use get-automation-run with a run id.
GET
/
v1
/
tasks
/
{taskId}
/
automations
/
{automationId}
/
runs
List recent runs for an automation
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)[
{
"id": "ear_abc123def456",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"evidenceAutomationId": "aut_abc123def456",
"status": "pending",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"success": true,
"error": "<string>",
"evaluationStatus": "pass",
"evaluationReason": "<string>",
"triggeredBy": "manual",
"runDuration": 123,
"version": 123,
"taskId": "<string>",
"evidenceAutomation": {
"name": "<string>"
}
}
]Authorizations
API key for authentication
Query Parameters
Number of newest runs to return. Defaults to 50, max 100.
Response
200 - application/json
Runs retrieved successfully, newest first, without logs/output
Example:
"ear_abc123def456"
Example:
"aut_abc123def456"
Available options:
pending, running, completed, failed, cancelled Available options:
pass, fail Available options:
manual, scheduled, api Run duration in milliseconds
Script version that was executed; null for a draft run
Show child attributes
Show child attributes
Was this page helpful?

