Skip to navigation

Update guardrail policy

View as Markdown

Replace a guardrail policy, rules included: a rule left out of the request is removed

Path parameters

idstringRequiredformat: "uuid"

Request

This endpoint expects an object.
namestringRequired0-255 characters
The SDK names policies by name, so it is unique in the workspace, ignoring case
ruleslist of objectsRequired
At most one rule per type
idstringOptionalformat: "uuid"
Optional on create, generated when missing, as for prompts and datasets. Ignored on update, where the path names the policy
descriptionstringOptional0-1000 characters
execution_scopeenumOptionalDefaults to on_request

on_request applies the policy when the SDK names it, global applies it to every guardrail built from stored policies in the workspace. Missing or null means on_request

Allowed values:

Response

No Content

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
503
Service Unavailable Error