Get Guardrails
GET
/api/v2/guardrails/
Guardrailsv2
is_enabled (bool, optional): Filter by enabled status
verbosity (str, optional): Control level of detail ('low', 'medium', 'high')
fields (str, optional): Comma-separated list of specific fields to include
embed (str, optional): Comma-separated list of related entities to embed
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/api/v2/guardrails/'
Response Response Example
200 - Successful Response
{
"success": true,
"message": "string",
"data": {
"guardrails": [
{
"id": 1,
"name": "Content Boundaries",
"description": "Restricts discussions to safe topics",
"created_on": "2024-03-15T10:30:00Z",
"modified_on": "2024-03-16T09:15:00Z",
"created_by": "admin@example.com",
"modified_by": "admin@example.com",
"organization_id": 1,
"guardrail_type": "topic_control",
"is_enabled": true,
"is_default": false,
"is_deleted": false,
"guidelines": [
"No discussions about illegal activities",
"No harmful content"
]
},
{
"id": 2,
"name": "Ethics Filter",
"description": "Ensures responses are ethically sound",
"created_on": "2024-03-14T14:20:00Z",
"modified_on": "2024-03-15T11:45:00Z",
"created_by": "admin@example.com",
"modified_by": "admin@example.com",
"organization_id": 1,
"guardrail_type": "ethical_moderation",
"is_enabled": true,
"is_default": true,
"is_deleted": false
},
{
"id": 3,
"name": "Prompt Injection Detector",
"description": "Prevents prompt injection attacks",
"created_on": "2024-03-13T09:30:00Z",
"modified_on": "2024-03-13T09:30:00Z",
"created_by": "admin@example.com",
"modified_by": "admin@example.com",
"organization_id": 1,
"guardrail_type": "jailbreak_detection",
"is_enabled": true,
"is_default": false,
"is_deleted": false
}
]
}
}
Request
Query Params
embed
stringÂ
optional
Example:
organization
fields
stringÂ
optional
Example:
id,name,description,guardrail_type
guardrail_type
enum<string>Â
optional
Allowed values:
ethical_moderationhallucinationjailbreak_detectionmask_sensitive_datatopic_control
Example:
topic_control
is_enabled
booleanÂ
optional
Example:
true
verbosity
enum<string>Â
optional
Allowed values:
highlowmedium
Default:
medium
Example:
low