API7 Docs

Get Guardrail Config Schema

GET /guardrails/schema

GET /guardrails/schema

Interactive request editor loads with JavaScript.

Authorization

BearerAdminToken
AuthorizationBearer <token>

Organization-scoped admin token. Read operations require a valid token, and write operations require a token with write permission.

In: header

Query Parameters

kind*string

Guardrail kind, e.g. lakera. The discriminator, not provider + check_type.

Length1 <= length

Response 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"
    }
  }
}
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, not provider + 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 to GET /guardrails/schema, response 400 above.

  • 404: Resource not found. Response fields (application/json): identical to GET /guardrails/schema, response 400 above.

cURL

curl -X GET '$AISIX_CP/guardrails/schema' -H 'Authorization: Bearer $AISIX_TOKEN'