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
Read data.
Create data.
Update data.
Remove data.
/api/collectionsLists the available collections.
You can also query a specific collection throughGET /api/collections/:name.
/api/:collectionLists documents from a collection.
The response contains the documents in data and the total count in total.
| Parâmetro | Tipo | Obrigatório | Por omissão | Descrição |
|---|---|---|---|---|
limit | integer | não | — | Maximum number of documents returned. Must be a non-negative integer. |
offset | integer | não | 0 | Number of documents skipped before results start being returned. |
sort | string | não | -createdAt | Field used to sort results. Accepts id, createdAt, or updatedAt. The - prefix indicates descending order. |
field | string | não | — | Equality filter. For example, published=true searches for documents whose published field is true. |
/api/:collection/:idFinds a specific document by ID.
On success, it returns:
/api/:collectionCreates a new document. Data is sent in the request body.
On success, the API returns 201.
/api/:collection/:idPartially updates an existing document.
/api/:collection/:idDeletes a document.
On success, it returns 204.
Validation errors return 400 with information inerror and issues.