Apache APISIX Admin API 是用于管理所有 APISIX 网关资源的 RESTful 接口,包括路由、上游、服务、消费者、SSL 证书和插件等。
GET List All Routes /apisix/admin/routesRetrieve all configured routes. Supports filtering by name, label, uri, or filter expression. Results include full route configuration and metadata (creation/update timestamps).
POST Create a Route /apisix/admin/routesCreate a new route with an auto-generated ID. A route must include at least a uri and one of: upstream (inline), upstream id, service id, or plugins.
GET Get a Route /apisix/admin/routes/{id}Retrieve a single route by its ID.
PUT Create or Replace a Route /apisix/admin/routes/{id}Create a new route with a specified ID, or fully replace an existing route. Note: This is a full replacement — all fields must be provided. Use PATCH for partial updates.
DELETE Delete a Route /apisix/admin/routes/{id}Delete a route by its ID. This action is irreversible.
PATCH Update a Route (Partial) /apisix/admin/routes/{id}Partially update a route's configuration. Only the fields included in the request body are modified; all other fields remain unchanged. Tip: Use this to update a single field (e.g., change the upstream) without resending the entire route configuration.
PATCH Replace a single nested field of a route /apisix/admin/routes/{id}/{sub_path}Replaces the value at sub path within the route document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Upstreams /apisix/admin/upstreamsRetrieve all configured upstreams.
POST Create an Upstream /apisix/admin/upstreamsCreate a new upstream with an auto-generated ID.
GET Get an Upstream /apisix/admin/upstreams/{id}Retrieve a single upstream by its ID.
PUT Create or Replace an Upstream /apisix/admin/upstreams/{id}Create a new upstream with a specified ID, or fully replace an existing upstream.
DELETE Delete an Upstream /apisix/admin/upstreams/{id}Delete an upstream by its ID. Fails if the upstream is still referenced by a route or service.
PATCH Update an Upstream (Partial) /apisix/admin/upstreams/{id}Partially update an upstream's configuration.
PATCH Replace a single nested field of an upstream /apisix/admin/upstreams/{id}/{sub_path}Replaces the value at sub path within the upstream document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Services /apisix/admin/servicesRetrieve all configured services.
POST Create a Service /apisix/admin/servicesCreate a new service with an auto-generated ID.
GET Get a Service /apisix/admin/services/{id}Retrieve a single service by its ID.
PUT Create or Replace a Service /apisix/admin/services/{id}Create a new service with a specified ID, or fully replace an existing service.
DELETE Delete a Service /apisix/admin/services/{id}Delete a service by its ID.
PATCH Update a Service (Partial) /apisix/admin/services/{id}Partially update a service's configuration.
PATCH Replace a single nested field of a service /apisix/admin/services/{id}/{sub_path}Replaces the value at sub path within the service document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Consumers /apisix/admin/consumersRetrieve all configured consumers.
PUT Create or Update a Consumer /apisix/admin/consumersCreate a new consumer or update an existing one. The consumer is identified by username in the request body.
GET Get a Consumer /apisix/admin/consumers/{username}Retrieve a single consumer by username.
DELETE Delete a Consumer /apisix/admin/consumers/{username}Delete a consumer by username. This also deletes all associated credentials.
GET List All Consumer Groups /apisix/admin/consumer_groupsRetrieve all configured consumer groups.
GET Get a Consumer Group /apisix/admin/consumer_groups/{id}Retrieve a single consumer group by its ID.
PUT Create or Replace a Consumer Group /apisix/admin/consumer_groups/{id}Create a new consumer group with a specified ID, or fully replace an existing one.
DELETE Delete a Consumer Group /apisix/admin/consumer_groups/{id}Delete a consumer group by its ID.
PATCH Update a Consumer Group (Partial) /apisix/admin/consumer_groups/{id}Partially update a consumer group's configuration.
PATCH Replace a single nested field of a consumer group /apisix/admin/consumer_groups/{id}/{sub_path}Replaces the value at sub path within the consumer group document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List Consumer Credentials /apisix/admin/consumers/{username}/credentialsRetrieve all credentials for a specific consumer.
GET Get a Credential /apisix/admin/consumers/{username}/credentials/{id}Retrieve a specific credential for a consumer.
PUT Create or Replace a Credential /apisix/admin/consumers/{username}/credentials/{id}Create a new credential for a consumer with a specified ID, or replace an existing one. Each credential holds exactly one authentication plugin.
DELETE Delete a Credential /apisix/admin/consumers/{username}/credentials/{id}Delete a specific credential from a consumer.
GET List Plugin Names /apisix/admin/plugins/listGet a list of all available plugin names, optionally filtered by subsystem (http or stream).
GET Get Plugin JSON Schema /apisix/admin/plugins/{plugin_name}Retrieve the JSON Schema definition for a specific plugin. This is useful for validating plugin configurations before applying them.
GET List Plugin Attributes /apisix/admin/pluginsGet attributes of all plugins configured on the APISIX instance. Deprecated: This endpoint is being replaced. Use GET /plugins/list and GET /plugins/{plugin name} instead.
PUT Hot-Reload Plugins /apisix/admin/plugins/reloadTrigger a hot reload of all plugins. This re-reads plugin configurations from etcd without restarting APISIX. Important: Only the PUT method is accepted.
GET List All Plugin Configs /apisix/admin/plugin_configsRetrieve all configured plugin configs.
GET Get a Plugin Config /apisix/admin/plugin_configs/{id}Retrieve a single plugin config by its ID.
PUT Create or Replace a Plugin Config /apisix/admin/plugin_configs/{id}Create a new plugin config with a specified ID, or fully replace an existing one.
DELETE Delete a Plugin Config /apisix/admin/plugin_configs/{id}Delete a plugin config by its ID.
PATCH Update a Plugin Config (Partial) /apisix/admin/plugin_configs/{id}Partially update a plugin config's configuration.
PATCH Replace a single nested field of a plugin config /apisix/admin/plugin_configs/{id}/{sub_path}Replaces the value at sub path within the plugin config document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Plugin Metadata /apisix/admin/plugin_metadataRetrieve metadata for all plugins that have metadata configured.
GET Get Plugin Metadata /apisix/admin/plugin_metadata/{plugin_name}Retrieve metadata for a specific plugin by plugin name.
PUT Create or Replace Plugin Metadata /apisix/admin/plugin_metadata/{plugin_name}Set metadata for a specific plugin. This applies to all instances of the plugin across the cluster.
DELETE Delete Plugin Metadata /apisix/admin/plugin_metadata/{plugin_name}Delete metadata for a specific plugin.
GET List All Global Rules /apisix/admin/global_rulesRetrieve all configured global rules.
GET Get a Global Rule /apisix/admin/global_rules/{id}Retrieve a single global rule by its ID.
PUT Create or Replace a Global Rule /apisix/admin/global_rules/{id}Create a new global rule with a specified ID, or fully replace an existing one.
DELETE Delete a Global Rule /apisix/admin/global_rules/{id}Delete a global rule by its ID.
PATCH Update a Global Rule (Partial) /apisix/admin/global_rules/{id}Partially update a global rule's configuration.
PATCH Replace a single nested field of a global rule /apisix/admin/global_rules/{id}/{sub_path}Replaces the value at sub path within the global rule document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Stream Routes /apisix/admin/stream_routesRetrieve all configured stream (L4) routes. Prerequisite: Stream mode must be enabled in config.yaml.
POST Create a Stream Route /apisix/admin/stream_routesCreate a new stream route with an auto-generated ID.
GET Get Stream Route by ID /apisix/admin/stream_routes/{id}Get stream route by ID.
PUT Create Stream Route by ID /apisix/admin/stream_routes/{id}Create a stream route with a specified ID.
DELETE Delete Stream Route by ID /apisix/admin/stream_routes/{id}Delete a stream route by ID.
GET List All SSL Certificates /apisix/admin/sslsRetrieve all configured SSL certificates. Private keys are not included in the response for security.
POST Create an SSL Certificate /apisix/admin/sslsUpload a new SSL certificate with an auto-generated ID.
GET Get an SSL Certificate /apisix/admin/ssls/{id}Retrieve a single SSL certificate by its ID. The private key is not included in the response.
PUT Create or Replace an SSL Certificate /apisix/admin/ssls/{id}Upload a new SSL certificate with a specified ID, or replace an existing one.
DELETE Delete an SSL Certificate /apisix/admin/ssls/{id}Delete an SSL certificate by its ID.
PATCH Update an SSL Certificate (Partial) /apisix/admin/ssls/{id}Partially update an SSL certificate's configuration. Only the fields included in the request body are modified; all other fields remain unchanged.
PATCH Replace a single nested field of an SSL certificate /apisix/admin/ssls/{id}/{sub_path}Replaces the value at sub path within the SSL certificate document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET List All Secrets /apisix/admin/secretsRetrieve all configured secret manager integrations.
GET Get a Secret /apisix/admin/secrets/{secret_type}/{id}Retrieve a specific secret manager configuration.
PUT Create or Replace a Secret /apisix/admin/secrets/{secret_type}/{id}Configure a secret manager integration with a specified ID.
DELETE Delete a Secret /apisix/admin/secrets/{secret_type}/{id}Delete a secret manager configuration.
PATCH Update a Secret (Partial) /apisix/admin/secrets/{secret_type}/{id}Partially update a secret manager configuration.
GET List secrets of a single secret-manager type /apisix/admin/secrets/{secret_type}Returns secrets registered under the given manager (vault, aws, or gcp). For listing across all managers, use GET /apisix/admin/secrets.
PATCH Replace a single nested field of a secret /apisix/admin/secrets/{secret_type}/{id}/{sub_path}Replaces the value at sub path within the secret document with the request body. The body is any valid JSON value, not necessarily an object. The updated complete resource must pass validation.
GET Get a Proto /apisix/admin/protos/{id}Retrieve a single protobuf definition by its ID.
PUT Create or Replace a Proto /apisix/admin/protos/{id}Upload a protobuf definition with a specified ID, or replace an existing one.
DELETE Delete a Proto /apisix/admin/protos/{id}Delete a protobuf definition by its ID.
GET List All Protos /apisix/admin/protosRetrieve all stored protobuf definitions.
POST Create a Proto /apisix/admin/protosUpload a new protobuf definition with an auto-generated ID.
POST Validate Resource Configuration /apisix/admin/schema/validate/{resource}Validate a resource configuration against APISIX's JSON Schema without creating the resource. Useful for dry-run validation in CI/CD pipelines. The {resource} path parameter specifies the resource type (e.g., routes, upstreams, services, etc.).
GET Get the JSON Schema of a built-in resource /apisix/admin/schema/{resource}Returns the JSON Schema document used internally by APISIX to validate the named resource type.
GET Get a plugin's JSON Schema (alternative path) /apisix/admin/schema/plugins/{plugin_name}Equivalent to GET /apisix/admin/plugins/{plugin name}. Provided for symmetry with GET /apisix/admin/schema/{resource}.
HEAD Liveness probe /apisix/adminReturns 200 OK if the Admin API is reachable. Useful as a Kubernetes liveness probe target. This endpoint does not require authentication.
GET Get the standalone configuration /apisix/admin/configsAvailable only when deployment.config provider is yaml. Returns the entire current configuration document.
PUT Replace the standalone configuration /apisix/admin/configsReplaces the entire current configuration. Available only when deployment.config provider is yaml.
HEAD Probe standalone configuration availability /apisix/admin/configsReturns 200 OK if the deployment is in YAML provider mode and the configuration endpoint is reachable.
POST Validate a configuration without applying it /apisix/admin/configs/validateValidates the supplied declarative configuration document without modifying the current configuration. This endpoint is available with both etcd and yaml configuration providers.