Amba

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

MethodPathDescription
POST/admin/projects/:projectId/configUpsert a key.
GET/admin/projects/:projectId/configList active keys.
PATCH/admin/projects/:projectId/config/:keyPartial update.
DELETE/admin/projects/:projectId/config/:keyDelete a key.

POST /admin/projects/:projectId/config

Upsert by key. Accepts the SetConfigInput shape from @amba/shared.

Request

FieldTypeRequiredDescription
keystringyesUnique key name.
valueanyyesJSON-serializable value.
value_type"string" | "number" | "boolean" | "json"noDefaults to "string".
descriptionstringnoFree-form developer notes.
conditionsConfigCondition[]noSegment + percentage overrides.

ConfigCondition shape

{ "segment_id": "…", "percentage": 50, "value": "override-value" }

Evaluated in order — first matching condition wins; otherwise default_value is used.

Response 201

{
  "data": {
    "id": "…",
    "key": "…",
    "value": "…",
    "value_type": "string",
    "description": null,
    "conditions": [],
    "default_value": "…",
    "is_active": true,
    "version": 1,
    "created_at": "…",
    "updated_at": "…"
  }
}

Errors

  • 500 SET_FAILED.

Try it:

POST/admin/projects/%7B%7BprojectId%7D%7D/config
developer auth
curl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X POST '${BASE_URL}/admin/projects/{projectId}/config' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

GET /admin/projects/:projectId/config

List all active config rows ordered by key.

Response 200

{ "data": [{ "key": "…", "value": "…", "value_type": "string", "conditions": [], "version": 1 }] }

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/config
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/config' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

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

FieldType
valueany
descriptionstring | null
conditionsConfigCondition[]

Response 200

Updated row.

Errors

  • 404 NOT_FOUND.
  • 500 UPDATE_FAILED.

Try it:

PATCH/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D
developer auth
curl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X PATCH '${BASE_URL}/admin/projects/{projectId}/config/{key}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /admin/projects/:projectId/config/:key

Hard-delete the row. Recomputes the ETag hash.

Response 200

{ "data": { "deleted": true } }

Errors

  • 500 DELETE_FAILED.

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/config/%7B%7Bkey%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/config/{key}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

On this page