Config
Per-user evaluated remote config — segment + percentage rollout, ETag-aware.
/client/config is the single evaluation endpoint for remote config. Authenticated callers get per-segment + percentage-rollout values; anonymous callers get defaults only. Responses are cacheable via ETag / If-None-Match; cache control is private to prevent multi-tenant leakage through shared proxies.
Source: apps/api/src/routes/client/config.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /client/config | Evaluated config map. Accepts only X-Api-Key (session token optional). |
GET /client/config
Request
Response 200
Headers:
Response 304
Returned when If-None-Match matches the current ETag. The body is empty.
ETag composition
- Anonymous:
"<version_hash>"— singletonconfig_versions.version_hash. - Authenticated:
"<version_hash>:<appUserId>:<sha256(sorted-segments)[:16]>"— invalidates automatically on segment membership changes.
Rollout evaluation
Per-condition ladder (in order):
- If
segment_idis set, the user must be a member. - If
percentageis set and < 100,hash(appUserId|key) % 100 < percentagemust hold. - First matching condition wins. Otherwise
default_valueis returned.
Errors
500 FETCH_FAILED.
Try it:
GET
client auth/client/configcurl -X GET 'https://api.amba.dev/client/config'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: