Skip to content
SarvexDocs
Esc
↑↓navigate↵open⌘Jpreview

Get a store's overall health

Semantic endpoint health, consistency status, and sync freshness (pre-existing statements) plus, additively, the endpoint-health composite status and its currently active alerts (endpoint_status, active_alerts — both omitted if the endpoint-health workers aren’t deployed in this environment).

GET/stores/{store_id}/health
Authorization
AuthorizationBearer token (JWT) · headerrequired

JWT issued by the external IdP via the OAuth 2.0 authorization-code flow (Kinde in production; a simulator in test). The client obtains it and sends it as a Bearer token on every authenticated call. Sarvex's services verify it — issuer, audience, signature (IdP JWKS), expiry — and read identity and tenant from its claims. Sarvex does not issue or revoke these tokens. merchant_id/store_id are read from the verified claims (and the merchant→store mapping), never from the URL. The operator scope is required for /operator/*. Operators acting on a specific merchant pass the X-Operate-As header, which is recorded in the audit log.

Path parameters
store_idstringrequired

A store the caller's merchant owns. Authorized server-side against the principal; not a free-form tenant selector.

Responses
200

Health.

statementshealth_statement[]
Show properties
Array of health_statement
kindstring
Allowed:consistencysemantic_endpointsync_freshnessprofile_edge
okboolean
messagestring

Server-rendered English. Clients with copy of their own for this kind should render that instead and use message only as a fallback.

paramsobject

The statement's facts as data, so a client can render its own sentence: critical_count/warning_count on consistency, age_seconds on sync_freshness. Present only where the statement has numbers to report.

checked_atstring<date-time>
endpoint_statusendpoint_status

Composite status derived from synthetic probes and real-traffic telemetry — see internal/planes/control/endpointhealth.

Show properties
statusstring
Allowed:healthydegradedcritical
evaluated_atstring<date-time>
checksobject
active_alertsalert[]
Show properties
Array of alert
alert_idstring
store_idstring
check_typestring
severitystring
Allowed:healthydegradedcritical
statusstring
Allowed:openacknowledgedresolved
detailstring
opened_atstring<date-time>
acknowledged_atstring<date-time> | null
acknowledged_bystring
resolved_atstring<date-time> | null
auto_resolvedboolean
Try it
Server
Authorization
Parameters
Request
curl -X GET "https://api.sarvex.example.com/v1/stores/string/health" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "statements": [
    {
      "kind": "consistency",
      "ok": true,
      "message": "Your prices match across all sources.",
      "params": {
        "age_seconds": 7258
      },
      "checked_at": "2019-08-24T14:15:22Z"
    }
  ],
  "endpoint_status": {
    "status": "healthy",
    "evaluated_at": "2019-08-24T14:15:22Z",
    "checks": {
      "profile_reachable": {
        "state": "pass",
        "current_value": 0
      },
      "signature_roundtrip": {
        "state": "pass",
        "current_value": 0.01
      }
    }
  },
  "active_alerts": [
    {
      "alert_id": "alt_01J8Z3...",
      "store_id": "string",
      "check_type": "signature_roundtrip",
      "severity": "healthy",
      "status": "open",
      "detail": "string",
      "opened_at": "2019-08-24T14:15:22Z",
      "acknowledged_at": "2019-08-24T14:15:22Z",
      "acknowledged_by": "string",
      "resolved_at": "2019-08-24T14:15:22Z",
      "auto_resolved": true
    }
  ]
}