ADC lets you manage Apache APISIX and API7 Enterprise configuration from local files. A typical workflow is:
- Connect ADC to a backend.
- Export or write an
adc.yamlfile. - Lint and validate the file.
- Preview the diff.
- Sync the expected changes.
- Keep the file in version control.
This gives teams a reviewable source of truth for gateway configuration and makes drift visible before changes reach production.
- ADC is installed. See Installation.
- An Apache APISIX or API7 Enterprise Admin API endpoint is reachable from the machine or CI runner that runs ADC.
- You have an Admin API key or API7 Enterprise dashboard token.
- For API7 Enterprise, you know the target gateway group.
ADC reads configuration from command-line flags, environment variables, and .env files. Command-line flags take precedence over environment variables, and environment variables take precedence over .env values.
For API7 Enterprise:
export ADC_BACKEND=api7ee
export ADC_SERVER=https://localhost:7443
export ADC_TOKEN=<dashboard-token>
export ADC_GATEWAY_GROUP=defaultFor Apache APISIX:
export ADC_BACKEND=apisix
export ADC_SERVER=http://localhost:9180
export ADC_TOKEN=<admin-api-key>You can store the same values in a .env file in the working directory:
ADC_BACKEND=api7ee
ADC_SERVER=https://localhost:7443
ADC_TOKEN=<dashboard-token>
ADC_GATEWAY_GROUP=default
For a one-off command, pass the options as flags:
adc ping --backend apisix --server http://localhost:9180 --token <admin-api-key>If the backend uses a self-signed certificate, use --ca-cert-file with a trusted CA certificate. For local testing, you can use --tls-skip-verify.
Verify the connection:
adc pingYou can write a configuration file by hand, convert one from OpenAPI, or start from the current backend state.
To export the current backend configuration:
adc dump -o adc.yamlIf the backend already has resources that were created outside ADC, export the real backend IDs before adopting them:
adc dump --with-id -o adc.yamlKeeping those IDs prevents ADC from replacing existing resources with newly generated IDs. See Resource IDs before adopting UI-created or Admin API-created resources.
An ADC file can define services, routes, consumers, global rules, plugin metadata, and SSL certificates:
services:
- name: httpbin-service
upstream:
name: default
scheme: http
type: roundrobin
nodes:
- host: httpbin.org
port: 80
weight: 100
routes:
- name: get-ip
uris:
- /ip
methods:
- GET
plugins:
key-auth: {}
consumers:
- username: demo-user
credentials:
- name: primary-key
type: key-auth
config:
key: <api-key>See Configuration Reference for the supported fields.
Run adc lint before comparing or syncing:
adc lint -f adc.yamllint checks local syntax and ADC schema rules. It does not connect to the backend.
Run adc validate when you want backend-side validation without applying changes:
adc validate -f adc.yamlvalidate asks the backend to validate the resources described by the local file. This is useful in CI because it catches issues that only the target backend can know, such as unsupported plugin configuration.
Run adc diff before applying a file:
adc diff -f adc.yamlReview the output carefully. adc diff also writes a machine-readable diff.yaml file in the current directory.
After reviewing the diff, sync the file:
adc sync -f adc.yamladc sync reconciles the backend to match the local file. It can create, update, and delete resources that are in the command scope. A remote resource that is in scope but absent from the local file can be deleted.
The command scope is controlled by:
--gateway-groupfor API7 Enterprise gateway groups.--label-selectorfor label-based ownership.--include-resource-typeand--exclude-resource-typefor resource type filters.
Use Label Selector if more than one team or pipeline manages the same backend.
ADC can generate configuration from OpenAPI 2.0 and OpenAPI 3.x specifications:
adc convert openapi -f openapi.yaml -o adc.yamlPlain OpenAPI documents describe APIs, not gateway-specific behavior. Add x-adc-* extensions when you need to control generated service names, route names, plugins, labels, upstream defaults, or route defaults. See OpenAPI Converter Reference.
For a pull request or deployment pipeline, use this order:
adc lint -f adc.yaml
adc validate -f adc.yaml
adc diff -f adc.yaml
adc sync -f adc.yamlRun sync only after the diff has been reviewed or approved by your release process.