Workflow SLA Compliance Report
SLA compliance per workflow step — met vs missed counts, compliance rate, average response/resolution times, and breaches.
/apidev/v1/reports/workflow/sla-complianceOverview
Aggregates SLA outcomes by workflow step over the date range. Each row reports the step and its parent workflow, the total tasks with an SLA outcome, how many met vs missed the SLA, the resulting compliance percentage, the average response and resolution times, and the number of breaches. Results are paginated and ordered server-side.
This report depends on SLA tracking being enabled per company. If the company has no SLA configuration, the report returns an empty result (data: [], total: 0) instead of an error. Configure SLA on the affected workflow steps to populate this report.
Request
Request Headers
Every request to a protected endpoint requires these headers:
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token obtained from the Login endpoint. Format: Bearer <token> |
X-API-Key | Yes | Company integration key provided during onboarding. Format: gtk_xxx... |
tenant | Yes | Your assigned tenant domain (default: geotareas.com) — always send your assigned tenant |
Content-Type | Conditional | application/json — required for POST and PUT requests |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
startdate | string | Yes | — | ISO 8601 start date-time (e.g. 2026-03-01T00:00:00). Filters by task creation date. |
enddate | string | Yes | — | ISO 8601 end date-time. Max range 92 days from startdate. |
definition_ids | string | No | — | Comma-separated workflow definition IDs to include. Max 100. |
sort_by | string | No | totalTasks | Column to sort by. One of: totalTasks, slaMetCount, slaMissedCount, avgResponseSeconds, avgResolutionSeconds, breachCount, stepName, workflowName. |
sort_dir | string | No | desc | Sort direction: asc or desc. |
limit | integer | No | 25 | Number of records per page (1–100). |
offset | integer | No | 0 | Number of records to skip for pagination. |
sort_by is validated per reportThis report accepts exactly these values:
totalTasks · slaMetCount · slaMissedCount · avgResponseSeconds · avgResolutionSeconds · breachCount · stepName · workflowName
Anything else returns 400 VALIDATION_ERROR, and the message names the accepted values. Until 2026-08-16 an unrecognised sort_by was silently ignored and the report came back in its default order, so a mis-typed column looked like it had worked.
Code Examples
- cURL
- JavaScript
- Python
curl -s -H "Authorization: Bearer $TOKEN" \
-H "X-API-Key: $APIKEY" \
-H "tenant: $TENANT" \
"https://$TENANT/apidev/v1/reports/workflow/sla-compliance?startdate=2026-03-01T00:00:00&enddate=2026-03-31T23:59:59&limit=25"
const res = await fetch(
`https://${TENANT}/apidev/v1/reports/workflow/sla-compliance?startdate=2026-03-01T00:00:00&enddate=2026-03-31T23:59:59&limit=25`,
{
headers: {
'Authorization': `Bearer ${TOKEN}`,
'X-API-Key': APIKEY,
'tenant': TENANT,
},
}
);
const data = await res.json();
import requests
response = requests.get(
f"https://{TENANT}/apidev/v1/reports/workflow/sla-compliance",
headers={"Authorization": f"Bearer {TOKEN}", "X-API-Key": APIKEY, "tenant": TENANT},
params={"startdate": "2026-03-01T00:00:00", "enddate": "2026-03-31T23:59:59", "limit": 25},
)
data = response.json()
Response
Response Fields
| Field | Type | Description |
|---|---|---|
wfstepid | string | Workflow step ID. |
stepName | string | Workflow step name. |
workflowName | string | Parent workflow definition name. |
totalTasks | number | Tasks with an SLA outcome in the period. |
slaMetCount | number | Tasks that met the SLA (MET / ON_TIME). |
slaMissedCount | number | Tasks that missed the SLA (BREACHED / MISSED). |
slaCompliancePercent | number | Compliance rate: met / total × 100. |
avgResponseSeconds | number | Average time to first response (seconds). |
avgResolutionSeconds | number | Average time to resolution (seconds). |
breachCount | number | Tasks explicitly marked BREACHED. |
Example Response
{
"success": true,
"data": [
{
"wfstepid": "120384756293001",
"stepName": "Field Inspection",
"workflowName": "Incident Resolution",
"totalTasks": 48,
"slaMetCount": 41,
"slaMissedCount": 7,
"slaCompliancePercent": 85.42,
"avgResponseSeconds": 512.4,
"avgResolutionSeconds": 8740.1,
"breachCount": 5
}
],
"meta": {
"total": 1,
"limit": 25,
"offset": 0
}
}
When SLA is not configured for the company, the response is empty:
{
"success": true,
"data": [],
"meta": { "total": 0, "limit": 25, "offset": 0 }
}
Errors
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid params: missing dates, range > 92 days, invalid enum values. |
INVALID_DATE_RANGE | 400 | Date range invalid or greater than 92 days. |
UNAUTHORIZED | 401 | Missing, invalid, or expired tenant / Authorization / X-API-Key |
FORBIDDEN | 403 | User lacks required permission. |
RATE_LIMITED | 429 | Exceeded 10 req/min. |
INTERNAL_ERROR | 500 | Unexpected server error. |