Count automation runs since a date
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs/summary \
--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/summary', 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/summary"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"successful": 123
}Task Automations
Count automation runs since a date | Comp AI API
Count all runs of one automation created since a timestamp, and how many succeeded. Use for success-rate metrics instead of listing runs.
GET
/
v1
/
tasks
/
{taskId}
/
automations
/
{automationId}
/
runs
/
summary
Count automation runs since a date
curl --request GET \
--url https://api.trycomp.ai/v1/tasks/{taskId}/automations/{automationId}/runs/summary \
--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/summary', 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/summary"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"total": 123,
"successful": 123
}Authorizations
API key for authentication
Query Parameters
ISO 8601 date-time with a timezone (Z or ±hh:mm). Only runs created at or after this instant are counted.
Example:
"2026-10-19T00:00:00.000Z"
Was this page helpful?

