Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Releases & deployments

Releases

Method & pathDescription
POST /projects/{project}/releasesSnapshot every decision + workflow artifact in the project into a new immutable release
GET /projects/{project}/releasesList releases, newest first
GET /projects/{project}/releases/{releaseId}Get one release with its full item snapshot
GET /projects/{project}/releases/{releaseId}/diff/{otherId}Semantic diff between two releases
curl -sS -X POST "$RULEFLOW_API/api/projects/lending/releases" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{ "notes": "initial loan-approval flow" }'
{
  "id": "rel_4a1c...", "tenant": "acme", "project": "lending", "version": 1,
  "notes": "initial loan-approval flow", "createdBy": "alice@acme.com",
  "createdAt": "2026-07-21T18:00:00Z",
  "items": [
    { "kind": "decision", "name": "loan_risk", "model": { "...": "..." } },
    { "kind": "workflow", "name": "loan_application", "model": { "...": "..." } }
  ]
}

notes is optional; an empty request body is valid. Creating a release with nothing to snapshot (no decisions or workflows exist yet in the project) returns 400. If the deployment enforces MaxReleasesPerProject, exceeding it on create returns 429.

Deploy & rollback

Method & pathDescription
POST /projects/{project}/environments/{env}/deployPromote a release to an environment. Body: { "releaseId": "..." }
POST /projects/{project}/environments/{env}/rollbackRevert to the previously deployed release
GET /projects/{project}/environmentsList this project’s environments and their currently deployed release
curl -sS -X POST "$RULEFLOW_API/api/projects/lending/environments/staging/deploy" \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{ "releaseId": "rel_4a1c..." }'
{ "environment": "staging", "releaseId": "rel_4a1c...", "version": 1, "updatedBy": "alice@acme.com" }

staging, prod and production are protected environments: deploying or rolling back requires the approver or admin realm role, or the request is rejected 403 with "deploying to staging requires the 'approver' role". Any other environment name deploys without an elevated role. Deploying a release that doesn’t exist returns 404; a workflow substitution/state-machine-creation failure returns 502 and never advances the environment’s active release.

Audit

See Projects & artifacts § Audit — the same tenant-wide/project-scoped audit routes cover release and deploy events (release.created, env.deployed, and their rollback equivalents).