Skip to content
API PlatformDevelopers
GET/v1/reports/slabeta

SLA report

Needs
Read your data (mcp:read)
Plan
Any plan with API access
Limits
300 a minute per key
Undo
Nothing to undo: this only reads.

SLA breaches in a period by metric (first response, next response, resolution), by day and by staff member. Needs a key made by someone with report permission.

A metric this workspace cannot answer is null and listed in unavailable[] with the reason. Never read `null` as zero.

Try it

Query (5)

A named period. Default `last_7_days`. Weeks start on Monday.

First day, YYYY-MM-DD. Give `from` and `to` together; they override `preset`. Up to 186 days.

Last day (inclusive), YYYY-MM-DD.

IANA time zone, e.g. `Asia/Dubai`. Default: your workspace time zone.

metric_types optional

Only these metrics.

This only reads. It uses your real data and changes nothing.

Code and response

curl -X GET 'https://mcp.wa-api.cloud/v1/reports/sla' \
  -H "Authorization: Bearer $API_KEY"

The code reads your key from $API_KEY.

Parameters

Parameters
FieldTypeWhat it is
presetstring · queryA named period. Default last_7_days. Weeks start on Monday.one of: today, yesterday, last_7_days, last_14_days, last_30_days, this_month, last_month, this_week, last_week
fromstring · queryFirst day, YYYY-MM-DD. Give from and to together; they override preset. Up to 186 days.pattern ^\d{4}-\d{2}-\d{2}$
tostring · queryLast day (inclusive), YYYY-MM-DD.pattern ^\d{4}-\d{2}-\d{2}$
timezonestring · queryIANA time zone, e.g. Asia/Dubai. Default: your workspace time zone.1–64 characters
metric_typesarray of string · queryOnly these metrics.1–3 items

Headers

Headers
FieldTypeWhat it is
AuthorizationrequiredheaderBearer $API_KEY — your API key.
Api-VersionheaderThe API version to use, e.g. 2026-10-01. Default: the version your key is pinned to.one of: 2026-10-01 · pattern ^\d{4}-\d{2}-\d{2}$

Response 200

The report.

