Docs Home

API Reference

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

OperationEndpointScope
Show the API's version and linksGET /v1No token
Show the token's accountGET /v1/accountaccount:read
Show the calling tokenGET /v1/tokenAny token
Revoke the calling tokenDELETE /v1/tokenAny token

Clusters

OperationEndpointScope
List the account's clustersGET /v1/clustersclusters:read
Create a clusterPOST /v1/clustersclusters:write
Show a clusterGET /v1/clusters/{cluster_id}clusters:read
Rename a clusterPATCH /v1/clusters/{cluster_id}clusters:write
Delete a clusterDELETE /v1/clusters/{cluster_id}clusters:write
Change a cluster's planPOST /v1/clusters/{cluster_id}/plan_changesclusters:write

Actions

OperationEndpointScope
Show an ActionGET /v1/actions/{action_id}clusters:read
List a cluster's ActionsGET /v1/clusters/{cluster_id}/actionsclusters:read

Credentials

OperationEndpointScope
List a cluster's active credentialsGET /v1/clusters/{cluster_id}/credentialscredentials:read
Create a credentialPOST /v1/clusters/{cluster_id}/credentialscredentials:write
Show a credential, with its secretGET /v1/clusters/{cluster_id}/credentials/{credential_id}credentials:read
Revoke a credentialDELETE /v1/clusters/{cluster_id}/credentials/{credential_id}credentials:write

Usage and metrics

OperationEndpointScope
Show a cluster's usageGET /v1/clusters/{cluster_id}/usageclusters:read
Show a cluster's request metricsGET /v1/clusters/{cluster_id}/metricsclusters:read
Show a cluster's top queriesGET /v1/clusters/{cluster_id}/queriesquery_logs:read

Plans, regions, spaces and releases

OperationEndpointScope
List the plans this account can chooseGET /v1/plansaccount:read
Show a planGET /v1/plans/{plan_id}account:read
List the regions clusters can be created inGET /v1/regionsaccount:read
List the account's private spacesGET /v1/spacesaccount:read
List the releases this account can chooseGET /v1/releasesaccount:read

Ready to power your search with AI?

Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.

Create an AI Ready Search Cluster
Calming Bonsai waves