17 KiB
17 KiB
Admin API IT Scenario Index
This document records which admin API operations are covered by the
standalone-server IT classes under
src/test/java/com/alibaba/nacos/test/adminapi.
Source API surface: admin swagger at https://nacos.io/swagger/admin/zh/api.json.
The branch-level coverage target is API scenario coverage: expected capability,
boundary/validation behavior, and controlled exception/error handling.
Status Legend
| Status | Meaning |
|---|---|
| Covered | The current IT verifies the expected behavior and its important result shape. |
| Partial | The current IT verifies representative behavior, but important public API scenarios remain. |
| Pending | No IT currently verifies this public API scenario. |
Config
| API surface / IT class | Covered API operations | Current status | Current / missing coverage |
|---|---|---|---|
ConfigAdminApiOpenApiITCase |
GET,POST,PUT,DELETE /v3/admin/cs/config |
Covered | Publishes, republishes, queries, updates metadata, and deletes config; covers blank/omitted namespace defaulting to current public storage, type normalization, required identity/content fields, absent config 404, duplicate/update semantics, and malformed metadata errors. Removed empty-tenant migration and dual-write behavior is outside the 3.3 API contract. |
ConfigListAdminApiOpenApiITCase |
GET /v3/admin/cs/config/list |
Covered | Lists published configs through admin page model with fuzzy and accurate filters; covers type and tag filters, blank dataId group-scoped listing, public namespace defaulting, pagination validation, empty pages, and wrapped error bodies. |
ConfigBatchDeleteAdminApiOpenApiITCase |
DELETE /v3/admin/cs/config/batch |
Covered | Deletes multiple configs by comma-separated ids and verifies absence; covers non-existing ids being ignored, required ids, and HTTP 400 v3 Result validation errors. |
ConfigBetaAdminApiOpenApiITCase |
GET,DELETE /v3/admin/cs/config/beta |
Covered | Queries and deletes beta config created via the current publish API and gray model; covers public namespace defaulting, beta rule generated from betaIps, required fields, absent beta 404, and v3 error envelope. Removed config_info_beta old-table migration is not an expected scenario. |
ConfigGrayAdminApiOpenApiITCase |
GET,POST,PUT,DELETE /v3/admin/cs/config/gray |
Covered | Publishes, queries, updates, and deletes gray config with current gray metadata; covers public namespace defaulting, tagv2 version acceptance, grayName/rule requirements, absent gray config, and parameter validation errors. Removed config_info_tag old-table migration is not an expected scenario. |
ConfigImportAdminApiOpenApiITCase |
POST /v3/admin/cs/config/import |
Covered | Imports a metadata ZIP and verifies the imported config can be queried; covers public namespace defaulting, ABORT policy, missing file, malformed metadata ZIP, and business failures in v3 Result form. |
ConfigExportAdminApiOpenApiITCase |
GET /v3/admin/cs/config/export |
Covered | Exports config by ids and namespace as downloadable ZIP containing config entries and metadata; covers public namespace defaulting, query serialization, invalid namespace, absent ids, and non-JSON download/error response variants. |
ConfigCloneAdminApiOpenApiITCase |
POST /v3/admin/cs/config/clone |
Covered | Clones existing configs to target dataId/group/namespace and verifies queried target content; covers required namespace, empty clone list rejection, malformed clone payload, business failures, and v3 error bodies. |
ConfigHistoryAdminApiOpenApiITCase |
GET /v3/admin/cs/historyGET /v3/admin/cs/history/listGET /v3/admin/cs/history/previousGET /v3/admin/cs/history/configs |
Covered | Publishes/republishes config and verifies history list, detail, previous, and configs history queries; covers large page size, required paging and identity fields, absent/mismatched history, and controlled errors. |
ConfigListenerAdminApiOpenApiITCase |
GET /v3/admin/cs/config/listenerGET /v3/admin/cs/listener |
Covered | Queries config-scoped and IP-scoped listener state; covers public namespace defaulting, aggregation=false, required dataId/group/ip, and HTTP 400 validation envelopes. |
ConfigCapacityAdminApiOpenApiITCase |
GET,POST /v3/admin/cs/capacity |
Covered | Updates and queries group/namespace capacity limits; covers identity requirements, at-least-one capacity field, and validation error envelopes. There is no public delete endpoint for capacity rows. |
ConfigMetricsAdminApiOpenApiITCase |
GET /v3/admin/cs/metrics |
Covered | Queries config metrics and verifies JSON object shape; covers parameter-free request behavior and success response contract. |
ConfigOpsAdminApiOpenApiITCase |
POST /v3/admin/cs/ops/localCachePUT /v3/admin/cs/ops/logGET /v3/admin/cs/ops/derbyPOST /v3/admin/cs/ops/derby/import |
Partial | Triggers local-cache dump success and verifies ops validation; covers log update required params, Derby query required sql, Derby import disabled/non-embedded controlled failure, and intentionally avoids successful DB import because it mutates embedded storage. |
Naming
| API surface / IT class | Covered API operations | Current status | Current / missing coverage |
|---|---|---|---|
ServiceAdminApiOpenApiITCase |
GET,PUT,POST,DELETE /v3/admin/ns/serviceGET /v3/admin/ns/service/listGET /v3/admin/ns/service/selector/typesGET /v3/admin/ns/service/subscribers |
Covered | Creates, queries, updates, lists, and deletes persistent services; verifies selector types, subscriber empty page shape, public/default group defaults, required serviceName, pagination validation, and v3 errors. |
InstanceAdminApiOpenApiITCase |
GET,PUT,POST,DELETE /v3/admin/ns/instanceGET /v3/admin/ns/instance/listPUT /v3/admin/ns/instance/partial |
Covered | Registers, queries, lists, updates, partially updates, and deletes instances; covers defaults, healthy/enabled/ephemeral/weight behavior, required fields, invalid values, missing instance, and persistent-service conflicts. |
InstanceMetadataAdminApiOpenApiITCase |
PUT,DELETE /v3/admin/ns/instance/metadata/batch |
Covered | Batch-updates and batch-deletes instance metadata and verifies applied/removed metadata; covers omitted instance selector meaning all instances, explicit selector isolation, required fields, malformed selector, and empty target behavior. |
ClusterAdminApiOpenApiITCase |
PUT /v3/admin/ns/cluster |
Covered | Updates cluster health check config and verifies service cluster metadata; covers defaults, required service/cluster/checker/check port fields, missing service, and validation errors. |
HealthAdminApiOpenApiITCase |
GET /v3/admin/ns/health/checkersPUT /v3/admin/ns/health/instance |
Covered | Lists health checker types and manually updates instance health where eligible; covers defaults, required fields, missing checker/service branches, and controlled SERVER_ERROR/v3 errors. |
ClientAdminApiOpenApiITCase |
GET /v3/admin/ns/client/listGET /v3/admin/ns/clientGET /v3/admin/ns/client/publishersGET /v3/admin/ns/client/subscribersGET /v3/admin/ns/client/distro |
Covered | Verifies HTTP registered instance creates a visible client; covers detail, publish/subscriber lists, distro info, namespace/group isolation, required service fields, missing client 404, and empty list shapes. |
OperatorAdminApiOpenApiITCase |
GET,PUT /v3/admin/ns/ops/switchesGET /v3/admin/ns/ops/metricsPUT /v3/admin/ns/ops/log |
Covered | Queries and updates naming switches, queries metrics, and updates naming log level; covers metrics defaulting, required switch fields, invalid values, and controlled SERVER_ERROR/v3 errors. |
Core
| API surface / IT class | Covered API operations | Current status | Current / missing coverage |
|---|---|---|---|
NamespaceAdminApiOpenApiITCase |
GET,PUT,POST,DELETE /v3/admin/core/namespaceGET /v3/admin/core/namespace/existGET /v3/admin/core/namespace/list |
Covered | Creates, queries, lists, checks, updates, and deletes namespace metadata; covers id trimming/length, namespace name validation, duplicate/missing fields, post-delete checks, and HTTP 400 errors. |
CoreClusterAdminApiOpenApiITCase |
GET /v3/admin/core/cluster/selfGET /v3/admin/core/cluster/nodesPUT /v3/admin/core/cluster/nodePOST /v3/admin/core/cluster/lookup |
Partial | Queries self node and node list with address/state filters; covers case-insensitive legal state, illegal state validation, empty node update body, lookup required fields, and intentionally avoids topology mutation success paths. |
ServerLoaderAdminApiOpenApiITCase |
GET /v3/admin/core/loader/currentGET /v3/admin/core/loader/clusterPOST /v3/admin/core/loader/reloadCurrentPOST /v3/admin/core/loader/reloadClientPOST /v3/admin/core/loader/smartReloadCluster |
Partial | Queries current connections and cluster loader metrics; covers required count/connectionId, numeric loaderFactor validation for smart reload, and intentionally avoids successful rebalance operations. |
PluginAdminApiOpenApiITCase |
GET /v3/admin/core/pluginGET /v3/admin/core/plugin/listGET /v3/admin/core/plugin/detailPUT /v3/admin/core/plugin/statusGET,PUT /v3/admin/core/plugin/config |
Partial | Lists plugins, filters by pluginType, and queries detail, including the configValueMetas map shape; covers unknown type empty list, missing plugin 404, required params, and rejection of config updates for non-configurable plugins. Full-map replacement/removal, key normalization, runtime/restart checks, same-source sensitive value preservation, persistence failure isolation, and retained-source apply failure/retry are covered by core unit tests because no built-in standalone plugin currently implements PluginConfigSpec. |
CoreOpsAdminApiOpenApiITCase |
GET /v3/admin/core/ops/idsPOST /v3/admin/core/ops/raftPUT /v3/admin/core/ops/log |
Covered | Queries id-generator diagnostics and updates runtime log level; covers raft command/value requirements, log body requirements, and JSON body validation errors. |
CoreStateAdminApiOpenApiITCase |
GET /v3/admin/core/stateGET /v3/admin/core/state/livenessGET /v3/admin/core/state/readiness |
Covered | Queries server state, liveness, and readiness; covers parameter-free behavior, unexpected query tolerance, and documents that readiness failure is not forced because it mutates shared server state. |
AI Registry
| API surface / IT class | Covered API operations | Current status | Current / missing coverage |
|---|---|---|---|
A2aAdminApiOpenApiITCase |
GET,PUT,POST,DELETE /v3/admin/ai/a2aGET /v3/admin/ai/a2a/listGET /v3/admin/ai/a2a/version/list |
Covered | Registers legacy and v1 agent cards, normalizes interfaces, queries by version/latest, updates latest, lists, enumerates versions, and deletes; covers defaults, invalid search/type/card JSON, missing identity, absent agent, and tolerant delete. |
McpAdminApiOpenApiITCase |
GET,PUT,POST,DELETE /v3/admin/ai/mcpGET /v3/admin/ai/mcp/list |
Covered | Creates MCP server with stdio spec/tools/resources, queries by id/name/latest, updates version, lists accurate/blur, and deletes; covers identity alternatives, invalid search/custom id/JSON, duplicate conflict, not-found, and empty pages. |
PipelineAdminApiOpenApiITCase |
GET /v3/admin/ai/pipelinesGET /v3/admin/ai/pipelines/listGET /v3/admin/ai/pipelines/detailGET /v3/admin/ai/pipelines/{pipelineId} |
Partial | Lists current and legacy pipeline page contracts and queries pipeline detail; covers required resourceType, pagination validation, unknown pipeline 404, and unavailable external resource behavior. |
AiResourceImportAdminApiOpenApiITCase |
GET /v3/admin/ai/import/sourcesPOST /v3/admin/ai/import/searchPOST /v3/admin/ai/import/validatePOST /v3/admin/ai/import/execute |
Covered | Lists sanitized import sources and runs search/validate/execute flows with fake source data; covers required fields, JSON option parsing, overwrite/skipInvalid flags, unsupported resource/source types, token mismatch, and import result errors. |
PromptAdminApiOpenApiITCase |
DELETE /v3/admin/ai/promptGET /v3/admin/ai/prompt/listGET /v3/admin/ai/prompt/versionsGET /v3/admin/ai/prompt/governanceGET /v3/admin/ai/prompt/versionGET /v3/admin/ai/prompt/version/downloadPOST,PUT,DELETE /v3/admin/ai/prompt/draftPOST /v3/admin/ai/prompt/submitPOST /v3/admin/ai/prompt/publishPOST /v3/admin/ai/prompt/force-publishPOST /v3/admin/ai/prompt/redraftPOST /v3/admin/ai/prompt/onlinePOST /v3/admin/ai/prompt/offlinePUT /v3/admin/ai/prompt/labelsPUT /v3/admin/ai/prompt/descriptionPUT /v3/admin/ai/prompt/biz-tags |
Covered | Exercises prompt draft create/update/delete, submit, force-publish, governance, versions, list, metadata, labels, server-managed latest label preservation, publish-parameter compatibility, bizTags, online/offline latest maintenance, download, legacy compatibility, and delete; covers defaults, search filters, version format, missing params, absent resources, and controlled workflow errors. |
SkillAdminApiOpenApiITCase |
GET,DELETE /v3/admin/ai/skillsGET /v3/admin/ai/skills/listGET /v3/admin/ai/skills/versionGET /v3/admin/ai/skills/version/downloadPOST,PUT,DELETE /v3/admin/ai/skills/draftPOST /v3/admin/ai/skills/submitPOST /v3/admin/ai/skills/publishPOST /v3/admin/ai/skills/force-publishPOST /v3/admin/ai/skills/redraftPOST /v3/admin/ai/skills/onlinePOST /v3/admin/ai/skills/offlinePUT /v3/admin/ai/skills/labelsPUT /v3/admin/ai/skills/biz-tagsPUT /v3/admin/ai/skills/scope |
Covered | Exercises skill draft/create/update/delete/fork, submit, force-publish, metadata, labels, server-managed latest label preservation, publish-parameter compatibility, bizTags, scope, online/offline latest maintenance, download, list, and delete; covers defaults, search/scope/bizTag filters, version and SKILL.md mismatch validation, absent resources, and controlled workflow errors. |
SkillUploadAdminApiOpenApiITCase |
POST /v3/admin/ai/skills/uploadPOST /v3/admin/ai/skills/upload/batch/precheckPOST /v3/admin/ai/skills/upload/batch |
Covered | Uploads single and batch skill ZIPs, validates generated drafts/resources, lightweight JSON metadata precheck action reporting for an existing editing draft, overwrite behavior, next version generation, short uploaded version normalization and invalid uploaded version fallback for precheck/upload/batch upload, and partial batch handling; covers empty/malformed ZIP, missing SKILL.md, and upload error envelopes. |
AgentSpecAdminApiOpenApiITCase |
GET,DELETE /v3/admin/ai/agentspecsGET /v3/admin/ai/agentspecs/listGET /v3/admin/ai/agentspecs/versionGET /v3/admin/ai/agentspecs/version/metaPOST,PUT,DELETE /v3/admin/ai/agentspecs/draftPOST /v3/admin/ai/agentspecs/submitPOST /v3/admin/ai/agentspecs/publishPOST /v3/admin/ai/agentspecs/force-publishPOST /v3/admin/ai/agentspecs/redraftPOST /v3/admin/ai/agentspecs/onlinePOST /v3/admin/ai/agentspecs/offlinePUT /v3/admin/ai/agentspecs/labelsPUT /v3/admin/ai/agentspecs/biz-tagsPUT /v3/admin/ai/agentspecs/scope |
Covered | Exercises AgentSpec draft/create/update/delete/fork, force-publish, metadata, version/meta, labels, server-managed latest label preservation, publish-parameter compatibility, bizTags, scope, online/offline latest maintenance, list, and delete; covers defaults, search/scope filters, version validation, absent resources, and controlled workflow errors. |
AgentSpecUploadAdminApiOpenApiITCase |
POST /v3/admin/ai/agentspecs/upload |
Covered | Uploads single and batch AgentSpec ZIPs, validates manifest/resources, overwrite behavior, next version generation, and partial batch handling; covers empty/malformed ZIP, missing manifest, invalid targetVersion, and upload error envelopes. |