Manage your organization
API and tokens
Create API tokens for CI and scripts, choose their scopes, and call the REST API at /api/v1.
Open Integrations → API tokens in the appWhat the API is for
The Rabbinatix REST API lets your CI pipeline and scripts read your systems and contracts, ask whether a version may be deployed, and record deployments. Every call sends an API token. CI and the API shows the pipeline steps, and Integrations → API & CI has them ready to copy.
AI assistants don't use API tokens. They have keys of their own, and those keys don't work on this API (see Your AI assistant).
Create a token
You need the Integrations permission. Owners and Admins have it.
- Open Integrations in the sidebar and go to API tokens.
- Click New token.
- Give it a name that says where it's used, such as
GitHub Actions. Each token of a project needs its own name. - Tick one or more scopes. Pick only what the pipeline needs.
- Click Create token.
- Copy the token with the copy button, then click Done.
Tokens start with cm_live_. Keep them in your CI's secret store, never in code.
Scopes
Manage tokens
The API tokens tab lists each token with its name, the first characters of the token, its scopes, when it was last used and when it was created. Last used updates at most once a minute.
Click Revoke to stop a token. Pipelines using it fail at once. Creating and revoking tokens are both recorded in the activity log.
Call the API
Send the token in the Authorization header:
Authorization: Bearer cm_live_…The routes are:
The contract watcher reports to POST /api/v1/watch/report with its own key, made when you download a watcher. That key can do nothing else. See Contract watcher.
Safety check (can-i-deploy)
Send system, version and env in the query string, using ids. A new project has two environments, dev and prod; the examples under Integrations → API & CI use your project's own. An id that doesn't exist answers 404 with the ids you can use.
GET /api/v1/can-i-deploy?system=auth-service&version=1.4.0&env=prodThe answer has approved (true or false), the blocking contracts, the warnings (in Development, calls that would break don't block: they are listed here), and output, the same lines the Deployments page shows. A blocked check also raises a Deployment blocked event, so the team is notified, and adds deployment.blocked to the activity log. See Environments and deployments.
Record a deployment
POST /api/v1/deployments
{"system": "auth-service", "version": "1.4.0", "env": "prod"}The release must exist first, and the environment can't be Development (it runs what is published: 409). An environment that asks for approval first, as Production does unless you change it, answers 202 with a move request for its approvers instead; send "approval":"none" to record it at once, marked without approval. The answer is 201 with the new deployment, which shows as deployed by "API · " and the token's name.
Errors
Errors come back as JSON with an error message:
The /api/v1 routes don't set a rate limit of their own.
Related
- CI and the APIGate deployments in CI with the safety check and record what you deploy, using an API token and the HTTP API.
- Environments and deploymentsRecord which release of each system runs in each environment, see compatibility per environment, and check a release before you deploy it.
- Contract watcherDownload one file, start it in your frontend in development, and every real API call is checked against your contracts.
- IntegrationsSend contract and ticket events to your own endpoint or an email address with webhooks, and see each delivery and its retries.
- Activity logThe record of who changed what in your organization, and when: what it records, how to filter it and how to export it.
