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), upstreamid, serviceid, or plugins.
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.
GET Get a Route /apisix/admin/routes/{id}Retrieve a single route by its ID.
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.
DELETE Delete a Route /apisix/admin/routes/{id}Delete a route by its ID. This action is irreversible.
PATCH Replace a single nested field of a route /apisix/admin/routes/{id}/{sub_path}Replaces the value at subpath 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.
PUT Create or Replace an Upstream /apisix/admin/upstreams/{id}Create a new upstream with a specified ID, or fully replace an existing upstream.
PATCH Update an Upstream (Partial) /apisix/admin/upstreams/{id}Partially update an upstream's configuration.
GET Get an Upstream /apisix/admin/upstreams/{id}Retrieve a single upstream by its ID.
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 Replace a single nested field of an upstream /apisix/admin/upstreams/{id}/{sub_path}Replaces the value at subpath 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.
PATCH Update a Service (Partial) /apisix/admin/services/{id}Partially update a service's configuration.
DELETE Delete a Service /apisix/admin/services/{id}Delete a service by its ID.
GET List GraphQL Cost Decorations /apisix/admin/services/{service_id}/graphql_cost_decorationsList decorations owned by this service. A service with no decorations returns 404 rather than an empty list.
POST Create a GraphQL Cost Decoration /apisix/admin/services/{service_id}/graphql_cost_decorationsCreate a decoration with an automatically generated ID. The service must exist. Ownership is taken from the URL; omit serviceid in the body. Keep fieldpath unique within a service, and serialize concurrent writes for the service.
GET Get a GraphQL Cost Decoration /apisix/admin/services/{service_id}/graphql_cost_decorations/{decoration_id}PUT Create or Replace a GraphQL Cost Decoration /apisix/admin/services/{service_id}/graphql_cost_decorations/{decoration_id}Replace the complete decoration or create it if absent. The service must exist. Ownership is taken from the URL; a conflicting serviceid in the body is rejected. Keep fieldpath unique within a service, and serialize concurrent writes for the service.
PATCH Update a GraphQL Cost Decoration /apisix/admin/services/{service_id}/graphql_cost_decorations/{decoration_id}Merge fields into an existing decoration. serviceid cannot be patched, even to its existing value. A changed fieldpath must not duplicate another decoration on the service. JSON subpath patching is not supported for this subresource.
DELETE Delete a GraphQL Cost Decoration /apisix/admin/services/{service_id}/graphql_cost_decorations/{decoration_id}PATCH Replace a single nested field of a service /apisix/admin/services/{id}/{sub_path}Replaces the value at subpath 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.
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 List All Consumers /apisix/admin/consumersRetrieve all configured consumers.
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.
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.
GET Get a Consumer Group /apisix/admin/consumer_groups/{id}Retrieve a single consumer group by its ID.
PATCH Update a Consumer Group (Partial) /apisix/admin/consumer_groups/{id}Partially update a consumer group's configuration.
DELETE Delete a Consumer Group /apisix/admin/consumer_groups/{id}Delete a consumer group by its ID.
PATCH Replace a single nested field of a consumer group /apisix/admin/consumer_groups/{id}/{sub_path}Replaces the value at subpath 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/{pluginname} 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.
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.
GET Get a Plugin Config /apisix/admin/plugin_configs/{id}Retrieve a single plugin config by its ID.
PATCH Update a Plugin Config (Partial) /apisix/admin/plugin_configs/{id}Partially update a plugin config's configuration.
DELETE Delete a Plugin Config /apisix/admin/plugin_configs/{id}Delete a plugin config by its ID.
PATCH Replace a single nested field of a plugin config /apisix/admin/plugin_configs/{id}/{sub_path}Replaces the value at subpath 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.
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.
GET Get Plugin Metadata /apisix/admin/plugin_metadata/{plugin_name}Retrieve metadata for a specific plugin by plugin name.
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.
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.
GET Get a Global Rule /apisix/admin/global_rules/{id}Retrieve a single global rule by its ID.
PATCH Update a Global Rule (Partial) /apisix/admin/global_rules/{id}Partially update a global rule's configuration.
DELETE Delete a Global Rule /apisix/admin/global_rules/{id}Delete a global rule by its ID.
PATCH Replace a single nested field of a global rule /apisix/admin/global_rules/{id}/{sub_path}Replaces the value at subpath 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.
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.
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.
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.
DELETE Delete an SSL Certificate /apisix/admin/ssls/{id}Delete an SSL certificate by its ID.
PATCH Replace a single nested field of an SSL certificate /apisix/admin/ssls/{id}/{sub_path}Replaces the value at subpath 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.
PATCH Update a Secret (Partial) /apisix/admin/secrets/{secret_type}/{id}Partially update a secret manager configuration.
DELETE Delete a Secret /apisix/admin/secrets/{secret_type}/{id}Delete 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 subpath 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.
PUT Create or Replace a Proto /apisix/admin/protos/{id}Upload a protobuf definition with a specified ID, or replace an existing one.
GET Get a Proto /apisix/admin/protos/{id}Retrieve a single protobuf definition by its ID.
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.).
POST Validate a Configuration Without Applying It /apisix/admin/configs/validateValidates 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 confversion fields, duplicate resource identifiers, resource JSON Schemas, and plugin checkschema functions. All detected errors are returned together. Cross-resource existence is not checked, so a reference such as an upstreamid can pass even when the referenced resource is absent. The operation does not persist or apply any configuration.
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/{pluginname}. 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 in API-driven standalone mode, with the YAML configuration provider and Admin API enabled. Returns the accepted configuration snapshot and its version and digest metadata, not a worker synchronization report. See API-Driven Standalone Mode Usage.
PUT Replace the standalone configuration /apisix/admin/configsReplace the complete configuration snapshot in API-driven standalone mode. Omitted resources are removed unless their resource type's configuration version is explicitly retained. Validate the complete document before applying it. A client-supplied X-Digest is required and must change when the intended configuration changes. APISIX compares the supplied identifier, not a computed hash. A matching digest skips the update and any wait. APISIX supports an optional bounded wait for local worker synchronization; this does not verify other instances or upstream health. See API-Driven Standalone Mode Usage.
HEAD Probe standalone configuration availability /apisix/admin/configsReturns 200 OK when the API-driven standalone configuration endpoint is reachable, including before any snapshot is loaded. When available, digest and last-modified metadata are returned in headers. This endpoint does not confirm worker synchronization.