Remote Config
Set, read, update, and delete remote-config keys with segment-based + percentage rollout overrides.
Remote config is a per-project KV store with typed values, segment-based overrides, and percentage rollouts. Client SDKs fetch the evaluated bundle from GET /client/config; every write here recomputes the ETag-backing hash so clients pick changes up on their next poll.
Source: apps/api/src/routes/admin/config.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /admin/projects/:projectId/config | Upsert a key. |
| GET | /admin/projects/:projectId/config | List active keys. |
| PATCH | /admin/projects/:projectId/config/:key | Partial update. |
| DELETE | /admin/projects/:projectId/config/:key | Delete a key. |
POST /admin/projects/:projectId/config
Upsert by key. Accepts the SetConfigInput shape from @amba/shared.
Request
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | Unique key name. |
value | any | yes | JSON-serializable value. |
value_type | "string" | "number" | "boolean" | "json" | no | Defaults to "string". |
description | string | no | Free-form developer notes. |
conditions | ConfigCondition[] | no | Segment + percentage overrides. |
ConfigCondition shape
Evaluated in order — first matching condition wins; otherwise default_value is used.
Response 201
Errors
500 SET_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/configcurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config'Curl:
GET /admin/projects/:projectId/config
List all active config rows ordered by key.
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/configcurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config'Curl:
PATCH /admin/projects/:projectId/config/:key
Partial update. Only keys present in the body are changed. If value is present, version is incremented. Any successful mutation recomputes the singleton config_versions hash under pg_advisory_xact_lock so the ETag stays consistent.
Request
| Field | Type |
|---|---|
value | any |
description | string | null |
conditions | ConfigCondition[] |
Response 200
Updated row.
Errors
404 NOT_FOUND.500 UPDATE_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7Dcurl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D'Curl:
DELETE /admin/projects/:projectId/config/:key
Hard-delete the row. Recomputes the ETag hash.
Response 200
Errors
500 DELETE_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7Dcurl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D'Curl: