Sequence

The sequence resource.

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

List sequences

Retrieve a paginated list of sequences. 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/sequence
curl --request GET \
  --url 'https://rest.carbon.ms/sequence?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "table": "string",
    "companyId": "xyz789",
    "id": "abc123def456",
    "name": "Example",
    "next": 0,
    "size": 0,
    "step": 0,
    "prefix": "string"
  }
]
GET/sequence

Retrieve a sequence

Fetch a single sequence by filtering on `table`.

Query parameters

tablestring

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

GEThttps://rest.carbon.ms/sequence
curl --request GET \
  --url 'https://rest.carbon.ms/sequence?table=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "table": "string",
  "companyId": "xyz789",
  "id": "abc123def456",
  "name": "Example",
  "next": 0,
  "size": 0,
  "step": 0,
  "prefix": "string"
}
POST/sequence

Create a sequence

Create a new sequence.

Body parameters

idstringrequired
namestringrequired
prefixstring
suffixstring
nextnumberrequired
sizenumberrequired
stepnumberrequired
POSThttps://rest.carbon.ms/sequence
curl --request POST \
  --url https://rest.carbon.ms/sequence \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"id":"abc123def456","name":"Example","next":0,"size":0,"step":0}'
Response
{
  "table": "string",
  "companyId": "xyz789",
  "id": "abc123def456",
  "name": "Example",
  "next": 0,
  "size": 0,
  "step": 0,
  "prefix": "string"
}
PATCH/sequence

Update a sequence

Update an existing sequence, matched on `table`.

Body parameters

idstringrequired
namestringrequired
prefixstring
suffixstring
nextnumberrequired
sizenumberrequired
stepnumberrequired
PATCHhttps://rest.carbon.ms/sequence
curl --request PATCH \
  --url 'https://rest.carbon.ms/sequence?table=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"id":"abc123def456"}'
Response
{
  "table": "string",
  "companyId": "xyz789",
  "id": "abc123def456",
  "name": "Example",
  "next": 0,
  "size": 0,
  "step": 0,
  "prefix": "string"
}
DELETE/sequence

Delete a sequence

Delete a sequence, matched on `table`. Returns 204 No Content.

Query parameters

tablestring

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

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