Apache APISIX Schema API

Validate resource configurations against APISIX schemas.

OpenAPI Specification

apache-apisix-schema-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Apache APISIX Admin Consumer Groups Schema API
  description: The Apache APISIX Admin API provides a RESTful interface to dynamically control and configure your deployed Apache APISIX instance. It allows management of routes, services, upstreams, consumers, SSL certificates, global rules, plugin configurations, consumer groups, secrets, and more. By default, the Admin API listens on port 9180 and requires API key authentication via the X-API-KEY header.
  version: 3.14.0
  contact:
    name: Apache APISIX
    url: https://apisix.apache.org
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: http://127.0.0.1:9180/apisix/admin
  description: Default local Admin API server
security:
- apiKey: []
tags:
- name: Schema
  description: Validate resource configurations against APISIX schemas.
paths:
  /schema/validate/{resource}:
    post:
      operationId: validateSchema
      summary: Apache APISIX Validate Resource Schema
      description: Validates the given request body against the schema of the specified resource type.
      tags:
      - Schema
      parameters:
      - name: resource
        in: path
        required: true
        description: The resource type to validate against (e.g. routes, services, upstreams).
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: The resource configuration to validate.
      responses:
        '200':
          description: Validation successful.
        '400':
          description: Validation failed with error details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_msg:
                    type: string
                    description: Validation error message.
  /v1/schema:
    get:
      operationId: getSchema
      summary: Apache APISIX Get APISIX JSON Schema
      description: Returns the full JSON schema used by the APISIX instance, including main configuration schemas and all plugin schemas.
      tags:
      - Schema
      responses:
        '200':
          description: Successful response with the complete JSON schema.
          content:
            application/json:
              schema:
                type: object
                properties:
                  main:
                    type: object
                    description: Main configuration schemas for routes, upstreams, etc.
                  plugins:
                    type: object
                    description: Schemas for all enabled plugins.
  /v1/schema/plugins/{plugin_name}:
    get:
      operationId: getPluginSchema
      summary: Apache APISIX Get a Specific Plugin Schema
      description: Returns the JSON schema for the specified plugin.
      tags:
      - Schema
      parameters:
      - name: plugin_name
        in: path
        required: true
        description: The name of the plugin.
        schema:
          type: string
      responses:
        '200':
          description: Successful response with the plugin schema.
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Plugin not found.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Admin API key for authentication.