Skip to main content

Admin Dashboard — Sync Contract

Status: populated Owner: Platform Engineering (Frontend) Last updated: 2026-04-18

1. Overview

All communication is synchronous REST over HTTPS through Kong admin routes. The dashboard also performs periodic polling (30s) for real-time metric updates.

2. Kong Admin Routes Consumed

All routes pass through Kong. Internal routes use the prefix /v1/internal/ and require the admin role claim in the JWT.

Auth Service

MethodKong RouteAuth
GET/v1/internal/auth/meFirebase ID token (pre-login exchange)
POST/v1/auth/refreshRefresh token cookie
GET/v1/internal/usersBearer JWT (admin)
POST/v1/internal/usersBearer JWT (admin)
PUT/v1/internal/users/{userId}/statusBearer JWT (admin)
DELETE/v1/internal/users/{userId}Bearer JWT (admin)

Analytics Service

MethodKong RoutePolled?
GET/v1/internal/analytics/summaryYes (30s)
GET/v1/internal/analytics/throughputYes (30s)
GET/v1/internal/analytics/delivery-breakdownYes (30s)
GET/v1/internal/analytics/top-operatorsYes (30s)

Operator Management Service

MethodKong RouteAuth
GET/v1/internal/operatorsBearer JWT
GET/v1/internal/operators/{id}Bearer JWT
POST/v1/internal/operatorsBearer JWT
PUT/v1/internal/operators/{id}Bearer JWT
DELETE/v1/internal/operators/{id}Bearer JWT
GET/v1/internal/operators/{id}/healthBearer JWT

Routing Engine

MethodKong RouteAuth
GET/v1/internal/routing/rulesBearer JWT
POST/v1/internal/routing/rulesBearer JWT
PUT/v1/internal/routing/rules/{id}Bearer JWT
DELETE/v1/internal/routing/rules/{id}Bearer JWT
POST/v1/internal/routing/rules/reorderBearer JWT

Message Store

MethodKong RouteAuth
GET/v1/internal/messagesBearer JWT
GET/v1/internal/messages/{id}Bearer JWT

Billing Service

MethodKong RouteAuth
GET/v1/internal/billing/invoicesBearer JWT
GET/v1/internal/billing/invoices/{id}Bearer JWT
GET/v1/internal/billing/pricingBearer JWT
PUT/v1/internal/billing/pricingBearer JWT

System Health

MethodKong RoutePolled?
GET/v1/internal/health/servicesYes (30s)
GET/v1/internal/health/services/{name}On demand

3. JWT Contract

Kong validates the admin JWT using JWKS from auth-service. Required claims:

ClaimValue
rolesMust contain admin
subAdmin user ID
emailAdmin email (for audit trail headers)
expExpiry (1h)
isshttps://api.ghasi.io

Kong injects X-Admin-User-Id and X-Admin-Email headers on internal routes for audit logging by downstream services.

4. Polling Contract

Endpoint groupIntervalPaused when
Analytics summary + throughput + breakdown + top-operators30sTab hidden
Health services30sTab hidden

All polling calls share a single AbortController signal; tabs becoming hidden abort in-flight requests.

5. Rate Limits

Route GroupLimitWindow
Internal admin routes300 reqper minute per admin user
Operator mutation (POST/PUT/DELETE)30 reqper minute
Billing pricing update5 reqper minute