Python
from parallel import Parallel
client = Parallel()
stats = client.monitor.stats()
print(stats.total, stats.processor_counts.get("active", {}))import Parallel from "parallel-web";
const client = new Parallel();
const stats = await client.monitor.stats();
console.log(stats.total, stats.processor_counts['active'] ?? {});HttpResponse<String> response = Unirest.get("https://api.parallel.ai/v1/monitors/stats")
.header("x-api-key", "<api-key>")
.asString();curl --request GET \
--url https://api.parallel.ai/v1/monitors/stats \
--header 'x-api-key: <api-key>'{
"total": 123,
"processor_counts": {
"active": {
"base": {
"1d": 12
},
"lite": {
"1d": 5,
"1h": 25
}
},
"cancelled": {
"lite": {
"1h": 7
}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}Monitor
Monitor Stats
Return aggregate counts of your monitors.
Counts every monitor across all statuses, broken down by status and then by processor and run frequency (e.g. ‘1h’, ‘1d’) within each status. Statuses, processors, and frequencies with zero monitors are omitted. Use this instead of paginating List Monitors when only counts are needed.
GET
/
v1
/
monitors
/
stats
Python
from parallel import Parallel
client = Parallel()
stats = client.monitor.stats()
print(stats.total, stats.processor_counts.get("active", {}))import Parallel from "parallel-web";
const client = new Parallel();
const stats = await client.monitor.stats();
console.log(stats.total, stats.processor_counts['active'] ?? {});HttpResponse<String> response = Unirest.get("https://api.parallel.ai/v1/monitors/stats")
.header("x-api-key", "<api-key>")
.asString();curl --request GET \
--url https://api.parallel.ai/v1/monitors/stats \
--header 'x-api-key: <api-key>'{
"total": 123,
"processor_counts": {
"active": {
"base": {
"1d": 12
},
"lite": {
"1d": 5,
"1h": 25
}
},
"cancelled": {
"lite": {
"1h": 7
}
}
}
}{
"type": "error",
"error": {
"ref_id": "fcb2b4f3-c75e-4186-87bc-caa1a8381331",
"message": "Unauthorized: invalid or missing credentials"
}
}Authorizations
Response
Aggregate monitor counts.
Aggregate counts of the authenticated client's monitors.
Total number of monitors across all statuses and processors.
Number of monitors per run frequency (e.g. '1h', '1d'), keyed by status and processor. Statuses, processors, and frequencies with zero monitors are omitted.
Show child attributes
Show child attributes
Example:
{
"active": {
"base": { "1d": 12 },
"lite": { "1d": 5, "1h": 25 }
},
"cancelled": { "lite": { "1h": 7 } }
}