Config

The config resource.

Basehttps://rest.carbon.ms/config
GET/config

List configs

Retrieve a paginated list of configs. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GEThttps://rest.carbon.ms/config
curl --request GET \
  --url 'https://rest.carbon.ms/config?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": true,
    "apiUrl": "string",
    "anonKey": "string"
  }
]
GET/config

Retrieve a config

Fetch a single config by filtering on `id`.

Query parameters

idstring

Match on the config's `id`, e.g. `eq.{id}`.

GEThttps://rest.carbon.ms/config
curl --request GET \
  --url 'https://rest.carbon.ms/config?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": true,
  "apiUrl": "string",
  "anonKey": "string"
}
POST/config

Create a config

Create a new config.

Body parameters

apiUrlstringrequired
anonKeystringrequired
POSThttps://rest.carbon.ms/config
curl --request POST \
  --url https://rest.carbon.ms/config \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"apiUrl":"string","anonKey":"string"}'
Response
{
  "id": true,
  "apiUrl": "string",
  "anonKey": "string"
}
PATCH/config

Update a config

Update an existing config, matched on `id`.

Body parameters

apiUrlstringrequired
anonKeystringrequired
PATCHhttps://rest.carbon.ms/config
curl --request PATCH \
  --url 'https://rest.carbon.ms/config?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"apiUrl":"string"}'
Response
{
  "id": true,
  "apiUrl": "string",
  "anonKey": "string"
}
DELETE/config

Delete a config

Delete a config, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the config to delete, e.g. `eq.{id}`.

DELETEhttps://rest.carbon.ms/config
curl --request DELETE \
  --url 'https://rest.carbon.ms/config?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content