Guardrail

Get a guardrail approval

Changed on

Returns one approval. A SELF approval is readable by the person the agent acts for, while they are a member of its workspace; a WORKSPACE approval by any member of the workspace. The agent the approval is bound to may also read it, to learn when it is decided.

get/workspaces/{workspace_id}/guardrails/approvals/{approval_id}

Request

  • Base URL: https://api.mabl.com
  • URL: https://api.mabl.com/workspaces/{workspace_id}/guardrails/approvals/{approval_id}
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization

Path parameters

workspace_idstring required

The id of the workspace the approval belongs to.

approval_idstring required

The id of the approval.

Response

The approval.

idstring required

The approval's id, which the agent sends back in the X-Mabl-Approval header.

workspace_idstring required

The id of the workspace the request was made in.

state'PENDING' | 'APPROVED' | 'DENIED' | 'EXPIRED' | 'CANCELLED' required

Where a guardrail approval stands. PENDING awaits a decision and expires undecided after 24 hours; APPROVED lets the agent repeat the request, as often as it does, for 20 minutes; DENIED refuses the same request for 20 minutes after the decision, after which asking again opens a new approval; CANCELLED means a person withdrew it while pending or revoked it while approved. EXPIRED and CANCELLED are final.

kind'SELF' | 'WORKSPACE' required

Who decides a guardrail approval. SELF is decided by the person the agent acts for; WORKSPACE, for an agent acting for an API key, by a workspace owner or editor.

actionstring

The action the request asks for, e.g. Delete::Branch.

operation_idstring

The API operation the request called.

resource_typestring

The kind of entity the action acts on, e.g. Branch.

resource_idstring

The id of the entity the request names, when it names one.

branchstring

The branch the request names, when it names one.

request_fieldsobject

The fields of the request body shown to the approver, as the agent sent them, keyed by property, e.g. name. Some, such as a merge's from and to, also bind the approval. Absent when the operation names none or the body has none. Each value is a string; a long one is shown cut short but bound in full.

agent_typestring

The type of agent that made the request.

agent_session_idstring

The agent session that made the request; absent for an external agent, which has none.

root_session_idstring

The root of that agent session's tree, when there is a session.

root_user_idstring

For a SELF approval, the person the agent acts for, who alone decides it.

root_api_key_idstring

For a WORKSPACE approval, the API key the agent acts for.

client_kindstring

For an external agent, the kind of client it connected through, e.g. mcp.

policy_idsstring[]

The ids of the policies that asked for approval.

reasonstring

Why the deciding policy asks for approval, as its author wrote it.

summarystring

What the agent asked to do, written by mabl from the request.

decision_idstring

The id of the guardrail decision that asked for approval, in the decision log.

created_by_idstring

The id of the person or API key the agent acts for.

created_timeinteger

When the agent asked.

request_expires_timeinteger

When a pending approval expires undecided.

decided_by_idstring

The id of the person who approved or denied it.

decided_timeinteger

When it was approved, denied or cancelled.

decision_notestring

The note the deciding person left.

use_expires_timeinteger

Until when the agent may repeat the approved request, as often as it does.

last_updated_by_idstring

The id of whoever last changed the approval.

last_updated_timeinteger

When the approval last changed.

urlstring

The mabl app page where the approval is reviewed.

Changes