Bando Documentation

Documents REST API

Query and modify collections and documents directly through HTTP.

The documents API

The REST API allows any application capable of making HTTP requests to work with Bando documents.

If you are building a React, Vue, mobile, or any other HTTP-based application, you do not need to use the TypeScript client. You can consume these routes directly.

HTTP methods

GET
Read data.
POST
Create data.
PATCH
Update data.
DELETE
Remove data.
GET/api/collections

Lists the available collections.

You can also query a specific collection throughGET /api/collections/:name.

GET/api/:collection

Lists documents from a collection.

The response contains the documents in data and the total count in total.

JSON
{
"data": [],
"total": 0
}
ParâmetroTipoObrigatórioPor omissãoDescrição
limitintegernãoMaximum number of documents returned. Must be a non-negative integer.
offsetintegernão0Number of documents skipped before results start being returned.
sortstringnão-createdAtField used to sort results. Accepts id, createdAt, or updatedAt. The - prefix indicates descending order.
fieldstringnãoEquality filter. For example, published=true searches for documents whose published field is true.
GET/api/:collection/:id

Finds a specific document by ID.

On success, it returns:

JSON
{
"data": {
"id": "...",
"collection": "...",
"data": { }
}
}
POST/api/:collection

Creates a new document. Data is sent in the request body.

On success, the API returns 201.

PATCH/api/:collection/:id

Partially updates an existing document.

DELETE/api/:collection/:id

Deletes a document.

On success, it returns 204.

Validation errors return 400 with information inerror and issues.

View REST authentication →
Documents REST API | Bando