Obter os indicadores de serviço
RegistosGET /service-indicators
Utility service indicators for operational, commercial, and water-quality performance over a year or quarter, with formulas and data coverage
Computes the tenant's service performance indicators for a year or one quarter: continuity of service, collection efficiency, billing efficiency, water quality compliance and staff per 1,000 active connections. Each indicator carries its formula, numerator, denominator and coverage, or the reason it could not be computed. A period still running is cut at the current time, and a period that has not started returns 400. Requires reports:read.
Parâmetros
yearRequired calendar year to report on, from 2000 to 2100.
quarterOptional quarter of the year, 1 to 4; when omitted the whole year is reported.
staff_headcountOptional staff headcount for the period, a whole number of 0 or more, used only for the staff per 1,000 active connections indicator; without it that indicator is reported as missing.
Devolve
200 OK
Mostrar atributos
yearquarterperiod_startperiod_endindicatorsMostrar atributos filhos
keyum de
continuity_of_service,collection_efficiency,billing_efficiency,water_quality_compliance,staff_per_1000_connectionslabelunitstatusum de
ok,insufficient_datavalueformulanumeratordenominatorcoveragereason
Permissões reports:read · Funções: admin, analyst, finance, owner
curl -X GET "$BUSINESS_API/service-indicators" \
-H "Authorization: Bearer sk_test_..."
# Sem comando CLI equivalente; use cURL ou HTTP directo.
const res = await fetch("$BUSINESS_API/service-indicators", {
method: "GET",
headers: {
Authorization: "Bearer sk_test_..."
}
});
const data = await res.json();
import requests
res = requests.get(
"$BUSINESS_API/service-indicators",
headers={
"Authorization": "Bearer sk_test_..."
}
)
data = res.json()
req, _ := http.NewRequest("GET", "$BUSINESS_API/service-indicators", nil)
req.Header.Set("Authorization", "Bearer sk_test_...")
resp, err := http.DefaultClient.Do(req)
{
"year": 1,
"quarter": 1,
"period_start": "2026-11-19T09:30:00Z",
"period_end": "2026-11-19T09:30:00Z",
"indicators": [
{
"key": "continuity_of_service",
"label": "label",
"unit": "unit",
"status": "ok",
"value": 13.42,
"formula": "formula",
"numerator": 1,
"denominator": 1,
"coverage": "coverage",
"reason": "Leitura confirmada no local."
}
]
}