Background
We started validating whether the current a7 CLI is stable by connecting the real CLI to a local API7 environment, instead of relying on test framework results or mocks.
Validation environment:
- API7 control plane: local HTTPS environment
- Gateway group:
product
- API7 image version:
3.8.23
- Validation method: create, read, update, and delete resources only through
a7, then assert the result through a7 get/list/dump/diff/sync
This issue tracks live CLI findings and remaining coverage. We should finish the full CLI validation first, then split fixes into PRs.
Verified Working CLI Paths
context create --tls-skip-verify --use
gateway-group list
service create/get/list/update/export/delete
route create/get/list --service-id/delete
route update -f
consumer create/get/list/delete
credential create -f/list/get/delete
config sync can create, update, and delete service + route resources
config diff can confirm synced resources as unchanged
config dump can read back the current gateway group configuration
Findings
1. context create does not persist a token supplied through A7_TOKEN
Behavior:
- Run
context create with the API token supplied only through A7_TOKEN
- The context is created successfully
- Later commands fail unless
A7_TOKEN is supplied again:
Error: no API token configured; run 'a7 context create' or set A7_TOKEN
We need to confirm whether this is intended behavior. If environment tokens are intentionally not persisted, the docs and error message should make that clear.
2. route list without --service-id is rejected by the API
Behavior:
Error: API error (status 400): validate request failed: parameter "service_id" in query has an error: value is required but missing
route list --help already says --service-id is required by API7 EE, but the CLI does not validate it locally and lets the API return the error.
Questions:
- Should
route list support listing all routes?
- If API7 EE requires
service_id, the CLI should validate this locally and return a clearer error.
3. service update uses full replacement semantics and can drop fields
Behavior:
- Create a service with
name
- Run
service update <id> --desc ... --labels ... --host ... without --name
- Run
service get; the name field is gone
This suggests the flag-based update path sends a full PUT body without reading and merging the existing object first. That can accidentally remove fields.
We need to check whether other update commands have the same risk.
4. route update --uri does not map to API7 EE paths
Behavior:
route create --uri ... succeeds, so create maps uri to paths
route update --uri ... fails because the API requires paths
Error:
request body has an error: property "paths" is missing
Current workaround:
- Use
route update -f with an explicit paths payload
5. credential create <id> does not map to the API-required name
Behavior:
- Run
credential create <id> --consumer ... --plugins-json ...
- The API returns
name is missing
Current workaround:
- Use
credential create --consumer ... -f credential.json
- Include
name in the file payload
We need to confirm whether the positional <id> should map to name in the API7 EE credential model, or whether the CLI help/docs should change.
6. secret create flag/positional mode returned resource not found
Behavior:
secret list returns an empty list, so the read path is at least reachable
secret create ... returned:
Error: resource not found
Need to confirm:
- Whether the current API7 3.8.23 environment supports secret provider writes
- Whether the endpoint used by
a7 matches the current API7 EE version
- Whether create/update/delete require a different path or request shape
7. plugin-config list/create returns resource not found
Behavior:
plugin-config list returns resource not found
plugin-config create returns resource not found
Based on the current PRD, plugin-config is an APISIX reusable plugin configuration resource that routes can reference to reuse plugin settings. The PRD also states that API7 EE Admin API does not expose this resource:
Plugin configs are not exposed via the API7 EE Admin API.
The a7 plugin-config commands exist for APISIX compatibility but will not work against API7 EE.
Decisions needed:
- Should
a7 plugin-config stay as an APISIX compatibility command?
- If yes, should it return a clearer message in API7 EE environments?
- Should it be excluded from the default API7 EE E2E/live CLI validation scope?
- Should declarative config continue ignoring
plugin_configs?
Remaining Coverage
Live CLI validation still needs these resources/scenarios:
ssl CRUD
ssl SNI/SNIs behavior, including multiple SNIs, updating SNI, and readback assertions
- Full secret provider create/read/update/delete path
- Global rule / global plugin resource CRUD
- Plugin metadata CRUD
- Proto CRUD
- Stream route CRUD
- Whether upstream commands still apply to the current API7 EE version
- Whether consumer group is supported by API7 EE or is an APISIX compatibility resource like plugin-config
- Service template / gateway group read-only and optional CRUD boundaries
- Whether other resource updates have the same field-dropping issue as
service update
- Whether flag mode and
-f file mode behave consistently for each resource
config sync create/update/delete/readback coverage across more resource types
Suggested Follow-Up
Continue the full live CLI validation first. Do not fix everything in this issue directly.
After validation is complete, split fixes by problem type:
- CLI flag to API7 EE schema mapping issues
- Update replacement/merge semantics
- API7 EE unsupported resources or endpoint mismatches
- Documentation/help/error message clarification
- E2E or live CLI checklist coverage
Background
We started validating whether the current
a7CLI is stable by connecting the real CLI to a local API7 environment, instead of relying on test framework results or mocks.Validation environment:
product3.8.23a7, then assert the result througha7 get/list/dump/diff/syncThis issue tracks live CLI findings and remaining coverage. We should finish the full CLI validation first, then split fixes into PRs.
Verified Working CLI Paths
context create --tls-skip-verify --usegateway-group listservice create/get/list/update/export/deleteroute create/get/list --service-id/deleteroute update -fconsumer create/get/list/deletecredential create -f/list/get/deleteconfig synccan create, update, and delete service + route resourcesconfig diffcan confirm synced resources asunchangedconfig dumpcan read back the current gateway group configurationFindings
1.
context createdoes not persist a token supplied throughA7_TOKENBehavior:
context createwith the API token supplied only throughA7_TOKENA7_TOKENis supplied again:We need to confirm whether this is intended behavior. If environment tokens are intentionally not persisted, the docs and error message should make that clear.
2.
route listwithout--service-idis rejected by the APIBehavior:
route list --helpalready says--service-idis required by API7 EE, but the CLI does not validate it locally and lets the API return the error.Questions:
route listsupport listing all routes?service_id, the CLI should validate this locally and return a clearer error.3.
service updateuses full replacement semantics and can drop fieldsBehavior:
nameservice update <id> --desc ... --labels ... --host ...without--nameservice get; thenamefield is goneThis suggests the flag-based update path sends a full PUT body without reading and merging the existing object first. That can accidentally remove fields.
We need to check whether other update commands have the same risk.
4.
route update --uridoes not map to API7 EEpathsBehavior:
route create --uri ...succeeds, so create mapsuritopathsroute update --uri ...fails because the API requirespathsError:
Current workaround:
route update -fwith an explicitpathspayload5.
credential create <id>does not map to the API-requirednameBehavior:
credential create <id> --consumer ... --plugins-json ...name is missingCurrent workaround:
credential create --consumer ... -f credential.jsonnamein the file payloadWe need to confirm whether the positional
<id>should map tonamein the API7 EE credential model, or whether the CLI help/docs should change.6.
secret createflag/positional mode returnedresource not foundBehavior:
secret listreturns an empty list, so the read path is at least reachablesecret create ...returned:Need to confirm:
a7matches the current API7 EE version7.
plugin-config list/createreturnsresource not foundBehavior:
plugin-config listreturnsresource not foundplugin-config createreturnsresource not foundBased on the current PRD,
plugin-configis an APISIX reusable plugin configuration resource that routes can reference to reuse plugin settings. The PRD also states that API7 EE Admin API does not expose this resource:Decisions needed:
a7 plugin-configstay as an APISIX compatibility command?plugin_configs?Remaining Coverage
Live CLI validation still needs these resources/scenarios:
sslCRUDsslSNI/SNIs behavior, including multiple SNIs, updating SNI, and readback assertionsservice update-ffile mode behave consistently for each resourceconfig synccreate/update/delete/readback coverage across more resource typesSuggested Follow-Up
Continue the full live CLI validation first. Do not fix everything in this issue directly.
After validation is complete, split fixes by problem type: