Every operation of the Bonsai API v1, by resource. Each page starts with the objects it returns, then lists its operations, with their parameters, an example request and response, and the errors each can answer.
The reference is built from the API's OpenAPI description, version 1.0.0-draft, which the API also serves at https://api.bonsai.io/v1/openapi.json. To try requests in the browser, use the interactive reference.
Account and tokens
| Operation | Endpoint | Scope |
|---|---|---|
| Show the API's version and links | GET /v1 | No token |
| Show the token's account | GET /v1/account | account:read |
| Show the calling token | GET /v1/token | Any token |
| Revoke the calling token | DELETE /v1/token | Any token |
Clusters
| Operation | Endpoint | Scope |
|---|---|---|
| List the account's clusters | GET /v1/clusters | clusters:read |
| Create a cluster | POST /v1/clusters | clusters:write |
| Show a cluster | GET /v1/clusters/{cluster_id} | clusters:read |
| Rename a cluster | PATCH /v1/clusters/{cluster_id} | clusters:write |
| Delete a cluster | DELETE /v1/clusters/{cluster_id} | clusters:write |
| Change a cluster's plan | POST /v1/clusters/{cluster_id}/plan_changes | clusters:write |
Actions
| Operation | Endpoint | Scope |
|---|---|---|
| Show an Action | GET /v1/actions/{action_id} | clusters:read |
| List a cluster's Actions | GET /v1/clusters/{cluster_id}/actions | clusters:read |
Credentials
| Operation | Endpoint | Scope |
|---|---|---|
| List a cluster's active credentials | GET /v1/clusters/{cluster_id}/credentials | credentials:read |
| Create a credential | POST /v1/clusters/{cluster_id}/credentials | credentials:write |
| Show a credential, with its secret | GET /v1/clusters/{cluster_id}/credentials/{credential_id} | credentials:read |
| Revoke a credential | DELETE /v1/clusters/{cluster_id}/credentials/{credential_id} | credentials:write |
Usage and metrics
| Operation | Endpoint | Scope |
|---|---|---|
| Show a cluster's usage | GET /v1/clusters/{cluster_id}/usage | clusters:read |
| Show a cluster's request metrics | GET /v1/clusters/{cluster_id}/metrics | clusters:read |
| Show a cluster's top queries | GET /v1/clusters/{cluster_id}/queries | query_logs:read |
Plans, regions, spaces and releases
| Operation | Endpoint | Scope |
|---|---|---|
| List the plans this account can choose | GET /v1/plans | account:read |
| Show a plan | GET /v1/plans/{plan_id} | account:read |
| List the regions clusters can be created in | GET /v1/regions | account:read |
| List the account's private spaces | GET /v1/spaces | account:read |
| List the releases this account can choose | GET /v1/releases | account:read |
Ready to power your search with AI?
Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.