Skip to content

API overview

Conventions of the JSON API behind the Cahaves Cloud console.

Updated

The Cahaves Cloud API is the JSON API the console itself runs on. Every screen reads and writes through it, so each action the console offers has an endpoint here.

Base addressPlain text
https://cloud.cahaves.com/api

Session cookie only, for now

The API authenticates with the session cookie the console sets when you sign in. There are no API keys or tokens yet, so a script or a server outside your browser cannot call it. Authentication explains what that means for these pages.

Conventions

  • Every request works in one organization, the one the X-Cloud-Organization header names, or your oldest without it. Projects and everything in them, and billing, are the organization's. Authentication explains the header.

  • Keys are snake_case in requests and responses alike.

  • Every response is an envelope named for what it holds, such as { "project": { ... } } or { "projects": [ ... ] }. Get the signed-in customer, Get the billing account and Get this month are the exceptions and answer the object itself.

  • Timestamps are ISO 8601 strings in UTC, such as 2026-09-23T08:30:00Z, or null when unset.

  • Ids are UUID strings. Projects are the exception in paths: they are addressed by their slug, which never changes.

  • Money is a decimal string, never a JSON number, except a field whose name ends in _cents, which is a whole number of US cents. The catalogue's rates and usage count in credits, and one credit is one US cent.

  • Secrets stay put. A service's environment appears only when you read that one service, and a database's password only in that same answer. No list carries either, and no token you give Cloud is ever answered back.

Changing a record

PATCH changes only the keys you send. A key left out is unchanged; a key sent as null is set to null.

PATCH /api/services/{id}JSON
{ "health_check_path": null }

That request turns the health check off and changes nothing else, while {} changes nothing at all.

Paging

Long lists take page, from 1, and per, from 1 to 100 with 25 by default, and answer the page with a total:

GET /api/deployments?page=2&per=50JSON
{ "deployments": [], "total": 120, "page": 2, "per": 50 }

A page or per that is not a whole number is treated as absent.

Asynchronous work

Deploying, adding a domain and running a backup are accepted with 202 and finish afterwards. The answer is the record in its first state; read it again, or follow a deployment's log over the log socket, to see it finish.

Where to start

Was this page helpful?