Guardrail

Replace a workspace's guardrail rules

Changed on

Replaces the workspace's guardrail rules with the given list, which becomes the whole list, and sets their mode when the body names one. If-Match must carry the revision last read; a stale revision is refused with 412 so concurrent edits are not lost. Workspace rules only restrict agents: an ALLOW never overrides a block mabl or the workspace's account applies, so leaving an action without a rule is how it is allowed. Only a workspace owner or a mabl global admin may change guardrails; API keys and agents never may.

put/workspaces/{workspace_id}/guardrails/rules

Request

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

Path parameters

workspace_idstring required

The id of the workspace whose guardrail rules are replaced.

Headers

If-Matchstring

The revision of the rules this update was made from, as returned by the GET. Always send it; it is optional in the schema only so that its absence is answered with 428 rather than 400.

Request body

mode'ENFORCE' | 'PREVIEW'

Whether a rule set's effects reach agents. ENFORCE applies every rule in the set wherever the workspace enforces guardrails; PREVIEW evaluates and logs every rule without ever changing what the agent gets.

Response

The workspace's guardrails after the update, carrying the new revision.

workspace_idstring

The id of the workspace the guardrails belong to.

revisioninteger

The revision of the workspace's rules, 0 before they were first saved; send it as If-Match to replace them.

mode'ENFORCE' | 'PREVIEW'

Whether a rule set's effects reach agents. ENFORCE applies every rule in the set wherever the workspace enforces guardrails; PREVIEW evaluates and logs every rule without ever changing what the agent gets.

enforcement_enabledboolean

Whether this workspace enforces guardrails. When false, a refusal is only logged and the agent request goes on.

Changes

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • warning

      added the new external_agent enum value to the ////// response property for the response status