Skip to main content
When you run Airhouse with the control plane enabled, you manage databases and their users through the Admin API. Each database is fully isolated, with its own catalog and its own storage prefix. A user belongs to exactly one database.
In the Admin API, databases are called tenants, so paths look like /admin/v1/tenants/{id}. A tenant’s id is the database name clients connect to.

Before you start

  • The server must have the control plane configured. See Control plane in the configuration reference.
  • The Admin API is served on the HTTP port (default 8080) under /admin/v1/.
  • Every request needs the admin token in the Authorization header:
The admin token has full control over every database. Keep it on your servers, never in client applications. To let an application create credentials for its own users, give it a service account instead.

Databases

Create a database

The id may contain ASCII letters, digits, _, and -, up to 63 characters. Airhouse creates the database’s catalog and storage location and returns 201 Created. Storage uses the bucket configured on the server. Don’t send bucket or prefix in the request.
The response includes internal connection details for the database’s catalog, including credentials. Treat it as a secret: don’t log it, and never return it to end users. End users connect through port 5445 with their own username and password.

List and get databases

Delete a database

Deleting a database removes its catalog, its users, and its service accounts, and returns 204 No Content, even if the database didn’t exist.
Deleting a database can’t be undone: every table definition and snapshot in its catalog is lost. The Parquet files in object storage are not deleted automatically. Remove them from the bucket yourself if you need to.

Users

Create a user

Response (201 Created):

List users

The list contains users created with this endpoint. Short-lived credentials minted by service accounts aren’t included.

Delete a user

Returns 204 No Content if the user existed, or 404 if it didn’t.

Onboard a customer of your platform

A typical onboarding flow creates a database and a first user, then hands the user their connection details:
1

Create the database

2

Create a user

3

Share the connection details

If the user connects to a database that doesn’t exist, the connection fails with database "acme" does not exist (SQLSTATE 3D000).
To offboard, delete the user, then the database. For the complete list of endpoints and status codes, see the Admin API reference.