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).

MethodPathWhat it does
GET/api/db-devops/approvalsList approval requests
GET/api/db-devops/approvals/policyShow the approval policy
GET/api/db-devops/approvals/:idGet an approval request
GET/api/db-devops/approvals/:id/blast-radiusShow the blast radius of an approval request
GET/api/db-devops/approvals/:id/shadow-runsList the shadow runs of an approval request
GET/api/db-devops/approvals/:id/blast-radius/narrativeExplain the blast radius in plain language
GET/api/db-devops/approvals/status/:statusList approval requests by status
POST/api/db-devops/approvals/:id/snapshotsCapture a decision snapshot
GET/api/db-devops/approvals/:id/snapshotsList the decision snapshots of a request
POST/api/db-devops/approvalsRequest approval for a script or a release
POST/api/db-devops/approvals/:id/signSign an approval request
POST/api/db-devops/approvals/:id/revokeRevoke an approved request
DELETE/api/db-devops/approvals/:id/sign/:emailWithdraw a signature
POST/api/db-devops/approvals/:id/rejectReject an approval request
DELETE/api/db-devops/approvals/:idWithdraw 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
status (path)one of pending, approved, rejected, requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
script_id (body)string (uuid), optionalThe script to approve. Send this or release_id, not both
release_id (body)string (uuid), optionalThe signed-off release to approve. Send this or script_id, not both
environment (body)string or null, optionalThe 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, optionalHow urgent the request is, in any letter case. Defaults to MEDIUM
business_justification (body)string, optionalWhy the change is needed, up to 10,000 characters
rollback_plan (body)string, optionalHow the change is undone, up to 10,000 characters
testing_evidence (body)list of string, optionalHow the change was tested, up to 20 items
required_approvers (body)integer, 1 to 10, optionalHow 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

InputTypeDescription
id (path)string (uuid), requiredThe approval request ID
comments (body)string, optionalA 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

InputTypeDescription
id (path)string (uuid), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe approval request ID
email (path)string (email), requiredThe 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

InputTypeDescription
id (path)string (uuid), requiredThe approval request ID
reason (body)string, optionalWhy the request is rejected, up to 2,000 characters. Required unless rejection_reason is sent
rejection_reason (body)string, optionalAnother 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

InputTypeDescription
id (path)string (uuid), requiredThe approval request ID