Skip to navigation

Admin API reference

The admin API configures your organization: its connections, routes, plugin instances, and more. It’s a JSON REST API on the control plane, and a change that you make through it reaches your data planes the same way a console change does. The gateway API is different: your applications call it to send traffic. This page lists what the admin API offers. For the steps and examples, see Configure the gateway with the admin API.

Base URL

Every admin API path starts with your tenant ID:

https://CONTROL_PLANE_HOST/api/v1/TENANT_ID/RESOURCE

To find your tenant ID, select your organization name at the bottom of the console sidebar, select Account settings, and copy Tenant ID. A request with any other tenant ID gets 403.

Paths without a namespace act on the Default namespace, not on the namespace you’ve selected in the console. To work in another namespace, put namespaces/NAMESPACE_ID before the resource, for example /api/v1/TENANT_ID/namespaces/NAMESPACE_ID/routes. For details, see Work in a namespace.

Authentication

Send an API key in the fg-tenant-api-key header, and send JSON bodies with Content-Type: application/json. An API key acts for the whole organization. It can’t manage API keys, including listing them. For the steps to create one, see Manage API keys.

Resources

ResourcePathMethods
Services (connections)/services, /services/NAMEGET, POST, PUT, DELETE
Routes/routes, /routes/NAMEGET, POST, PUT, DELETE
Plugin instances/plugin-instances, /plugin-instances/NAMEGET, POST, PUT, DELETE
Credentials/credentials, /credentials/IDGET, POST, PATCH, DELETE
Namespaces/namespaces, /namespaces/IDGET, POST, PATCH, DELETE
Budgets/budgetsGET, PUT
Vaults/vaults, /vaults/NAMEGET, POST, PUT (POST and PUT need your own data plane)
LLM token usage/analytics/llm-usageGET

PUT replaces the whole resource, so send every field, not only the ones you change.

A connection also accepts POST /services/NAME/disable and POST /services/NAME/resume to pause and restart it. A credential accepts POST /credentials/ID/rotate and POST /credentials/ID/revoke.

Next steps