Agents
Get aggregate run counts for an agent
Returns the total number of Runs for an Agent together with a breakdown by RunStatus,
counted across both current Runs and Run history.
Use this instead of counting the response of GET /api/v1/agent/{agentId}/runs. That
endpoint returns at most maxRecords Runs — 50 by default — so counting it reports the
cap rather than the real total for any Agent that has run more often than the limit.
Reading the breakdown
- Each entry carries the numeric
status, itsstatusName, and thecount. - Statuses with no Runs are omitted rather than reported as zero.
FailureandFailedare distinct statuses, as areCompletedandSuccess. Add the pairs together if you want a single failed or succeeded figure.
GET
/
api
/
v1
/
agent
/
{agentId}
/
runs
/
summary
cURL
curl https://dashboard.sequentum.com/api/v1/agent/289/runs/summary \
-H "Authorization: ApiKey $SEQUENTUM_API_KEY"
# => {
# "totalCount": 395,
# "statusCounts": [
# { "status": 9, "statusName": "Completed", "count": 272 },
# { "status": 7, "statusName": "Failed", "count": 72 },
# { "status": 8, "statusName": "Stopped", "count": 51 }
# ]
# }const res = await fetch("https://dashboard.sequentum.com/api/v1/agent/289/runs/summary", {
headers: {
"Authorization": `ApiKey ${process.env.SEQUENTUM_API_KEY}`,
},
});
const summary = await res.json();
console.log(`${summary.totalCount} runs total`);
for (const s of summary.statusCounts) {
console.log(` ${s.statusName}: ${s.count}`);
}import os
import requests
response = requests.get(
"https://dashboard.sequentum.com/api/v1/agent/289/runs/summary",
headers={"Authorization": f"ApiKey {os.environ['SEQUENTUM_API_KEY']}"},
)
response.raise_for_status()
summary = response.json()
print(f"{summary['totalCount']} runs total")
for s in summary["statusCounts"]:
print(f" {s['statusName']}: {s['count']}"){
"totalCount": 123,
"statusCounts": [
{
"status": 123,
"statusName": "<string>",
"count": 123
}
]
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}