Approvals endpoints
Request, sign, reject and revoke approvals for scripts and releases. Paths are relative to the address of your Simcha DB Studio server.
Through the MCP server these endpoints are the Approvals tool group, on by default.
While this group is on, the MCP server also offers the lookups its tools need: scripts_list (List migration scripts, from Migration Scripts), releases_list (List releases, from Releases), environments_list (List environments, from Environments and Groupings).
| Method | Path | What it does |
|---|---|---|
| GET | /api/db-devops/approvals | List approval requests |
| GET | /api/db-devops/approvals/policy | Show the approval policy |
| GET | /api/db-devops/approvals/:id | Get an approval request |
| GET | /api/db-devops/approvals/:id/blast-radius | Show the blast radius of an approval request |
| GET | /api/db-devops/approvals/:id/shadow-runs | List the shadow runs of an approval request |
| GET | /api/db-devops/approvals/:id/blast-radius/narrative | Explain the blast radius in plain language |
| GET | /api/db-devops/approvals/status/:status | List approval requests by status |
| POST | /api/db-devops/approvals/:id/snapshots | Capture a decision snapshot |
| GET | /api/db-devops/approvals/:id/snapshots | List the decision snapshots of a request |
| POST | /api/db-devops/approvals | Request approval for a script or a release |
| POST | /api/db-devops/approvals/:id/sign | Sign an approval request |
| POST | /api/db-devops/approvals/:id/revoke | Revoke an approved request |
| DELETE | /api/db-devops/approvals/:id/sign/:email | Withdraw a signature |
| POST | /api/db-devops/approvals/:id/reject | Reject an approval request |
| DELETE | /api/db-devops/approvals/:id | Withdraw a pending approval request |
GET /api/db-devops/approvals
Lists every approval request, newest first, with its status, signatures and, for a script request, the script revision it was made for and the current one.
Reads only · Role: Any signed-in user · MCP tool: approvals_list
No inputs.
GET /api/db-devops/approvals/policy
Returns whether self-approval is allowed and how many signatures a new request needs when it does not say.
Reads only · Role: Any signed-in user · MCP tool: approvals_policy
No inputs.
GET /api/db-devops/approvals/:id
Returns one approval request with its status, signatures, rejection details and the script version it was made for.
Reads only · Role: Any signed-in user · MCP tool: approvals_get
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
GET /api/db-devops/approvals/:id/blast-radius
Returns the latest blast radius report of the request's script: the objects the script touches and what depends on them. It is null until a report is computed with Scan Impact or scripts_blast_radius_compute.
Reads only · Role: Any signed-in user · MCP tool: approvals_blast_radius
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
GET /api/db-devops/approvals/:id/shadow-runs
Lists the shadow runs made for the request, newest first, with their status, preflight checks, statement results, the differences they found and any error.
Reads only · Role: Any signed-in user · MCP tool: approvals_shadow_runs
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
GET /api/db-devops/approvals/:id/blast-radius/narrative
Asks the configured AI provider to describe the blast radius of the request and records the call in the AI agent run history. Returns the narrative and whether it came from the cache. Refused when no blast radius has been computed yet, when an administrator has turned AI agents off, when the agent rate limit is reached or when no AI provider is set up.
Changes data · Role: Any signed-in user · MCP tool: approvals_blast_radius_narrative
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
GET /api/db-devops/approvals/status/:status
Lists the approval requests with one status, newest first, with their signatures.
Reads only · Role: Any signed-in user · MCP tool: approvals_by_status
| Input | Type | Description |
|---|---|---|
status (path) | one of pending, approved, rejected, required | The status to list. Upper case is accepted too |
POST /api/db-devops/approvals/:id/snapshots
Reads the target database of the request's script now (schema, data shape of the touched objects and their dependencies) and saves it as a decision snapshot for the request. Returns the snapshot with its capture status; a request without a script target is saved as a failed capture.
Changes data · Role: Approver, release manager or admin · MCP tool: approvals_capture_snapshot
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
GET /api/db-devops/approvals/:id/snapshots
Lists the decision snapshots captured for the request, with when and why each was captured, by whom, its capture status and errors.
Reads only · Role: Any signed-in user · MCP tool: approvals_snapshots
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
POST /api/db-devops/approvals
Creates a pending approval request for one script or one release and notifies the people who can sign it. A release must be signed off first and needs the environment the request is for, or null for databases in no environment; a script request is for the script's own environment. Refused when the same script version or the same release and environment already has a pending request, or when an active compliance rule of error severity fails.
Changes data · Role: Any signed-in user · MCP tool: approvals_request
| Input | Type | Description |
|---|---|---|
script_id (body) | string (uuid), optional | The script to approve. Send this or release_id, not both |
release_id (body) | string (uuid), optional | The signed-off release to approve. Send this or script_id, not both |
environment (body) | string or null, optional | The environment name. Required for a release, or null for its runs on databases in no environment; for a script without an environment it names an existing environment, and a script with one must match it |
urgency (body) | one of LOW, MEDIUM, HIGH, CRITICAL, optional | How urgent the request is, in any letter case. Defaults to MEDIUM |
business_justification (body) | string, optional | Why the change is needed, up to 10,000 characters |
rollback_plan (body) | string, optional | How the change is undone, up to 10,000 characters |
testing_evidence (body) | list of string, optional | How the change was tested, up to 20 items |
required_approvers (body) | integer, 1 to 10, optional | How many signatures approve the request, 1 to 10. Defaults to the approval policy |
POST /api/db-devops/approvals/:id/sign
Adds the caller's signature to a pending request and notifies the requester. With enough signatures the request is approved, and a script request also approves the script. Refused when the caller already signed, the script's SQL or rollback SQL changed since the request, an active compliance rule of error severity fails, or self-approval is off and the caller requested it or wrote the script or release.
Changes data · Role: Approver, release manager or admin · MCP tool: approvals_sign
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
comments (body) | string, optional | A comment with the signature, up to 2,000 characters |
POST /api/db-devops/approvals/:id/revoke
Removes every signature from an approved request and sets it back to pending. For a script request the script goes back to pending approval and releases that contain it lose their sign-off. Only an approved request can be revoked.
Changes data and can remove or overwrite it · Role: Approver, release manager or admin · MCP tool: approvals_revoke
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
DELETE /api/db-devops/approvals/:id/sign/:email
Removes one signature from a pending request and returns the request. Callers can withdraw only their own signature unless they are an admin. An approved request is revoked with approvals_revoke instead.
Changes data and can remove or overwrite it · Role: Approver, release manager or admin · MCP tool: approvals_withdraw_signature
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
email (path) | string (email), required | The email address of the signer, exactly as on the signature |
POST /api/db-devops/approvals/:id/reject
Rejects a pending request with a reason and notifies the requester. A script request also marks the script as rejected. A reason is required.
Changes data · Role: Approver, release manager or admin · MCP tool: approvals_reject
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |
reason (body) | string, optional | Why the request is rejected, up to 2,000 characters. Required unless rejection_reason is sent |
rejection_reason (body) | string, optional | Another name for reason, read only when reason is left out |
DELETE /api/db-devops/approvals/:id
Deletes a pending approval request. Only the person who requested it or an admin can withdraw it, and an approved or rejected request is kept as part of the approval record.
Changes data and can remove or overwrite it · Role: Any signed-in user · MCP tool: approvals_delete
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The approval request ID |