Everything in these docs is also an API, so a script can build
and run a whole stack without a person clicking through it. The base address
is https://app.ridgelinehost.com/api/v1. Mint a token in the dashboard under
Settings → Developer; it is shown once.
A token is one of three kinds, chosen at minting:
- a project token reaches ONE project. Every call acts on it; nothing needs naming. A Dev can mint only this kind.
- a workspace token reaches every project in the workspace, and can
create projects. Each call names its project with a
Ridgeline-Project: <name or id>header (or?project=<name or id>); while the workspace has one project, nothing needs naming. A call that should name one and doesn't answers400 project_required; an unknown name404 no_project; a project token naming a different project403 wrong_project. - a personal token belongs to the person who minted it, not to a
workspace, and reaches every workspace they're in, with the role they
have in each (and, where they work on only some projects, those
projects). Each call names its project with
Ridgeline-Project, which finds the workspace by itself; when two of your workspaces have a project of that name, addRidgeline-Workspace: <name or id>(or?workspace=), or name the project by id (400 ambiguous_project). Calls about a workspace rather than a project (/activity,/workspace/alerts, creating a project) name it withRidgeline-Workspaceonce you're in more than one (400 workspace_required); an unknown one answers404 no_workspace. Named nothing,GET /api/v1/meandGET /api/v1/projectslist every workspace and project it reaches. It stops reaching a workspace the moment its creator leaves it.
A token carries the role of the person who minted it (owner > admin >
dev; a token is never above its minter): taking, downloading or restoring
backups need an owner- or admin-level token and answer 403 owner_only
otherwise, and the workspace's default alerts need an owner's or admin's
workspace token. A Dev's token also can't choose a service's repository or
point a domain's DNS (403 guest), and plan.services is null for it in
GET /api/v1/me. Everything else works for all. A token stops working when
its creator leaves the workspace or the project (401 token_orphaned; a
personal token: when its creator is in none at all), when
it passes the lifetime chosen at minting (401 token_expired), and when its
creator changes or resets their password. A token may make at most 120
writes in 15 minutes (anything but GET); past that a write answers
429 rate_limited with a Retry-After header — reads are never counted. On
a 429, wait and try once more; never retry in a loop.
export RIDGELINE_TOKEN=rlh_…
curl -s https://app.ridgelinehost.com/api/v1/me \
-H "Authorization: Bearer $RIDGELINE_TOKEN" \
-H "Ridgeline-Project: my-app" # a workspace or personal tokenGET /api/v1 lists every endpoint and needs no token — start there if in
doubt. A resource can be addressed by name or by id in every path.
Send a real User-Agent naming your tool (my-deployer/1.0). Cloudflare
sits in front of the API and refuses some library defaults — Python's
Python-urllib/3.x gets 403 with error code: 1010 — before the request
ever reaches us. curl's default is fine.