Validate a Configuration Without Applying It
POST /apisix/admin/configs/validate
POST /apisix/admin/configs/validateInteractive request editor loads with JavaScript.
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
Declarative APISIX configuration to validate. Only the documented resource arrays and their *_conf_version fields are evaluated.
Response Body
application/json
application/json
application/json
curl -X POST "http://127.0.0.1:9180/apisix/admin/configs/validate" \ -H "Content-Type: application/json" \ -d '{}'The supplied configuration passed all applicable checks.
{}The request body could not be parsed, exceeded 1.5 MiB, or failed one or more configuration checks.
{
"error_msg": "invalid request body: empty request body"
}{
"error_msg": "Configuration validation failed",
"errors": [
{
"resource_type": "routes",
"resource_id": "route-a",
"index": 0,
"error": "property \"uri\" validation failed: wrong type"
},
{
"resource_type": "upstreams",
"resource_id": "upstream-a",
"index": 0,
"error": "missing key"
}
]
}**Unauthorized** — The API key is missing, invalid, or lacks permission.
{
"error_msg": "failed to check token",
"description": "missing apikey"
}{
"error_msg": "failed to check token",
"description": "wrong apikey"
}{
"error_msg": "failed to check token",
"description": "invalid method for role viewer"
}Complete operation details and schema variants
POST /apisix/admin/configs/validate
Validate a Configuration Without Applying It
Validates a declarative APISIX configuration when the deployment uses either the etcd or yaml configuration provider. The endpoint accepts JSON and YAML request bodies up to 1.5 MiB and uses the normal Admin API authentication.
Validation covers known resource arrays, numeric *_conf_version fields, duplicate resource identifiers, resource JSON Schemas, and plugin check_schema functions. All detected errors are returned together. Cross-resource existence is not checked, so a reference such as an upstream_id can pass even when the referenced resource is absent. The operation does not persist or apply any configuration.
Parameters
Request body
Content type: application/json
routes(array, optional): Declarativeroutesresources to validate.routes[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].name(string, optional): Human-readable name for the route.routes[].desc(string, optional): Description of what this route does.routes[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).routes[].create_time(integer, optional): Unix timestamp of creation. Read-only.routes[].update_time(integer, optional): Unix timestamp of last update. Read-only.routes[].uri(string, optional): URI path pattern to match. Supports exact match (/api/v1/users) and prefix match (/api/*). Mutually exclusive withuris.routes[].uris(array, optional): Multiple URI patterns. Mutually exclusive withuri.routes[].host(string, optional): Single hostname to match against the request'sHostheader. Supports wildcard prefix (*.example.com). Mutually exclusive withhosts.routes[].hosts(array, optional): Multiple hostnames to match. Mutually exclusive withhost.routes[].methods(array, optional): HTTP methods allowed on this route. If empty or not set, all methods are allowed.routes[].remote_addr(string, optional): Single client IP address or CIDR range to match. Mutually exclusive withremote_addrs.routes[].remote_addrs(array, optional): Multiple client IP addresses or CIDR ranges to match. Mutually exclusive withremote_addr.routes[].priority(integer, optional): Route priority. When multiple routes match the same request, the one with the highest priority wins.routes[].vars(array, optional): Custom matching conditions using APISIX expressions. Each condition is an array of[variable, operator, value].routes[].filter_func(string, optional): Custom Lua function for advanced request matching. Must start withfunction.routes[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
routes[].plugin_config_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
routes[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream.name(string, optional): Human-readable name for the upstream.routes[].upstream.desc(string, optional): Description of the upstream.routes[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).routes[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.routes[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.routes[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
routes[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.routes[].upstream.nodes[].port(integer, optional): Port of the upstream node.routes[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.routes[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.routes[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.routes[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.routes[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.routes[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.routes[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.routes[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.routes[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.routes[].upstream.type(string, optional): Load balancing algorithm.routes[].upstream.hash_on(string, optional): What to hash on whentypeischash.routes[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.routes[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.routes[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.routes[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.routes[].upstream.checks.active.type(string, optional): Protocol type for health check probes.routes[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.routes[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.routes[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.routes[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.routes[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.routes[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.routes[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.routes[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.routes[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.routes[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.routes[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.routes[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.routes[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.routes[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.routes[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.routes[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.routes[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.routes[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.routes[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.routes[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.routes[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.routes[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.routes[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.routes[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.routes[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.routes[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.routes[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
routes[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.routes[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.routes[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.routes[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.routes[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.routes[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.routes[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.routes[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.routes[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.routes[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.routes[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.routes[].upstream.discovery_args(object, optional): Additional arguments for service discovery.routes[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.routes[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.routes[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
routes[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].service_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.routes[].timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.routes[].timeout.send(number, required): Timeout in seconds for sending data to the upstream.routes[].timeout.read(number, required): Timeout in seconds for reading the response from the upstream.routes[].enable_websocket(boolean, optional): Enable WebSocket proxying on this route.routes[].status(integer, optional): Route status.routes[].script(string, optional): Lua script for plugin orchestration. Cannot be used together withpluginsorplugin_config_id.routes[].script_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- anyOf variant 1: Plugin and URI required
- anyOf variant 2: Upstream and URI required
- anyOf variant 3: Upstream ID and URI required
- anyOf variant 4: Service ID and URI required
- anyOf variant 5: Plugin and URIs required
- anyOf variant 6: Upstream and URIs required
- anyOf variant 7: Upstream ID and URIs required
- anyOf variant 8: Service ID and URIs required
- anyOf variant 9: Script and URI required
- anyOf variant 10: Script and URIs required
routes_conf_version(number, optional): Optionalroutesconfiguration version. When present, the value must be numeric.services(array, optional): Declarativeservicesresources to validate.services[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].name(string, optional): Human-readable name.services[].desc(string, optional): Description of this service.services[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).services[].create_time(integer, optional): Unix timestamp of creation. Read-only.services[].update_time(integer, optional): Unix timestamp of last update. Read-only.services[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
services[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
services[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].upstream.name(string, optional): Human-readable name for the upstream.services[].upstream.desc(string, optional): Description of the upstream.services[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).services[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.services[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.services[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
services[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.services[].upstream.nodes[].port(integer, optional): Port of the upstream node.services[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.services[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.services[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.services[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.services[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.services[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.services[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.services[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.services[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.services[].upstream.type(string, optional): Load balancing algorithm.services[].upstream.hash_on(string, optional): What to hash on whentypeischash.services[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.services[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.services[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.services[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.services[].upstream.checks.active.type(string, optional): Protocol type for health check probes.services[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.services[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.services[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.services[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.services[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.services[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.services[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.services[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.services[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.services[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.services[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.services[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.services[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.services[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.services[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.services[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.services[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.services[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.services[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.services[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.services[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.services[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.services[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.services[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.services[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.services[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.services[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
services[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.services[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.services[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.services[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.services[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.services[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.services[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.services[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.services[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.services[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.services[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.services[].upstream.discovery_args(object, optional): Additional arguments for service discovery.services[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.services[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.services[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
services[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].script(string, optional): Lua script for plugin orchestration.services[].enable_websocket(boolean, optional): Enable WebSocket proxying for routes using this service.services[].hosts(array, optional): Hostnames associated with this service.services[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.services_conf_version(number, optional): Optionalservicesconfiguration version. When present, the value must be numeric.upstreams(array, optional): Declarativeupstreamsresources to validate.upstreams[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
upstreams[].name(string, optional): Human-readable name for the upstream.upstreams[].desc(string, optional): Description of the upstream.upstreams[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).upstreams[].create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.upstreams[].update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.upstreams[].nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
upstreams[].nodes[].host(string, required): Hostname or IP address of the upstream node.upstreams[].nodes[].port(integer, optional): Port of the upstream node.upstreams[].nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.upstreams[].nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.upstreams[].nodes[].metadata(object, optional): Arbitrary metadata associated with this node.upstreams[].retries(integer, optional): Number of retry attempts when a request to the upstream fails.upstreams[].retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.upstreams[].timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.upstreams[].timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.upstreams[].timeout.send(number, required): Timeout in seconds for sending data to the upstream.upstreams[].timeout.read(number, required): Timeout in seconds for reading the response from the upstream.upstreams[].type(string, optional): Load balancing algorithm.upstreams[].hash_on(string, optional): What to hash on whentypeischash.upstreams[].key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.upstreams[].scheme(string, optional): Protocol for communicating with upstream nodes.upstreams[].checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.upstreams[].checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.upstreams[].checks.active.type(string, optional): Protocol type for health check probes.upstreams[].checks.active.timeout(number, optional): Timeout in seconds for each health check probe.upstreams[].checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.upstreams[].checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.upstreams[].checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.upstreams[].checks.active.http_path(string, optional): HTTP request path for health check probes.upstreams[].checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.upstreams[].checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.upstreams[].checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.upstreams[].checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.upstreams[].checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.upstreams[].checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.upstreams[].checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.upstreams[].checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.upstreams[].checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.upstreams[].checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.upstreams[].checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.upstreams[].checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.upstreams[].checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.upstreams[].checks.passive.type(string, optional): Protocol type for passive health monitoring.upstreams[].checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.upstreams[].checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.upstreams[].checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.upstreams[].checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.upstreams[].checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.upstreams[].checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.upstreams[].checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.upstreams[].checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
upstreams[].tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.upstreams[].tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
upstreams[].tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.upstreams[].tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.upstreams[].tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.upstreams[].keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.upstreams[].keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.upstreams[].keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.upstreams[].keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.upstreams[].pass_host(string, optional): How to set theHostheader when proxying to the upstream.upstreams[].upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.upstreams[].discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.upstreams[].discovery_args(object, optional): Additional arguments for service discovery.upstreams[].discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.upstreams[].discovery_args.group_name(string, optional): Group name for service discovery.upstreams[].service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.upstreams[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
upstreams_conf_version(number, optional): Optionalupstreamsconfiguration version. When present, the value must be numeric.consumers(array, optional): Declarativeconsumersresources to validate.- oneOf variant 1
consumers[].username(string, required): Unique username for the consumer. Only alphanumeric characters, hyphens, and underscores are allowed.consumers[].desc(string, optional): Description of this consumer.consumers[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumers[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumers[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumers[].group_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
consumers[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
consumers[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- oneOf variant 2
consumers[].id(string, required): Credential path in the formconsumer/credentials/credential-id.consumers[].name(string, optional): Human-readable name.consumers[].desc(string, optional): Description of this credential.consumers[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumers[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumers[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumers[].plugins(object, required): Exactly one consumer authentication plugin.consumers[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.consumers_conf_version(number, optional): Optionalconsumersconfiguration version. When present, the value must be numeric.ssls(array, optional): Declarativesslsresources to validate.ssls[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
ssls[].desc(string, optional): Description.ssls[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).ssls[].create_time(integer, optional): Unix timestamp of creation. Read-only.ssls[].update_time(integer, optional): Unix timestamp of last update. Read-only.ssls[].type(string, optional): Certificate type.ssls[].sni(string, optional): Server Name Indication (SNI) to match. Supports wildcard prefix (*.example.com). Mutually exclusive withsnis.ssls[].snis(array, optional): Multiple SNI hostnames. Mutually exclusive withsni.ssls[].cert(string, optional): PEM-encoded server certificate. Can also be a secret reference ($secret://...).ssls[].key(string, optional): PEM-encoded private key. Can also be a secret reference ($secret://...). Not returned in GET responses for security.ssls[].certs(array, optional): Additional certificates for certificate chain or alternative key types.ssls[].keys(array, optional): Additional private keys corresponding tocerts.ssls[].client(object, optional): mTLS client verification settings.ssls[].client.ca(string, required): PEM-encoded CA certificate for client verification.ssls[].client.depth(integer, optional): Maximum certificate chain depth.ssls[].client.skip_mtls_uri_regex(array, optional): URI regex patterns to skip mTLS verification.ssls[].status(integer, optional): SSL status.ssls[].ssl_protocols(array, optional): Allowed TLS protocol versions.ssls[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.ssls_conf_version(number, optional): Optionalsslsconfiguration version. When present, the value must be numeric.global_rules(array, optional): Declarativeglobal_rulesresources to validate.global_rules[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
global_rules[].create_time(integer, optional): Unix timestamp of creation. Read-only.global_rules[].update_time(integer, optional): Unix timestamp of last update. Read-only.global_rules[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
global_rules[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.global_rules_conf_version(number, optional): Optionalglobal_rulesconfiguration version. When present, the value must be numeric.stream_routes(array, optional): Declarativestream_routesresources to validate.stream_routes[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].name(string, optional): Human-readable name.stream_routes[].desc(string, optional): Description.stream_routes[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).stream_routes[].create_time(integer, optional): Unix timestamp of creation. Read-only.stream_routes[].update_time(integer, optional): Unix timestamp of last update. Read-only.stream_routes[].remote_addr(string, optional): Client IP address or CIDR range to match.stream_routes[].server_addr(string, optional): Server IP address to match.stream_routes[].server_port(integer, optional): Server port to match.stream_routes[].sni(string, optional): SNI hostname to match (for TLS connections).stream_routes[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
stream_routes[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].upstream.name(string, optional): Human-readable name for the upstream.stream_routes[].upstream.desc(string, optional): Description of the upstream.stream_routes[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).stream_routes[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.stream_routes[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.stream_routes[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
stream_routes[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.stream_routes[].upstream.nodes[].port(integer, optional): Port of the upstream node.stream_routes[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.stream_routes[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.stream_routes[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.stream_routes[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.stream_routes[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.stream_routes[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.stream_routes[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.stream_routes[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.stream_routes[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.stream_routes[].upstream.type(string, optional): Load balancing algorithm.stream_routes[].upstream.hash_on(string, optional): What to hash on whentypeischash.stream_routes[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.stream_routes[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.stream_routes[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.stream_routes[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.stream_routes[].upstream.checks.active.type(string, optional): Protocol type for health check probes.stream_routes[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.stream_routes[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.stream_routes[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.stream_routes[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.stream_routes[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.stream_routes[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.stream_routes[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.stream_routes[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.stream_routes[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.stream_routes[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.stream_routes[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.stream_routes[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.stream_routes[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.stream_routes[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.stream_routes[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.stream_routes[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.stream_routes[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.stream_routes[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.stream_routes[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.stream_routes[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.stream_routes[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.stream_routes[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.stream_routes[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.stream_routes[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.stream_routes[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.stream_routes[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.stream_routes[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
stream_routes[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.stream_routes[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.stream_routes[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.stream_routes[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.stream_routes[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.stream_routes[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.stream_routes[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.stream_routes[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.stream_routes[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.stream_routes[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.stream_routes[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.stream_routes[].upstream.discovery_args(object, optional): Additional arguments for service discovery.stream_routes[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.stream_routes[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.stream_routes[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
stream_routes[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].service_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
stream_routes[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.stream_routes_conf_version(number, optional): Optionalstream_routesconfiguration version. When present, the value must be numeric.protos(array, optional): Declarativeprotosresources to validate.protos[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
protos[].name(string, optional): Human-readable name.protos[].desc(string, optional): Description.protos[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).protos[].create_time(integer, optional): Unix timestamp of creation. Read-only.protos[].update_time(integer, optional): Unix timestamp of last update. Read-only.protos[].content(string, required): Protobuf.protofile content as a string.protos[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.protos_conf_version(number, optional): Optionalprotosconfiguration version. When present, the value must be numeric.plugin_configs(array, optional): Declarativeplugin_configsresources to validate.plugin_configs[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
plugin_configs[].name(string, optional): Human-readable name.plugin_configs[].desc(string, optional): Description.plugin_configs[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).plugin_configs[].create_time(integer, optional): Unix timestamp of creation. Read-only.plugin_configs[].update_time(integer, optional): Unix timestamp of last update. Read-only.plugin_configs[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
plugin_configs[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.plugin_configs_conf_version(number, optional): Optionalplugin_configsconfiguration version. When present, the value must be numeric.consumer_groups(array, optional): Declarativeconsumer_groupsresources to validate.consumer_groups[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
consumer_groups[].name(string, optional): Human-readable name.consumer_groups[].desc(string, optional): Description of this group.consumer_groups[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumer_groups[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumer_groups[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumer_groups[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
consumer_groups[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.consumer_groups_conf_version(number, optional): Optionalconsumer_groupsconfiguration version. When present, the value must be numeric.secrets(array, optional): Declarativesecretsresources to validate.- anyOf variant 1
secrets[].uri(string, required): Vault server URI.secrets[].prefix(string, required): Path prefix for secrets in Vault.secrets[].token(string, required): Vault authentication token or environment-variable URI.secrets[].namespace(string, optional): Vault Enterprise or HCP Vault namespace.- anyOf variant 2
secrets[].access_key_id(string, required): AWS access key ID or environment-variable URI.secrets[].secret_access_key(string, required): AWS secret access key or environment-variable URI.secrets[].session_token(string, optional): Optional AWS session token or environment-variable URI.secrets[].region(string, optional): AWS region.secrets[].endpoint_url(string, optional): Custom AWS Secrets Manager endpoint.- anyOf variant 3
secrets[].auth_config(object, optional):secrets[].auth_config.client_email(string, required):secrets[].auth_config.private_key(string, required):secrets[].auth_config.project_id(string, required):secrets[].auth_config.token_uri(string, optional):secrets[].auth_config.scope(array, optional):secrets[].auth_config.entries_uri(string, optional):secrets[].ssl_verify(boolean, optional):secrets[].auth_file(string, optional): Path to a Google service-account JSON file.- oneOf variant 1
- oneOf variant 2
secrets_conf_version(number, optional): Optionalsecretsconfiguration version. When present, the value must be numeric.plugin_metadata(array, optional): Declarativeplugin_metadataresources to validate.plugin_metadata_conf_version(number, optional): Optionalplugin_metadataconfiguration version. When present, the value must be numeric.plugins(array, optional): Declarativepluginsresources to validate.plugins_conf_version(number, optional): Optionalpluginsconfiguration version. When present, the value must be numeric.
Content type: application/yaml
routes(array, optional): Declarativeroutesresources to validate.routes[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].name(string, optional): Human-readable name for the route.routes[].desc(string, optional): Description of what this route does.routes[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).routes[].create_time(integer, optional): Unix timestamp of creation. Read-only.routes[].update_time(integer, optional): Unix timestamp of last update. Read-only.routes[].uri(string, optional): URI path pattern to match. Supports exact match (/api/v1/users) and prefix match (/api/*). Mutually exclusive withuris.routes[].uris(array, optional): Multiple URI patterns. Mutually exclusive withuri.routes[].host(string, optional): Single hostname to match against the request'sHostheader. Supports wildcard prefix (*.example.com). Mutually exclusive withhosts.routes[].hosts(array, optional): Multiple hostnames to match. Mutually exclusive withhost.routes[].methods(array, optional): HTTP methods allowed on this route. If empty or not set, all methods are allowed.routes[].remote_addr(string, optional): Single client IP address or CIDR range to match. Mutually exclusive withremote_addrs.routes[].remote_addrs(array, optional): Multiple client IP addresses or CIDR ranges to match. Mutually exclusive withremote_addr.routes[].priority(integer, optional): Route priority. When multiple routes match the same request, the one with the highest priority wins.routes[].vars(array, optional): Custom matching conditions using APISIX expressions. Each condition is an array of[variable, operator, value].routes[].filter_func(string, optional): Custom Lua function for advanced request matching. Must start withfunction.routes[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
routes[].plugin_config_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
routes[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream.name(string, optional): Human-readable name for the upstream.routes[].upstream.desc(string, optional): Description of the upstream.routes[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).routes[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.routes[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.routes[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
routes[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.routes[].upstream.nodes[].port(integer, optional): Port of the upstream node.routes[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.routes[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.routes[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.routes[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.routes[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.routes[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.routes[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.routes[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.routes[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.routes[].upstream.type(string, optional): Load balancing algorithm.routes[].upstream.hash_on(string, optional): What to hash on whentypeischash.routes[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.routes[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.routes[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.routes[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.routes[].upstream.checks.active.type(string, optional): Protocol type for health check probes.routes[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.routes[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.routes[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.routes[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.routes[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.routes[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.routes[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.routes[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.routes[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.routes[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.routes[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.routes[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.routes[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.routes[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.routes[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.routes[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.routes[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.routes[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.routes[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.routes[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.routes[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.routes[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.routes[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.routes[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.routes[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.routes[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.routes[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
routes[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.routes[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.routes[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.routes[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.routes[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.routes[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.routes[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.routes[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.routes[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.routes[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.routes[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.routes[].upstream.discovery_args(object, optional): Additional arguments for service discovery.routes[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.routes[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.routes[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
routes[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].service_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.routes[].timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.routes[].timeout.send(number, required): Timeout in seconds for sending data to the upstream.routes[].timeout.read(number, required): Timeout in seconds for reading the response from the upstream.routes[].enable_websocket(boolean, optional): Enable WebSocket proxying on this route.routes[].status(integer, optional): Route status.routes[].script(string, optional): Lua script for plugin orchestration. Cannot be used together withpluginsorplugin_config_id.routes[].script_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
routes[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- anyOf variant 1: Plugin and URI required
- anyOf variant 2: Upstream and URI required
- anyOf variant 3: Upstream ID and URI required
- anyOf variant 4: Service ID and URI required
- anyOf variant 5: Plugin and URIs required
- anyOf variant 6: Upstream and URIs required
- anyOf variant 7: Upstream ID and URIs required
- anyOf variant 8: Service ID and URIs required
- anyOf variant 9: Script and URI required
- anyOf variant 10: Script and URIs required
routes_conf_version(number, optional): Optionalroutesconfiguration version. When present, the value must be numeric.services(array, optional): Declarativeservicesresources to validate.services[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].name(string, optional): Human-readable name.services[].desc(string, optional): Description of this service.services[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).services[].create_time(integer, optional): Unix timestamp of creation. Read-only.services[].update_time(integer, optional): Unix timestamp of last update. Read-only.services[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
services[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
services[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].upstream.name(string, optional): Human-readable name for the upstream.services[].upstream.desc(string, optional): Description of the upstream.services[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).services[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.services[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.services[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
services[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.services[].upstream.nodes[].port(integer, optional): Port of the upstream node.services[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.services[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.services[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.services[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.services[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.services[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.services[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.services[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.services[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.services[].upstream.type(string, optional): Load balancing algorithm.services[].upstream.hash_on(string, optional): What to hash on whentypeischash.services[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.services[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.services[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.services[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.services[].upstream.checks.active.type(string, optional): Protocol type for health check probes.services[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.services[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.services[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.services[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.services[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.services[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.services[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.services[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.services[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.services[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.services[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.services[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.services[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.services[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.services[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.services[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.services[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.services[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.services[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.services[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.services[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.services[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.services[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.services[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.services[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.services[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.services[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
services[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.services[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.services[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.services[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.services[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.services[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.services[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.services[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.services[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.services[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.services[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.services[].upstream.discovery_args(object, optional): Additional arguments for service discovery.services[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.services[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.services[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
services[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
services[].script(string, optional): Lua script for plugin orchestration.services[].enable_websocket(boolean, optional): Enable WebSocket proxying for routes using this service.services[].hosts(array, optional): Hostnames associated with this service.services[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.services_conf_version(number, optional): Optionalservicesconfiguration version. When present, the value must be numeric.upstreams(array, optional): Declarativeupstreamsresources to validate.upstreams[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
upstreams[].name(string, optional): Human-readable name for the upstream.upstreams[].desc(string, optional): Description of the upstream.upstreams[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).upstreams[].create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.upstreams[].update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.upstreams[].nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
upstreams[].nodes[].host(string, required): Hostname or IP address of the upstream node.upstreams[].nodes[].port(integer, optional): Port of the upstream node.upstreams[].nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.upstreams[].nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.upstreams[].nodes[].metadata(object, optional): Arbitrary metadata associated with this node.upstreams[].retries(integer, optional): Number of retry attempts when a request to the upstream fails.upstreams[].retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.upstreams[].timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.upstreams[].timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.upstreams[].timeout.send(number, required): Timeout in seconds for sending data to the upstream.upstreams[].timeout.read(number, required): Timeout in seconds for reading the response from the upstream.upstreams[].type(string, optional): Load balancing algorithm.upstreams[].hash_on(string, optional): What to hash on whentypeischash.upstreams[].key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.upstreams[].scheme(string, optional): Protocol for communicating with upstream nodes.upstreams[].checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.upstreams[].checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.upstreams[].checks.active.type(string, optional): Protocol type for health check probes.upstreams[].checks.active.timeout(number, optional): Timeout in seconds for each health check probe.upstreams[].checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.upstreams[].checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.upstreams[].checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.upstreams[].checks.active.http_path(string, optional): HTTP request path for health check probes.upstreams[].checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.upstreams[].checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.upstreams[].checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.upstreams[].checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.upstreams[].checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.upstreams[].checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.upstreams[].checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.upstreams[].checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.upstreams[].checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.upstreams[].checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.upstreams[].checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.upstreams[].checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.upstreams[].checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.upstreams[].checks.passive.type(string, optional): Protocol type for passive health monitoring.upstreams[].checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.upstreams[].checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.upstreams[].checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.upstreams[].checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.upstreams[].checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.upstreams[].checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.upstreams[].checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.upstreams[].checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
upstreams[].tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.upstreams[].tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
upstreams[].tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.upstreams[].tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.upstreams[].tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.upstreams[].keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.upstreams[].keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.upstreams[].keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.upstreams[].keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.upstreams[].pass_host(string, optional): How to set theHostheader when proxying to the upstream.upstreams[].upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.upstreams[].discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.upstreams[].discovery_args(object, optional): Additional arguments for service discovery.upstreams[].discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.upstreams[].discovery_args.group_name(string, optional): Group name for service discovery.upstreams[].service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.upstreams[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
upstreams_conf_version(number, optional): Optionalupstreamsconfiguration version. When present, the value must be numeric.consumers(array, optional): Declarativeconsumersresources to validate.- oneOf variant 1
consumers[].username(string, required): Unique username for the consumer. Only alphanumeric characters, hyphens, and underscores are allowed.consumers[].desc(string, optional): Description of this consumer.consumers[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumers[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumers[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumers[].group_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
consumers[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
consumers[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.- oneOf variant 2
consumers[].id(string, required): Credential path in the formconsumer/credentials/credential-id.consumers[].name(string, optional): Human-readable name.consumers[].desc(string, optional): Description of this credential.consumers[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumers[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumers[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumers[].plugins(object, required): Exactly one consumer authentication plugin.consumers[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.consumers_conf_version(number, optional): Optionalconsumersconfiguration version. When present, the value must be numeric.ssls(array, optional): Declarativesslsresources to validate.ssls[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
ssls[].desc(string, optional): Description.ssls[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).ssls[].create_time(integer, optional): Unix timestamp of creation. Read-only.ssls[].update_time(integer, optional): Unix timestamp of last update. Read-only.ssls[].type(string, optional): Certificate type.ssls[].sni(string, optional): Server Name Indication (SNI) to match. Supports wildcard prefix (*.example.com). Mutually exclusive withsnis.ssls[].snis(array, optional): Multiple SNI hostnames. Mutually exclusive withsni.ssls[].cert(string, optional): PEM-encoded server certificate. Can also be a secret reference ($secret://...).ssls[].key(string, optional): PEM-encoded private key. Can also be a secret reference ($secret://...). Not returned in GET responses for security.ssls[].certs(array, optional): Additional certificates for certificate chain or alternative key types.ssls[].keys(array, optional): Additional private keys corresponding tocerts.ssls[].client(object, optional): mTLS client verification settings.ssls[].client.ca(string, required): PEM-encoded CA certificate for client verification.ssls[].client.depth(integer, optional): Maximum certificate chain depth.ssls[].client.skip_mtls_uri_regex(array, optional): URI regex patterns to skip mTLS verification.ssls[].status(integer, optional): SSL status.ssls[].ssl_protocols(array, optional): Allowed TLS protocol versions.ssls[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.ssls_conf_version(number, optional): Optionalsslsconfiguration version. When present, the value must be numeric.global_rules(array, optional): Declarativeglobal_rulesresources to validate.global_rules[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
global_rules[].create_time(integer, optional): Unix timestamp of creation. Read-only.global_rules[].update_time(integer, optional): Unix timestamp of last update. Read-only.global_rules[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
global_rules[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.global_rules_conf_version(number, optional): Optionalglobal_rulesconfiguration version. When present, the value must be numeric.stream_routes(array, optional): Declarativestream_routesresources to validate.stream_routes[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].name(string, optional): Human-readable name.stream_routes[].desc(string, optional): Description.stream_routes[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).stream_routes[].create_time(integer, optional): Unix timestamp of creation. Read-only.stream_routes[].update_time(integer, optional): Unix timestamp of last update. Read-only.stream_routes[].remote_addr(string, optional): Client IP address or CIDR range to match.stream_routes[].server_addr(string, optional): Server IP address to match.stream_routes[].server_port(integer, optional): Server port to match.stream_routes[].sni(string, optional): SNI hostname to match (for TLS connections).stream_routes[].upstream(object, optional): Upstream configuration defining backend service nodes and load balancing behavior.
An upstream must specify either nodes (static list) or service_name + discovery_type (service discovery).
stream_routes[].upstream.id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].upstream.name(string, optional): Human-readable name for the upstream.stream_routes[].upstream.desc(string, optional): Description of the upstream.stream_routes[].upstream.labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).stream_routes[].upstream.create_time(integer, optional): Unix timestamp when the upstream was created. Read-only, set automatically.stream_routes[].upstream.update_time(integer, optional): Unix timestamp when the upstream was last updated. Read-only, set automatically.stream_routes[].upstream.nodes(object, optional): The upstream endpoints.- allOf variant 1
- anyOf variant 1: Weight Mapping
- anyOf variant 2: Node Objects
stream_routes[].upstream.nodes[].host(string, required): Hostname or IP address of the upstream node.stream_routes[].upstream.nodes[].port(integer, optional): Port of the upstream node.stream_routes[].upstream.nodes[].weight(integer, required): Weight for load balancing. Higher values mean more traffic.0means no traffic.stream_routes[].upstream.nodes[].priority(integer, optional): Priority of the node. Nodes with higher priority are used first. Lower-priority nodes serve as fallbacks.stream_routes[].upstream.nodes[].metadata(object, optional): Arbitrary metadata associated with this node.stream_routes[].upstream.retries(integer, optional): Number of retry attempts when a request to the upstream fails.stream_routes[].upstream.retry_timeout(number, optional): Maximum time in seconds for retry attempts.0disables the retry timeout.stream_routes[].upstream.timeout(object, optional): Timeout settings in seconds for connecting to, sending data to, and reading data from the upstream.stream_routes[].upstream.timeout.connect(number, required): Timeout in seconds for establishing a connection to the upstream.stream_routes[].upstream.timeout.send(number, required): Timeout in seconds for sending data to the upstream.stream_routes[].upstream.timeout.read(number, required): Timeout in seconds for reading the response from the upstream.stream_routes[].upstream.type(string, optional): Load balancing algorithm.stream_routes[].upstream.hash_on(string, optional): What to hash on whentypeischash.stream_routes[].upstream.key(string, optional): The hash key used whentypeischash. Required whenhash_onisheader,cookie,vars, orvars_combinations. Not needed whenhash_onisconsumer.stream_routes[].upstream.scheme(string, optional): Protocol for communicating with upstream nodes.stream_routes[].upstream.checks(object, optional): Health check configuration for monitoring upstream node availability. Active checks require at least theactivefield.stream_routes[].upstream.checks.active(object, optional): Active health check configuration. APISIX periodically sends probes to upstream nodes to determine their health status.stream_routes[].upstream.checks.active.type(string, optional): Protocol type for health check probes.stream_routes[].upstream.checks.active.timeout(number, optional): Timeout in seconds for each health check probe.stream_routes[].upstream.checks.active.concurrency(integer, optional): Number of targets to check concurrently during active health checks.stream_routes[].upstream.checks.active.host(string, optional): Hostname to use in the health check probeHostheader. Defaults to the upstream node's host.stream_routes[].upstream.checks.active.port(integer, optional): Port to use for health check probes. Defaults to the upstream node's port.stream_routes[].upstream.checks.active.http_path(string, optional): HTTP request path for health check probes.stream_routes[].upstream.checks.active.https_verify_certificate(boolean, optional): Whether to verify the upstream's TLS certificate during HTTPS health checks.stream_routes[].upstream.checks.active.req_headers(array, optional): Additional HTTP headers to include in health check probe requests.stream_routes[].upstream.checks.active.healthy(object, optional): Thresholds for considering a target healthy during active checks.stream_routes[].upstream.checks.active.healthy.interval(integer, optional): Interval in seconds between active health check probes for healthy targets.stream_routes[].upstream.checks.active.healthy.http_statuses(array, optional): HTTP status codes that indicate a healthy target.stream_routes[].upstream.checks.active.healthy.successes(integer, optional): Number of consecutive successful probes to consider a target healthy.stream_routes[].upstream.checks.active.unhealthy(object, optional): Thresholds for considering a target unhealthy during active checks.stream_routes[].upstream.checks.active.unhealthy.interval(integer, optional): Interval in seconds between active health check probes for unhealthy targets.stream_routes[].upstream.checks.active.unhealthy.http_statuses(array, optional): HTTP status codes that indicate an unhealthy target.stream_routes[].upstream.checks.active.unhealthy.http_failures(integer, optional): Number of HTTP failures to consider a target unhealthy.stream_routes[].upstream.checks.active.unhealthy.tcp_failures(integer, optional): Number of TCP connection failures to consider a target unhealthy.stream_routes[].upstream.checks.active.unhealthy.timeouts(integer, optional): Number of probe timeouts to consider a target unhealthy.stream_routes[].upstream.checks.passive(object, optional): Passive health check configuration. APISIX monitors real traffic responses to determine upstream node health — no extra probes are sent.stream_routes[].upstream.checks.passive.type(string, optional): Protocol type for passive health monitoring.stream_routes[].upstream.checks.passive.healthy(object, optional): Thresholds for considering a target healthy based on real traffic responses.stream_routes[].upstream.checks.passive.healthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate a healthy target.stream_routes[].upstream.checks.passive.healthy.successes(integer, optional): Number of consecutive successful requests to restore a target to healthy status.stream_routes[].upstream.checks.passive.unhealthy(object, optional): Thresholds for considering a target unhealthy based on real traffic responses.stream_routes[].upstream.checks.passive.unhealthy.http_statuses(array, optional): HTTP status codes from real traffic that indicate an unhealthy target.stream_routes[].upstream.checks.passive.unhealthy.tcp_failures(integer, optional): Number of TCP failures from real traffic to consider a target unhealthy.stream_routes[].upstream.checks.passive.unhealthy.timeouts(integer, optional): Number of timeouts from real traffic to consider a target unhealthy.stream_routes[].upstream.checks.passive.unhealthy.http_failures(integer, optional): Number of HTTP failures from real traffic to consider a target unhealthy.- anyOf variant 1: Active Check
- anyOf variant 2: Passive Check
stream_routes[].upstream.tls(object, optional): TLS configuration for connecting to upstream nodes over HTTPS/gRPCS.stream_routes[].upstream.tls.client_cert_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].upstream.tls.client_cert(string, optional): PEM-encoded client certificate for mTLS with the upstream.stream_routes[].upstream.tls.client_key(string, optional): PEM-encoded client private key for mTLS with the upstream.stream_routes[].upstream.tls.verify(boolean, optional): Whether to verify the upstream server's TLS certificate. Currently only supported for Kafka upstreams.stream_routes[].upstream.keepalive_pool(object, optional): Connection pool configuration for keepalive connections to upstream nodes.stream_routes[].upstream.keepalive_pool.size(integer, optional): Maximum number of keepalive connections cached in the connection pool.stream_routes[].upstream.keepalive_pool.idle_timeout(number, optional): Time in seconds after which an idle keepalive connection is closed.0disables the timeout.stream_routes[].upstream.keepalive_pool.requests(integer, optional): Maximum number of requests that can be sent over a single keepalive connection before it is closed.stream_routes[].upstream.pass_host(string, optional): How to set theHostheader when proxying to the upstream.stream_routes[].upstream.upstream_host(string, optional): CustomHostheader value. Only effective whenpass_hostisrewrite.stream_routes[].upstream.discovery_type(string, optional): Service discovery type (e.g.,dns,consul,nacos,eureka). Required when using service discovery instead of staticnodes.stream_routes[].upstream.discovery_args(object, optional): Additional arguments for service discovery.stream_routes[].upstream.discovery_args.namespace_id(string, optional): Namespace ID for Nacos service discovery.stream_routes[].upstream.discovery_args.group_name(string, optional): Group name for service discovery.stream_routes[].upstream.service_name(string, optional): Service name for service discovery. Required whendiscovery_typeis set.- oneOf variant 1: Use Upstream Nodes
- oneOf variant 2: Use Service Registry
stream_routes[].upstream_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].service_id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
stream_routes[].plugins(object, optional): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
stream_routes[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.stream_routes_conf_version(number, optional): Optionalstream_routesconfiguration version. When present, the value must be numeric.protos(array, optional): Declarativeprotosresources to validate.protos[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
protos[].name(string, optional): Human-readable name.protos[].desc(string, optional): Description.protos[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).protos[].create_time(integer, optional): Unix timestamp of creation. Read-only.protos[].update_time(integer, optional): Unix timestamp of last update. Read-only.protos[].content(string, required): Protobuf.protofile content as a string.protos[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.protos_conf_version(number, optional): Optionalprotosconfiguration version. When present, the value must be numeric.plugin_configs(array, optional): Declarativeplugin_configsresources to validate.plugin_configs[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
plugin_configs[].name(string, optional): Human-readable name.plugin_configs[].desc(string, optional): Description.plugin_configs[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).plugin_configs[].create_time(integer, optional): Unix timestamp of creation. Read-only.plugin_configs[].update_time(integer, optional): Unix timestamp of last update. Read-only.plugin_configs[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
plugin_configs[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.plugin_configs_conf_version(number, optional): Optionalplugin_configsconfiguration version. When present, the value must be numeric.consumer_groups(array, optional): Declarativeconsumer_groupsresources to validate.consumer_groups[].id(object, optional): Unique identifier for the resource. Can be a string (1–64 characters, alphanumeric with-,_,.) or a positive integer.- anyOf variant 1: String ID
- anyOf variant 2: Integer ID
consumer_groups[].name(string, optional): Human-readable name.consumer_groups[].desc(string, optional): Description of this group.consumer_groups[].labels(object, optional): Key-value pairs for categorizing and filtering resources. Values must be non-empty strings (max 256 characters).consumer_groups[].create_time(integer, optional): Unix timestamp of creation. Read-only.consumer_groups[].update_time(integer, optional): Unix timestamp of last update. Read-only.consumer_groups[].plugins(object, required): Plugin configurations as a JSON object. Each key is a plugin name, and the value is that plugin's configuration object.
Example:
{
"limit-count": {
"count": 100,
"time_window": 60
},
"key-auth": {}
}
See the Plugin Hub for available plugins and their schemas.
consumer_groups[].modifiedIndex(integer, optional): Optional resource version used for change detection by the YAML configuration provider.consumer_groups_conf_version(number, optional): Optionalconsumer_groupsconfiguration version. When present, the value must be numeric.secrets(array, optional): Declarativesecretsresources to validate.- anyOf variant 1
secrets[].uri(string, required): Vault server URI.secrets[].prefix(string, required): Path prefix for secrets in Vault.secrets[].token(string, required): Vault authentication token or environment-variable URI.secrets[].namespace(string, optional): Vault Enterprise or HCP Vault namespace.- anyOf variant 2
secrets[].access_key_id(string, required): AWS access key ID or environment-variable URI.secrets[].secret_access_key(string, required): AWS secret access key or environment-variable URI.secrets[].session_token(string, optional): Optional AWS session token or environment-variable URI.secrets[].region(string, optional): AWS region.secrets[].endpoint_url(string, optional): Custom AWS Secrets Manager endpoint.- anyOf variant 3
secrets[].auth_config(object, optional):secrets[].auth_config.client_email(string, required):secrets[].auth_config.private_key(string, required):secrets[].auth_config.project_id(string, required):secrets[].auth_config.token_uri(string, optional):secrets[].auth_config.scope(array, optional):secrets[].auth_config.entries_uri(string, optional):secrets[].ssl_verify(boolean, optional):secrets[].auth_file(string, optional): Path to a Google service-account JSON file.- oneOf variant 1
- oneOf variant 2
secrets_conf_version(number, optional): Optionalsecretsconfiguration version. When present, the value must be numeric.plugin_metadata(array, optional): Declarativeplugin_metadataresources to validate.plugin_metadata_conf_version(number, optional): Optionalplugin_metadataconfiguration version. When present, the value must be numeric.plugins(array, optional): Declarativepluginsresources to validate.plugins_conf_version(number, optional): Optionalpluginsconfiguration version. When present, the value must be numeric.
Responses
200: The supplied configuration passed all applicable checks.400: The request body could not be parsed, exceeded 1.5 MiB, or failed one or more configuration checks.- anyOf variant 1
error_msg(string, required): Human-readable error message describing what went wrong.- anyOf variant 2
error_msg(string, required):errors(array, required):errors[].resource_type(string, optional): Top-level resource section that failed validation.errors[].resource_id(object, optional): Resource ID or consumer username, when one is available. An empty string indicates that the invalid item has no ID.- oneOf variant 1
- oneOf variant 2
errors[].index(integer, optional): Zero-based index of the invalid resource.errors[].error(string, required): Validation error for this resource or section.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 POST 'http://127.0.0.1:9180/apisix/admin/configs/validate'