Skip to content

Config

The config resource.

Base/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.

GET/config
curl --request GET \
  --url '<your-host>/config?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": true,
    "erpUrl": "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}`.

GET/config
curl --request GET \
  --url '<your-host>/config?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": true,
  "erpUrl": "string"
}
POST/config

Create a config

Create a new config.

Body parameters

erpUrlstringrequired
POST/config
curl --request POST \
  --url <your-host>/config \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"erpUrl":"string"}'
Response
{
  "id": true,
  "erpUrl": "string"
}
PATCH/config

Update a config

Update an existing config, matched on `id`.

Body parameters

erpUrlstringrequired
PATCH/config
curl --request PATCH \
  --url '<your-host>/config?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"erpUrl":"string"}'
Response
{
  "id": true,
  "erpUrl": "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}`.

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