Kong Admin API
What is the Kong Admin API?
The Admin API is an internal RESTful API designed for administration purposes. It provides full control over Kong Gateway.
Requests to the Admin API can be sent to any node in the cluster, and Kong will keep the configuration consistent across all nodes.
By default, the Admin API is exposed on the following ports:
- 8001 for HTTP
- 8444 for HTTPS
This can be customized with the admin_listen
parameter in in the Kong Gateway configuration.
Frequently asked questions
Does the Kong Admin API work with Gateway entities in Konnect?
It does not. All of the apps in Konnect have their own APIs. To manage entities in the Gateway Manager, you can use the Konnect Control Plane Config API.
Can I use the Admin API in DB-less mode?
In DB-less mode, you configure Kong Gateway declaratively. The Admin API for each Kong Gateway node functions independently, reflecting the memory state of that particular node. This is the case because there is no database coordination between nodes. Therefore, the Admin API is mostly read-only.
When running Kong Gateway in DB-less mode, the Admin API can only perform tasks related to handling the declarative config:
How can I send a request for a specific Workspace?
You can target a specific Workspace by prefixing any endpoint with the Workspace name or ID. For example, you can use the following command to get all services from a Workspace named SRE
:
curl -i -X GET http://localhost:8001/SRE/services
If no Workspace is specified, the request applies to the default
Workspace.