latestOpenAPI 3.1.02026-08-236994571.1 MB
79928a3d37d3
Guardrails
Patch Guardrail
Partially update an existing guardrail
This endpoint allows updating specific fields of a guardrail without sending the entire object. Only the following fields can be updated:
- guardrail_name: The name of the guardrail
- default_on: Whether the guardrail is enabled by default
- guardrail_info: Additional information about the guardrail
Example Request:
curl -X PATCH "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000" \
-H "Authorization: Bearer <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"guardrail_name": "updated-name",
"default_on": true,
"guardrail_info": {
"description": "Updated description"
}
}'
Example Response:
{
"guardrail_id": "123e4567-e89b-12d3-a456-426614174000",
"guardrail_name": "updated-name",
"litellm_params": {
"guardrail": "bedrock",
"mode": "pre_call",
"guardrailIdentifier": "ff6ujrregl1q",
"guardrailVersion": "DRAFT",
"default_on": true
},
"guardrail_info": {
"description": "Updated description"
},
"created_at": "2023-11-09T12:34:56.789Z",
"updated_at": "2023-11-09T14:22:33.456Z"
}
patch/guardrails/{guardrail_id}
Path parameters
guardrail_idstring required
Request body
Response
Successful Response
{"stackTrail":"paths:/guardrails/{guardrail_id}:patch:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}