API7 Docs

Get the JSON Schema of a built-in resource

GET /apisix/admin/schema/{resource}

GET /apisix/admin/schema/{resource}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

Admin API key configured in config.yaml under deployment.admin.admin_key. You can also pass the key as a query parameter api_key or cookie x_api_key.

In: header

Path Parameters

resource*string

Resource kind.

Value in

  • "routes"
  • "services"
  • "upstreams"
  • "consumers"
  • "ssls"
  • "plugin_configs"
  • "global_rules"
  • "stream_routes"
  • "protos"
  • "consumer_groups"
  • "credentials"

Response Body

application/json

application/json

application/json

curl -X GET "http://127.0.0.1:9180/apisix/admin/schema/routes"

JSON Schema document.

{}
Complete operation details and schema variants

GET /apisix/admin/schema/{resource}

Get the JSON Schema of a built-in resource

Returns the JSON Schema document used internally by APISIX to validate the named resource type.

Parameters

  • resource (path, string, required): Resource kind.

Responses

  • 200: JSON Schema document.
  • 400: Bad Request — The request body is invalid or missing required fields.
  • error_msg (string, required): Human-readable error message describing what went wrong.
  • 401: Unauthorized — The API key is missing, invalid, or lacks permission.
  • error_msg (string, required): Authentication error message.
  • description (string, optional): Detailed reason for the authentication failure.

cURL

curl -X GET 'http://127.0.0.1:9180/apisix/admin/schema/{resource}'