Response fields
FieldTypeWhat it is
rangerequiredobjectThe range and timezone these numbers were counted in — always state it when reporting them.
fromrequiredstringFirst local day (YYYY-MM-DD), inclusive.
torequiredstringLast local day (YYYY-MM-DD), inclusive.
daysrequiredintegerNumber of local days in the range.-9007199254740991–9007199254740991
timezonerequiredstringIANA timezone the days were counted in.
started_atrequiredstringRange start as a UTC instant (ISO-8601).
ended_atrequiredstringRange end as a UTC instant (ISO-8601), exclusive.
presetrequiredstring or nullThe named range used, if any.
sla_runningrequiredboolean or nullIs SLA actually running for this workspace (plan entitlement AND the module switch)? null = unknown.
totalsrequiredobject
breachesrequiredinteger or nullAll breaches in the range (The platform's own count, even when the row scan was capped).-9007199254740991–9007199254740991
by_metricrequiredobject
first_responserequiredinteger-9007199254740991–9007199254740991
next_responserequiredinteger-9007199254740991–9007199254740991
resolutionrequiredinteger-9007199254740991–9007199254740991
totalrequiredinteger-9007199254740991–9007199254740991
unresolvedrequiredintegerBreaches whose clock had still not been satisfied when scanned.-9007199254740991–9007199254740991
acknowledgedrequiredinteger-9007199254740991–9007199254740991
avg_breach_secondsrequirednumber or nullAverage working-time lateness across the scanned breaches.
compliance_raterequirednullAlways null here: "met" counts exist only inside a generated staff report.
by_policyrequiredarray of objectMost breaches first. policyId null = no policy recorded on the breach.
policy_idrequiredstring or null
namerequiredstring or null
activerequiredboolean or null
breachesrequiredobject
first_responserequiredinteger-9007199254740991–9007199254740991
next_responserequiredinteger-9007199254740991–9007199254740991
resolutionrequiredinteger-9007199254740991–9007199254740991
totalrequiredinteger-9007199254740991–9007199254740991
by_dayrequiredarray of objectBreaches per day, keyed on the day the platform rendered the breach time in.
daterequiredstring
breachesrequiredinteger-9007199254740991–9007199254740991
worst_offendersrequiredarray of object
staff_idrequiredstring or nullnull = nobody was assigned when the clock stopped.
namerequiredstring or null
breachesrequiredobject
first_responserequiredinteger-9007199254740991–9007199254740991
next_responserequiredinteger-9007199254740991–9007199254740991
resolutionrequiredinteger-9007199254740991–9007199254740991
totalrequiredinteger-9007199254740991–9007199254740991
avg_breach_secondsrequirednumber or nullAverage working-time lateness of their breaches.
unresolvedrequiredinteger-9007199254740991–9007199254740991
config_problemsrequiredarray of objectWhy SLA timers do or do not run (from the platform's SLA diagnosis).
severityrequiredstring
coderequiredstring
messagerequiredstring
fix_hintrequiredstring
scannedrequiredintegerBreach rows read to build the groupings.-9007199254740991–9007199254740991
truncatedrequiredbooleantrue = the row scan hit its cap or the time budget; groupings cover only the rows scanned (totals.breaches is still the platform's full count).
notesrequiredarray of string
unavailablerequiredarray of objectMetrics that are UNKNOWN (missing data source), not zero. Say so when reporting; do not fill them in with 0.
metricrequiredstringWhich metric or section is missing, e.g. "messages.read".
reasonrequiredstringWhy it is missing (not supported by this server version, service not configured, forbidden, temporarily unavailable…).

Errors

Errors are application/problem+json. Branch on code.

StatusCodeWhen
400invalid_input

A field is missing or has the wrong format. errors[] points at each field. The range is reversed, in the future, longer than 186 days, or the time zone is unknown.

401unauthenticated

The Authorization header is missing, the key is unknown, expired or revoked.

403entitlement_required

The workspace's plan does not include API access (api_access).

403forbidden

The key owner has no report permission.

403insufficient_scope

The key does not have the permission this operation needs.

429rate_limited

The key or workspace went over its rate limit. Wait for Retry-After seconds.

503upstream_unavailable

A service behind the API is briefly unavailable. Safe to retry with backoff.

Examples

Last 7 days

Response 200

{
  "range": {
    "from": "2026-09-17",
    "to": "2026-09-23",
    "days": 7,
    "timezone": "Asia/Dubai",
    "started_at": "2026-09-16T20:00:00Z",
    "ended_at": "2026-09-23T20:00:00Z",
    "preset": "last_7_days"
  },
  "sla_running": true,
  "totals": {
    "breaches": 7,
    "unresolved": 1,
    "by_metric": {
      "first_response": -9007199254740991,
      "next_response": -9007199254740991,
      "resolution": -9007199254740991,
      "total": -9007199254740991
    },
    "acknowledged": -9007199254740991,
    "avg_breach_seconds": null,
    "compliance_rate": null
  },
  "by_day": [
    {
      "date": "2026-09-23",
      "breaches": 2
    }
  ],
  "worst_offenders": [
    {
      "staff_id": "1203",
      "name": "Priya Nair",
      "breaches": {
        "first_response": -9007199254740991,
        "next_response": -9007199254740991,
        "resolution": -9007199254740991,
        "total": -9007199254740991
      },
      "avg_breach_seconds": null,
      "unresolved": -9007199254740991
    }
  ],
  "notes": [],
  "unavailable": [],
  "by_policy": [],
  "config_problems": [],
  "scanned": -9007199254740991,
  "truncated": false
}

Operation path

The same operation is also at POST /v1/ops/reports_sla, with every field in the JSON body.