Get Guardrail Config Schema
GET /guardrails/schema
GET /guardrails/schemaInteractive request editor loads with JavaScript.
Authorization
BearerAdminToken Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.
In: header
Query Parameters
Guardrail kind, e.g. lakera. The discriminator, not
provider + check_type.
1 <= lengthResponse Body
application/json
application/json
application/json
application/json
curl -X GET "$AISIX_CP/guardrails/schema?kind=lakera" \ -H "Authorization: Bearer $AISIX_TOKEN"OK
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"api_key"
],
"properties": {
"api_key": {
"type": "string",
"format": "password",
"title": "Lakera API key"
}
}
}Request body or parameters failed validation.
{
"error": {
"code": "string",
"message": "string"
}
}Missing or invalid bearer.
{
"error": {
"code": "UNAUTHENTICATED",
"message": "no org context"
}
}Resource not found.
{
"error": {
"code": "NOT_FOUND",
"message": "provider key not found"
}
}Complete operation details and schema variants
GET /guardrails/schema
Get Guardrail Config Schema
Per-kind JSON schema for the guardrail config blob, consumed by
the dashboard form. Read-only; the response is catalog-driven.
Not every kind publishes a dynamic schema: the ones the dashboard
renders with a built-in form (see has_schema on
GET /guardrails/providers) answer 404 here.
Parameters
kind(query, string, required): Guardrail kind, e.g.lakera. The discriminator, notprovider+check_type.
Responses
-
200: OK -
400: Request body or parameters failed validation. -
error(object, required): Error details. -
error.code(string, required): Machine-readable identifier. Examples:UNAUTHENTICATED,INVALID_REQUEST,MASTER_KEY_UNSET,INTERNAL. -
error.message(string, required): Human-readable explanation; safe to surface to operators. -
401: Missing or invalid bearer. Response fields (application/json): identical toGET /guardrails/schema, response 400 above. -
404: Resource not found. Response fields (application/json): identical toGET /guardrails/schema, response 400 above.
cURL
curl -X GET '$AISIX_CP/guardrails/schema' -H 'Authorization: Bearer $AISIX_TOKEN'