Document Label
The document label resource.
Basehttps://rest.carbon.ms/documentLabel
GET
/documentLabelList document labels
Retrieve a paginated list of document labels. Filter, order, and select columns with PostgREST query parameters.
Query parameters
selectstringComma-separated columns to return. Defaults to all.
orderstringColumn to sort by, e.g. `createdAt.desc`.
limitintegerMaximum rows to return.
offsetintegerRows to skip, for pagination.
GEThttps://rest.carbon.ms/documentLabel
curl --request GET \
--url 'https://rest.carbon.ms/documentLabel?select=*&limit=10' \
--header 'Authorization: Bearer <api-key>'Response
[
{
"documentId": "xyz789",
"userId": "xyz789",
"label": "string"
}
]GET
/documentLabelRetrieve a document label
Fetch a single document label by filtering on `documentId`.
Query parameters
documentIdstringMatch on the document label's `documentId`, e.g. `eq.{id}`.
GEThttps://rest.carbon.ms/documentLabel
curl --request GET \
--url 'https://rest.carbon.ms/documentLabel?documentId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'Response
{
"documentId": "xyz789",
"userId": "xyz789",
"label": "string"
}POST
/documentLabelCreate a document label
Create a new document label.
POSThttps://rest.carbon.ms/documentLabel
curl --request POST \
--url https://rest.carbon.ms/documentLabel \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"documentId":"xyz789"}'Response
{
"documentId": "xyz789",
"userId": "xyz789",
"label": "string"
}PATCH
/documentLabelUpdate a document label
Update an existing document label, matched on `documentId`.
PATCHhttps://rest.carbon.ms/documentLabel
curl --request PATCH \
--url 'https://rest.carbon.ms/documentLabel?documentId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>' \
--header 'Content-Type: application/json' \
--header 'Prefer: return=representation' \
--data '{"name":"Example"}'Response
{
"documentId": "xyz789",
"userId": "xyz789",
"label": "string"
}DELETE
/documentLabelDelete a document label
Delete a document label, matched on `documentId`. Returns 204 No Content.
Query parameters
documentIdstringThe `documentId` of the document label to delete, e.g. `eq.{id}`.
DELETEhttps://rest.carbon.ms/documentLabel
curl --request DELETE \
--url 'https://rest.carbon.ms/documentLabel?documentId=eq.%7Bid%7D' \
--header 'Authorization: Bearer <api-key>'204 No Content