Remote Config
Set, read, update, and delete remote-config keys with segment-based + percentage rollout overrides.
Remote config is a per-project key-value 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.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /admin/projects/:projectId/config | Upsert a key. |
| GET | /admin/projects/:projectId/config | List every key with is_active. |
| PATCH | /admin/projects/:projectId/config/:key | Partial update, incl. kill switch. |
| DELETE | /admin/projects/:projectId/config/:key | Delete a key. |
| GET | /admin/projects/:projectId/config/history | Change history for the project. |
| GET | /admin/projects/:projectId/config/:key/history | Change history for one key. |
Every write records a change history entry in the same transaction; the two history routes below read it.
POST /admin/projects/:projectId/config
Upsert by key. Accepts the SetConfigInput shape from @layers/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.
Upserting a key that is switched off keeps it off; turn it back on with PATCH and is_active: true.
Response 201
Errors
500 SET_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/configcurl -X POST 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/config' \
-H 'Content-Type: application/json' \
-d '{
"key": "welcome_message",
"value": "Hello!",
"value_type": "string"
}'Curl:
GET /admin/projects/:projectId/config
List every config row ordered by key, switched on or off. Apps are served only the rows with is_active: true. ?include_system=true adds the platform-provided keys.
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/configcurl -X GET 'https://api.amba.dev/v1/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-version hash under a transactional lock so the ETag stays consistent.
is_active is the kill switch. false stops serving the key: GET /v1/client/config leaves it out, so the SDK returns the app's cached or shipped default, and its value, conditions and history are kept. true serves it again.
Request
| Field | Type |
|---|---|
value | any |
description | string | null |
conditions | ConfigCondition[] |
is_active | boolean |
Response 200
Updated row.
Errors
400 INVALID_INPUT—is_activeis not a boolean.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/v1/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D' \
-H 'Content-Type: application/json' \
-d '{
"value": "Welcome back!"
}'Curl:
DELETE /admin/projects/:projectId/config/:key
Hard-delete the row. Recomputes the ETag hash. The key's history is kept.
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/v1/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D'Curl:
GET /admin/projects/:projectId/config/history
Every remote config change in the project, newest first. Each write (create, update, delete, and the kill switch) records one entry in the same transaction as the write; a write that changes nothing records none.
Query
| Param | Type | Description |
|---|---|---|
limit | integer | 1-200, default 50. |
before | string | The id of the last entry from the previous page, for older ones. |
Response 200
action is create, update, delete, activate or deactivate (a write that switched is_active). actor_kind is pat (a developer; actor_id is the developer id), server_key (actor_id is the key id, or internal_token for your deployed functions), operator (a delegated operator token id) or system (a scheduled content delivery, actor_id content_delivery). A create has no before and a delete has no after.
Errors
400 INVALID_INPUT—limitoutside 1-200, orbeforeis not a change id.500 HISTORY_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/config/historycurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/config/history'Curl:
GET /admin/projects/:projectId/config/:key/history
The changes to one key, newest first, in the same shape and with the same limit / before paging. A deleted key keeps its history; a key never written answers an empty list.
Response 200
Errors
400 INVALID_INPUT.500 HISTORY_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D/historycurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D/history'Curl: