Skip to content
OpenClaw 不踩坑恶意 Skills ,企业需 Skills Registry:Nacos 3.2 发布Know more

Admin API

Standard Nacos 3.x Admin APIs use the /v3/admin/* path. The current version has removed v1/v2 Admin APIs. Use Nacos 3.x Admin APIs instead.

If you still need v1/v2 Admin APIs temporarily during migration, read Compatibility and Deprecation first, and evaluate the legacy adapter approach described in the upgrading manual.

Nacos provides Admin APIs for administrators, operations platforms, release platforms, audit tools, and automation scripts. These APIs expose broader management capabilities than runtime client APIs, including range queries, resource management, server state inspection, and operational diagnostics.

0. Admin API Notes

0.1. Scope

Admin APIs are intended for management-plane callers. They are suitable for operations platforms, release platforms, audit tools, automation scripts, and administrators.

Good FitNot a Good Fit
Publishing, deleting, importing, exporting, and querying configurations.High-frequency runtime configuration reads from business applications.
Managing namespaces, services, instances, clusters, health state, and metadata.Business applications registering their own instances or subscribing to downstream services.
Managing plugins, server state, AI resources, and operational diagnostics.Page-level interactions for custom console UI.

Business applications should prefer Java SDK, other language SDKs, or Client API. Custom console UI should prefer Console API.

0.2. Unified Path Format

Nacos Admin APIs use a unified path format: [/$nacos.server.contextPath]/v3/admin/[module]/[subPath]....

  • $nacos.server.contextPath: Root path of Admin APIs. The default value is /nacos, and it can be changed with the nacos.server.contextPath configuration item.
  • module: Admin API module name, such as server, cs, ns, or core.
  • subPath: Admin API subpath, such as state, namespace, or config. It may contain multiple path levels.

The Admin APIs listed below use the default $nacos.server.contextPath. If the deployment changes $nacos.server.contextPath, update the request URL accordingly when calling the API.

The examples below also use the default Nacos Web Server port. If the deployment changes $nacos.server.main.port, update the request URL accordingly when calling the API.

0.3. Authentication

Nacos 3.X Admin APIs require authentication by default. When using the default auth plugin, use an administrator identity such as nacos.

To disable Admin API authentication, set nacos.core.auth.admin.enabled=false and restart Nacos Server.

0.4. Swagger Documentation

Nacos 3.X Admin APIs also provide Swagger-style documentation. You can view it at Nacos Swagger Admin API.

1. Nacos Core Admin APIs

1.1. Get Current Node Connections

Description

Use this API to get details about gRPC connections to the current Nacos Server node.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/loader/current

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
${connectionId}objectEach gRPC connection ID.
${connectionId}.abilityTableobjectCapability list supported by the gRPC connection, namely the client.
${connectionId}.metaInfo.clientIpstringSource IP of the gRPC connection.
${connectionId}.metaInfo.localPortintegergRPC port of this Nacos Server.
${connectionId}.metaInfo.versionstringVersion of the gRPC connection, namely the client.
${connectionId}.metaInfo.createTimestringCreation time of the gRPC connection.
${connectionId}.metaInfo.lastActiveTimeintegerLast heartbeat time of the gRPC connection.
${connectionId}.metaInfo.labels.sourcestringModule of the gRPC connection. Optional values are naming, config, and cluster, representing registry, configuration, and inter-cluster connections respectively.
${connectionId}.metaInfo.clusterSourcebooleanWhether the gRPC connection is an inter-cluster connection. When true, ${connectionId}.metaInfo.labels.source is cluster.
${connectionId}.metaInfo.sdkSourcebooleanWhether the gRPC connection comes from a client. When true, ${connectionId}.metaInfo.labels.source is naming or config.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/loader/current'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"1741687438640_127.0.0.1_58856": {
"abilityTable": {
"fuzzyWatch": true,
"lock": true
},
"appLabels": {
"AppName": "unknown",
"ClientVersion": "Nacos-Java-Client:v3.0.0-BETA"
},
"connected": true,
"labels": {
"AppName": "unknown",
"module": "naming",
"source": "sdk",
"tls.enable": "false"
},
"metaInfo": {
"appLabels": {
"AppName": "unknown",
"ClientVersion": "Nacos-Java-Client:v3.0.0-BETA"
},
"appName": "unknown",
"clientIp": "30.221.148.39",
"clusterSource": false,
"connectType": "GRPC",
"connectionId": "1741687438640_127.0.0.1_58856",
"createTime": "2025-03-11T10:03:58.731+00:00",
"labels": {
"AppName": "unknown",
"module": "naming",
"source": "sdk",
"tls.enable": "false"
},
"lastActiveTime": 1741745293704,
"localPort": 9848,
"namespaceId": null,
"remoteIp": "127.0.0.1",
"remotePort": 58856,
"sdkSource": true,
"tag": null,
"tlsProtected": false,
"version": "Nacos-Java-Client:v3.0.0-BETA"
},
"traced": false
}
}
}

1.2. Rebalance a Specified Number of Connections

Description

Use this API to select a specified number of gRPC connections on the current Nacos Server node, disconnect them, and migrate them to other Nacos Server nodes.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/loader/reloadCurrent

Request Parameters

NameTypeRequiredDescription
countintegerYesNumber of connections to rebalance.
redirectAddressstringNoExpected target Nacos Server for rebalancing. This is provided only as a client reference.

Response Data

Returns success if the operation succeeds. If it fails, the response follows the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/core/loader/reloadCurrent' -d "count=100"
  • Response example
success

1.3. Rebalance a Specified Connection

Description

Use this API to migrate a specified client connection (gRPC connection) to another Nacos Server node.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/loader/reloadClient

Request Parameters

NameTypeRequiredDescription
connectionIdstringYesID of the connection to rebalance.
redirectAddressstringNoExpected target Nacos Server for rebalancing.

Response Data

Returns success if the operation succeeds. If it fails, the response follows the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/core/loader/reloadClient' -d "connectionId=1709273546779_127.0.0.1_35042"
  • Response example

On success, returns:

{
"code": 0,
"message": "success",
"data": null
}

On failure, returns:

{
"code": 30000,
"message": "server error",
"data": null
}

1.4. Get Cluster Connection Overview

Description

Use this API to view the connection count overview of each node in the Nacos Server cluster.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/loader/cluster

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalintegerTotal number of connections on all nodes in the cluster.
minintegerMinimum connection count among all nodes in the cluster.
avgintegerAverage connection count across all nodes in the cluster.
maxintegerMaximum connection count among all nodes in the cluster.
memberCountintegerNumber of nodes in the cluster.
metricsCountintegerNumber of nodes whose overview metrics have been collected.
detailarrayOverview information of all nodes in the cluster. See the following fields.
detail[].addressstringNode address.
detail[].metric.loadnumberNode load rate, mainly corresponding to the node load metric. This is a reference value.
detail[].metric.sdkConCountintegerNumber of SDK connections to this node, mainly corresponding to client connections.
detail[].metric.conCountintegerTotal number of connections to this node, including SDK and inter-cluster connections.
detail[].metric.cpunumberNode CPU usage. This is a reference value.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/loader/cluster'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"avg": 1,
"completed": true,
"detail": [
{
"address": "127.0.0.1:8848",
"conCount": 1,
"cpu": "0.0",
"load": "2.3842773",
"sdkConCount": 1
}
],
"max": 1,
"memberCount": 1,
"metricsCount": 1,
"min": 1,
"threshold": "1.1",
"total": 1
}
}

1.5. Get Current Node Information

Description

Use this API to get detailed information about the current node in the Nacos Server cluster.

Since

3.0.0

Request Method

GET

Request URL

/nacos/v3/admin/core/cluster/node/self

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
ipstringNode IP address.
portintegerNode port.
statestringNode state: UP/DOWN/SUSPICIOUS
extendInfoobjectExtended node information. See the following fields.
extendInfo.lastRefreshTimeintegerLast update timestamp of the node, in milliseconds.
extendInfo.raftMetaDataobjectRaft metadata of the node, including fields such as leader and term for each Raft Group.
extendInfo.raftPortintegerRaft port of the node.
extendInfo.supportGrayModelbooleanWhether the gray model is supported.
extendInfo.versionstringNode version.
addressstringNode address in the ip:port format.
failAccessCntintegerNumber of probe failures and report failures. When the count exceeds a threshold, state changes to DOWN.
abilitiesobjectCapabilities supported by the node.
grpcReportEnabledbooleanIndicates whether the node supports reporting heartbeats through gRPC. This is used for compatibility during upgrades from earlier versions and will be removed later.
extendInfo.readyToUpgradebooleanWhether the node is ready to upgrade to Nacos 2.0. Deprecated since 2.2 and will be removed.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/cluster/node/self'
  • Response example
{
"code": 0,
"data": {
"abilities": {
"configAbility": {
"supportRemoteMetrics": false
},
"namingAbility": {
"supportJraft": true
},
"remoteAbility": {
"grpcReportEnabled": true,
"supportRemoteConnection": true
}
},
"address": "127.0.0.1:8848",
"extendInfo": {
"lastRefreshTime": 1741678398775,
"raftMetaData": {
"metaDataMap": {
"lock_acquire_service_v2": {
"leader": "127.0.0.1:7848",
"raftGroupMember": [
"127.0.0.1:7848"
],
"term": 109
},
"naming_instance_metadata": {
"leader": "127.0.0.1:7848",
"raftGroupMember": [
"127.0.0.1:7848"
],
"term": 391
},
"naming_persistent_service": {
"leader": "127.0.0.1:7848",
"raftGroupMember": [
"127.0.0.1:7848"
],
"term": 387
},
"naming_persistent_service_v2": {
"leader": "127.0.0.1:7848",
"raftGroupMember": [
"127.0.0.1:7848"
],
"term": 391
},
"naming_service_metadata": {
"leader": "127.0.0.1:7848",
"raftGroupMember": [
"127.0.0.1:7848"
],
"term": 391
}
}
},
"raftPort": "7848",
"readyToUpgrade": true,
"supportGrayModel": true,
"version": "3.0.0-BETA"
},
"failAccessCnt": 0,
"grpcReportEnabled": true,
"ip": "127.0.0.1",
"port": 8848,
"state": "UP"
},
"message": "success"
}

1.6. Get All Cluster Node Information

Description

Use this API to get detailed information about all nodes in the Nacos Server cluster.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/cluster/node/list

Request Parameters

NameTypeRequiredDescription
addressstringNoNode address. Filtering by address is supported.
statestringNoNode state: UP/DOWN/SUSPICIOUS

Response Data

The response body follows the Nacos open API unified response format. The data field is a list of the response data returned by Get Current Node Information.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/cluster/node/list'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"ip": "nacos-node-0",
"port": 8848,
"state": "UP",
"extendInfo": {
"lastRefreshTime": 1709273550501,
"raftMetaData": {
"metaDataMap": {
"naming_instance_metadata": {
"leader": "nacos-node-2:7848",
"raftGroupMember": [
"nacos-node-2:7848",
"nacos-node-1:7848",
"nacos-node-0:7848"
],
"term": 3
},
"naming_persistent_service": {
"leader": "nacos-node-1:7848",
"raftGroupMember": [
"nacos-node-2:7848",
"nacos-node-1:7848",
"nacos-node-0:7848"
],
"term": 3
},
"naming_persistent_service_v2": {
"leader": "nacos-node-2:7848",
"raftGroupMember": [
"nacos-node-2:7848",
"nacos-node-1:7848",
"nacos-node-0:7848"
],
"term": 2
},
"naming_service_metadata": {
"leader": "nacos-node-2:7848",
"raftGroupMember": [
"nacos-node-2:7848",
"nacos-node-1:7848",
"nacos-node-0:7848"
],
"term": 3
}
}
},
"raftPort": "7848",
"readyToUpgrade": true,
"supportGrayModel": true,
"version": "3.0.0-ALPHA"
},
"address": "nacos-node-0:8848",
"failAccessCnt": 0,
"abilities": {
"remoteAbility": {
"supportRemoteConnection": true,
"grpcReportEnabled": true
},
"configAbility": {
"supportRemoteMetrics": false
},
"namingAbility": {
"supportJraft": true
}
},
"grpcReportEnabled": true
},
{
"ip": "nacos-node-2",
"port": 8848,
"state": "UP",
"extendInfo": {
"lastRefreshTime": 1710813796567,
"raftMetaData": {
....
},
....
},
....
},
{
"ip": "nacos-node-1",
"port": 8848,
"state": "UP",
"extendInfo": {
"lastRefreshTime": 1710813796567,
"raftMetaData": {
....
},
....
},
....
}
]
}

1.7. Dynamically Change the Server Cluster Address Discovery Mode

Description

Use this API to dynamically switch the Nacos Server cluster address discovery mode without restarting Nacos Server. Currently supported modes include file and address-server.

Since

3.0.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/cluster/lookup

Request Parameters

NameTypeRequiredDescription
typestringYesaddress-server/file/standalone

Response Data

The response body follows the Nacos open API unified response format.

NameTypeDescription
databooleantrue indicates that the update succeeds, and false indicates that the update fails.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/core/cluster/lookup' -d "type=file"
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

1.8. Raft Operations

Description

Use this API to perform maintenance operations on the Raft protocol in the Nacos Server cluster, such as taking snapshots and transferring leadership.

Since

3.0.0

Request Method

POST

The request body type is application/json, and parameters are placed in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/ops/raft

Request Parameters

NameTypeRequiredDescription
commandstringYesRaft maintenance command. See the table below for supported commands.
valuestringYesCommand parameter. See the table below for the command content.
groupIdstringNoRaft cluster groupId. If not specified, the command applies to all Raft Groups.

Command descriptions (Swagger does not yet support this sub-parameter structure, so it is retained in the document):

  • doSnapshot: ${nacos-server-address}:${raft-port}
  • transferLeader: ${nacos-server-address}:${raft-port}
  • restRaftCluster: ${nacos-server-address}:${raft-port}[,${nacos-server-address}:${raft-port}]
  • removePeer: ${nacos-server-address}:${raft-port}
  • removePeers: ${nacos-server-address}:${raft-port}[,${nacos-server-address}:${raft-port}]
  • changePeers: ${nacos-server-address}:${raft-port}[,${nacos-server-address}:${raft-port}]

Response Data

The response body follows the Nacos open API unified response format.

NameTypeDescription
datastringFixed value: null.

Examples

  • Request example
Terminal window
curl -X POST -H 'Content-Type:application/json' 'http://127.0.0.1:8848/nacos/v3/admin/core/ops/raft' -d '{"command":"doSnapshot","value":"nacos-node-0:7848"}'
  • Response example
{
"code": 0,
"message": null,
"data": null
}

1.9. Dynamically Change Nacos Core Log Levels

Description

Use this API to dynamically change Nacos Core log level configuration without restarting Nacos Server.

Since

3.0.0

Request Method

PUT

The request body type is application/json, and parameters are placed in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/ops/log

Request Parameters

NameTypeRequiredDescription
logNamestringYesName of the specific log file. See the table below for supported log names.
logLevelstringYesLog level. Optional values: ALL, TRACE, DEBUG, INFO, WARN, ERROR, and OFF.
logNameCorresponding log file
core-authcore-auth.log
core-raftprotocol-raft.log
core-distroprotocol-distro.log
core-clusternacos-cluster.log

Response Data

The response body follows the Nacos open API unified response format.

NameTypeDescription
datastringFixed value: null.

Examples

  • Request example
Terminal window
curl -X PUT -H 'Content-Type:application/json' 'http://127.0.0.1:8848/nacos/v3/admin/core/ops/log' -d '{"logName":"core-distro","logLevel":"DEBUG"}'
  • Response example
{
"code": 0,
"message": "success",
"data": null
}

1.10. Automatically Rebalance a Specified Number of Connections

Description

Use this API to automatically rebalance client connections across the cluster based on the load factor (loaderFactor).

Automatic rebalancing logic:

  1. Calculate the average connection count avg, the lower node connection threshold lowLimitCount (= avg * (1 - loaderFactor)), and the upper node connection threshold overLimitCount (= avg * (1 + loaderFactor)) based on the total number of client connections and the number of Nacos Server nodes in the cluster.
  2. Redirect some client connections from high-load nodes to low-load nodes.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/loader/smartReloadCluster

Request Parameters

NameTypeRequiredDescription
loaderFactornumberNo-

Response Data

On success, returns:

{
"code": 0,
"message": "success",
"data": null
}

On failure, returns:

{
"code": 30000,
"message": "server error",
"data": null
}

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/core/loader/smartReloadCluster' -d "loaderFactor=0.1"
  • Response example
success

1.11. Get ID Generator Information

Description

Use this API to get the current ID and worker ID of the ID generator. This API returns valid data only when the embedded database is used.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/ops/ids

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format.

NameTypeDescription
resourcestringGenerator name.
infoobjectGenerator details.
info.currentIdintegerCurrent ID.
info.workerIdintegerworkerID

On success, returns:

{
"code": 0,
"message": "success",
"data": [
{
"resource": "resourceName",
"info": {
"currentId": 1,
"workerId": 2
}
}
]
}

On failure, returns:

{
"code": 30000,
"message": "server error",
"data": null
}

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/ops/ids'
  • Response example
success

1.12. Update Cluster Node Information

Description

Use this API to update detailed information in the Nacos node list of the current node. Note: This API overwrites the detailed information in the list on the current node. It only updates nodes that are both passed in and already exist in the cluster, and it cannot add or remove nodes from the cluster. In addition, the Nacos health probe report task also checks node health and updates node details in the list on the current node. If the probe task detects node information changes after this API is called, the task also overwrites the node information in the list on the current node.

Since

3.0.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/cluster/node/list

Request Parameters

The request body is a JSON array. Each array element is node information (Member), including fields such as ip, port, state, and extendInfo.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
databooleanWhether the update succeeds.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/core/cluster/node/list' \
-H 'Content-Type: application/json' \
-d '[{"ip":"127.0.0.1","port":8848,"state":"UP","address":"127.0.0.1:8848"}]'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

1.13. Get Namespace Details

Description

Use this API to get details of a specified namespace.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace

Request Parameters

NameTypeRequiredDescription
namespaceIdstringYesNamespace ID.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
namespacestringNamespace ID.
namespaceShowNamestringNamespace display name.
namespaceDescstringNamespace description.
quotaintegerConfig quantity quota.
configCountintegerCurrent config count.
typeintegerType

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace?namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"namespace": "public",
"namespaceShowName": "public",
"namespaceDesc": "Default Namespace",
"quota": 200,
"configCount": 0,
"type": 0
}
}

1.14. Update Namespace

Description

Use this API to update namespace information. The namespace ID cannot be updated; only the namespace name and description can be updated.

Since

3.0.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace

Request Parameters

NameTypeRequiredDescription
namespaceIdstringYesNamespace ID.
namespaceNamestringYesNamespace display name.
namespaceDescstringNoNamespace description.

Response Data

On success, a unified response body is returned and data is true. On failure, the response follows the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace' \
-d 'namespaceId=test' -d 'namespaceName=test' -d 'namespaceDesc=test'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

1.15. Create Namespace

Description

Use this API to create a namespace.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. If not specified, the server generates one.
namespaceNamestringYesNamespace display name.
namespaceDescstringNoNamespace description.

Response Data

On success, a unified response body is returned and data is true. On failure, the response follows the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace' \
-d 'namespaceName=test' -d 'namespaceDesc=test'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

1.16. Delete Namespace

Description

Use this API to delete a namespace. The default namespace public cannot be deleted.

Since

3.0.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace

Request Parameters

NameTypeRequiredDescription
namespaceIdstringYesNamespace ID.

Response Data

On success, a unified response body is returned and data is true. On failure, the response follows the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace?namespaceId=test'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

1.17. Check Whether a Namespace Exists

Description

Use this API to check whether a namespace ID exists. Call this API before creating a namespace to confirm whether a custom namespace ID already exists and avoid conflicts.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace/check

Request Parameters

NameTypeRequiredDescription
namespaceIdstringYes-

Response Data

The response body follows the Nacos open API unified response format. data is true if the namespace exists and false if it does not.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace/check?namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": false
}

1.18. Get Nacos Namespace List

Description

Use this API to get the namespace list of the current Nacos cluster.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/namespace/list

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field. data is an array of namespace objects. Each item contains fields such as namespace, namespaceShowName, namespaceDesc, quota, configCount, and type.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/namespace/list'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"namespace": "public",
"namespaceShowName": "public",
"namespaceDesc": "Default Namespace",
"quota": 200,
"configCount": 0,
"type": 0
}
]
}

1.19. Get Nacos Cluster Status Information

Description

Use this API to get basic status and switch information of the Nacos cluster, such as the version, running mode, and whether authentication is enabled. This API does not return node information of the Nacos cluster.

Since

3.0.0

Request Method

GET

Authorization

Public API. No identity information is required.

Request URL

/nacos/v3/admin/core/state

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. data is a key-value map containing cluster status and configuration items such as version (version), running mode (startup_mode), and authentication switch (auth_enabled).

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/state'
  • Response example
{
"defaultMaxSize": "102400",
"auth_system_type": "nacos",
"auth_enabled": "false",
"version": "3.0.0-SNAPSHOT",
"startup_mode": "standalone",
"server_port": "8848"
}

1.20. Get Nacos Cluster Liveness Status

Description

Use this API to get the liveness status of the Nacos cluster, indicating whether the Nacos cluster can normally accept and respond to requests.

Since

3.0.0

Request Method

GET

Authorization

Public API. No identity information is required.

Request URL

/nacos/v3/admin/core/state/liveness

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringLiveness status, such as “ok”.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/state/liveness'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

1.21. Get Nacos Cluster Readiness Status

Description

Use this API to get whether the Nacos cluster is in a readable state, indicating whether the Nacos cluster can read data.

Since

3.0.0

Request Method

GET

Authorization

Public API. No identity information is required.

Request URL

/nacos/v3/admin/core/state/readiness

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringReadiness status, such as “ok”.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/state/readiness'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

1.22. Update Plugin Configuration

Description

Use this API to update plugin configuration. Provide the plugin type, name, and configuration content. localOnly is supported to apply the change only to the current node.

Since

3.2.0

Request Method

PUT

The request body type is application/json.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/plugin/config

Request Parameters

The request body is JSON and contains the following fields:

NameTypeRequiredDescription
pluginTypestringYesPlugin type, such as auth.
pluginNamestringYesPlugin name.
configstringYesPlugin configuration item.
localOnlybooleanNoWhether to write only locally without persistence.

Response Data

The response body follows the Nacos open API unified response format. data is a string indicating the operation result.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/core/plugin/config' \
-H 'Content-Type: application/json' -d '{}'
  • Response example
{
"code": 0,
"message": "success",
"data": "Plugin configuration updated successfully"
}

1.23. Get Plugin Details

Description

Use this API to get details of a specified plugin by type and name.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/plugin/detail

Request Parameters

NameTypeRequiredDescription
pluginTypestringYesPlugin type, such as auth.
pluginNamestringYesPlugin name.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
pluginIdstringPlugin ID.
pluginTypestringPlugin type.
pluginNamestringPlugin name.
enabledbooleanWhether the plugin is enabled.
criticalbooleanWhether the plugin is critical.
configurablebooleanWhether the plugin is configurable.
configobjectConfiguration content.
configDefinitionsarrayConfiguration definition list.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/plugin/detail?pluginType=auth&pluginName=nacos-default-auth-plugin'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"pluginId": "auth:nacos-default-auth-plugin",
"pluginType": "auth",
"pluginName": "nacos-default-auth-plugin",
"enabled": true,
"critical": true,
"configurable": true,
"config": {},
"configDefinitions": []
}
}

1.24. Get Plugin List

Description

Use this API to get all plugins. Filtering by plugin type is supported.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/plugin/list

Request Parameters

NameTypeRequiredDescription
pluginTypestringNoPlugin type. If not specified, all plugins are returned.

Response Data

The response body follows the Nacos open API unified response format. data is an array of plugin objects.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/core/plugin/list?pluginType=auth'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"pluginId": "auth:nacos-default-auth-plugin",
"pluginType": "auth",
"pluginName": "nacos-default-auth-plugin",
"enabled": true,
"critical": true,
"configurable": true,
"exclusive": true
}
]
}

1.25. Enable or Disable a Plugin

Description

Use this API to update the plugin status (enabled or disabled). localOnly is supported to apply the change only to the current node.

Since

3.2.0

Request Method

PUT

The request body type is application/json.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/core/plugin/status

Request Parameters

The request body is JSON and contains the following fields:

NameTypeRequiredDescription
pluginTypestringYesPlugin type.
pluginNamestringYesPlugin name.
enabledbooleanYesWhether to enable the plugin.
localOnlybooleanNoWhether to write only locally.

Response Data

The response body follows the Nacos open API unified response format. data is a string indicating the operation result.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/core/plugin/status' \
-H 'Content-Type: application/json' -d '{}'
  • Response example
{
"code": 0,
"message": "success",
"data": "Plugin status updated successfully"
}

2. Nacos Naming Admin APIs

2.1. View Naming Module Switches

Description

Use this API to view switches related to the Nacos Naming module.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ns/ops/switches

Request Parameters

None

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
clientBeatIntervalintegerDefault heartbeat interval of Nacos 1.x clients
defaultCacheMillisintegerDefault cache time of service lists subscribed by clients
pushCacheMillisintegerDefault cache time of pushed service lists. This has higher priority than defaultCacheMillis.
distroEnabledbooleanWhether Distro protocol synchronization is enabled. Temporarily set this to false only when excessive cluster pressure affects cluster stability. Setting it to false may cause some data inconsistency, so restore it as soon as possible.
healthCheckEnabledbooleanWhether health checks are enabled. Temporarily set this to false only when excessive cluster pressure affects cluster stability. After it is set to false, instance health status is not changed because of heartbeat expiration or TCP/HTTP probe timeout, and instances are not deleted because of expiration. Restore it as soon as possible.
lightBeatEnabledbooleanWhether lightweight heartbeat is enabled. This applies to Nacos 1.2.X~1.4.X clients. After it is set to false, Nacos 1.2.X~1.4.X clients use full heartbeat for renewal.
pushEnabledbooleanWhether push is enabled. Temporarily set this to false only when excessive cluster pressure affects cluster stability. After it is set to false, Nacos clients no longer receive active server pushes.
push${Language}VersionstringMinimum client version that supports push. Change this value if you do not want to push data to clients earlier than a specific version. For example, if pushJavaVersion is set to 2.0.0, Java clients earlier than 2.0.0 do not receive pushed data.
${type}HealthParamsobjectHealth check parameters, including the maximum and minimum check intervals and random interval factor. These values are used to spread the next round of health check traffic.

Note: Other parameters that are not listed are switches or configuration items from earlier Nacos versions. They are deprecated or will be deprecated soon. Use them with caution.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/ops/switches'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"adWeightMap": {},
"autoChangeHealthCheckEnabled": true,
"checkTimes": 3,
"checksum": null,
"clientBeatInterval": 5000,
"defaultCacheMillis": 3000,
"defaultInstanceEphemeral": true,
"defaultPushCacheMillis": 10000,
"disableAddIP": false,
"distroEnabled": true,
"distroServerExpiredMillis": 10000,
"distroThreshold": 0.7,
"enableAuthentication": false,
"enableStandalone": true,
"healthCheckEnabled": true,
"healthCheckWhiteList": [],
"httpHealthParams": {
"factor": 0.85,
"max": 5000,
"min": 500
},
"incrementalList": [],
"lightBeatEnabled": true,
"limitedUrlMap": {},
"masters": null,
"mysqlHealthParams": {
"factor": 0.65,
"max": 3000,
"min": 2000
},
"name": "00-00---000-NACOS_SWITCH_DOMAIN-000---00-00",
"overriddenServerStatus": null,
"pushCSharpVersion": "0.9.0",
"pushCVersion": "1.0.12",
"pushEnabled": true,
"pushGoVersion": "0.1.0",
"pushJavaVersion": "0.1.0",
"pushPythonVersion": "0.4.3",
"sendBeatOnly": false,
"serverStatusSynchronizationPeriodMillis": 2000,
"serviceStatusSynchronizationPeriodMillis": 5000,
"tcpHealthParams": {
"factor": 0.75,
"max": 5000,
"min": 1000
}
}
}

2.2. Modify Naming Module Switches

Description

Use this API to modify switches related to the Nacos Naming module.

Since

3.0.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ns/ops/switches

Request Parameters

NameTypeRequiredDescription
entrystringYesName of the switch or configuration to modify
valuestringYesNew value of the switch or configuration. Different switches or configurations have different types. See Switch and Configuration Parameters.
debugbooleanNoWhether debug mode is enabled. When enabled, the modified configuration is not synchronized to other cluster nodes and takes effect only on the current node. Defaults to false.

Response Data

NameTypeDescription
datastringReturns ok on success.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/ops/switches' -d "entry=pushEnabled&value=false"
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.3. Query Current System Metrics

Description

Use this API to query current system metrics.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ns/ops/metrics

Request Parameters

NameTypeRequiredDefaultDescription
onlyStatusbooleanNotrueShow only status.

When onlyStatus is set to true, only the string that indicates the system status is returned.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
statusstringSystem status
serviceCountintegerNumber of services
instanceCountintegerNumber of instances
subscribeCountintegerNumber of subscriptions
clientCountintegerNumber of clients
connectionBasedClientCountintegerNumber of connections
ephemeralIpPortClientCountintegerNumber of ephemeral clients
persistentIpPortClientCountintegerNumber of persistent clients
responsibleClientCountintegerNumber of responsible clients

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/ops/metrics?onlyStatus=false'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"clientCount": 3,
"connectionBasedClientCount": 1,
"ephemeralIpPortClientCount": 0,
"instanceCount": 2,
"persistentIpPortClientCount": 2,
"responsibleClientCount": 3,
"serviceCount": 2,
"status": "UP",
"subscribeCount": 1
}
}

2.4. Modify Log Level

Description

Use this API to dynamically modify the level of a specified log.

Since

3.0.0

Request Method

PUT

The request body type is application/json.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ns/ops/log

Request Parameters

NameTypeRequiredDescription

Request body fields:

NameTypeRequiredDescription
logNamestringYesName of the log to modify.
logLevelstringYesNew log level.

Response Data

NameTypeDescription
datastringReturns ok on success.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/ops/log' -H 'Content-Type: application/json' -d '{"logName":"com.example.Logger","logLevel":"DEBUG"}'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.5. Query All Clients

Description

Query the list of all clients.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client/list

Request Parameters

None

Response Data

NameTypeDescription
dataarrayClient ID list.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/list'
{
"code": 0,
"message": "success",
"data": [
"127.0.0.1:8080#false",
"1741748952410_127.0.0.1_53863",
"1.1.1.1:3306#false"
]
}

2.6. Query Client Details

Description

Query client details by client ID.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client

Request Parameters

NameTypeRequiredDescription
clientIdstringYesClient ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
clientIdstringUnique client ID.
ephemeralbooleanWhether the client is ephemeral
lastUpdatedTimeintegerLast client update time as a timestamp
clientTypestringClient type
connectTypestringConnection type. This applies only to 2.x clients.
appNamestringApplication name to which the client belongs
versionstringClient version
clientIpstringClient IP address
clientPortstringClient port

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client?clientId=1741748952410_127.0.0.1_53863'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"appName": "unknown",
"clientId": "1741748952410_127.0.0.1_53863",
"clientIp": "127.0.0.1",
"clientPort": 53863,
"clientType": "connection",
"connectType": "GRPC",
"ephemeral": true,
"lastUpdatedTime": 1741748954789,
"version": "Nacos-Java-Client:v3.0.0-BETA"
}
}

For a persistent instance, the response is as follows:

{
"code": 0,
"message": "success",
"data": {
"appName": null,
"clientId": "1.1.1.1:3306#false",
"clientIp": null,
"clientPort": 0,
"clientType": "ipPort",
"connectType": null,
"ephemeral": false,
"lastUpdatedTime": 1741748950046,
"version": null
}
}

2.7. Query Services Registered by a Client

Description

Query the list of services registered by a specified client.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client/publish/list

Request Parameters

NameTypeRequiredDescription
clientIdstringYesClient ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
namespaceIdstringNamespace
groupNamestringGroup name
serviceNamestringService name
publisherInfoobjectInstances registered under this service
publisherInfo.ipstringIPAddress
publisherInfo.portintegerPort number
publisherInfo.clusterNamestringCluster name

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/publish/list?clientId=1664527081276_127.0.0.1_4400'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"groupName": "DEFAULT_GROUP",
"namespaceId": "public",
"publisherInfo": {
"clientId": null,
"clusterName": "DEFAULT",
"ip": "1.1.1.1",
"port": 3306
},
"serviceName": "test",
"subscriberInfo": null
}
]
}

2.8. Query Services Subscribed by a Client

Description

Query the list of services subscribed by a specified client.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client/subscribe/list

Request Parameters

NameTypeRequiredDescription
clientIdstringYesClient ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
namespaceIdstringNamespace
groupNamestringGroup name
serviceNamestringService name
subscriberInfoobjectSubscription information
subscriberInfo.appNamestringApplication
subscriberInfo.agentstringClient information
subscriberInfo.addressstringAddress

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/subscribe/list?clientId=1664527081276_127.0.0.1_4400'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"groupName": "DEFAULT_GROUP",
"namespaceId": "public",
"publisherInfo": null,
"serviceName": "com.test.SyncCallbackService",
"subscriberInfo": {
"address": "127.0.0.1",
"agent": "Nacos-Java-Client:v3.0.0-BETA",
"appName": "unknown",
"clientId": null
}
}
]
}

2.9. Query Clients That Register a Specified Service

Description

Query the list of clients that register a specified service.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client/service/publisher/list

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNo"public"Namespace ID.
groupNamestringNo"DEFAULT_GROUP"Group name.
serviceNamestringYesNoneService name.
ipstringNoNoneInstance IP.
portintegerNoNoneInstance port.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
clientIdstringClient ID
ipstringInstance IP
portintegerInstance port
clusterNamestringInstance cluster name

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/service/publisher/list?serviceName=test'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"clientId": "1.1.1.1:3306#false",
"clusterName": "DEFAULT",
"ip": "1.1.1.1",
"port": 3306
}
]
}

2.10. Query Clients That Subscribe to a Specified Service

Description

Query the list of clients that subscribe to a specified service.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/client/service/subscriber/list

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNo"public"Namespace ID.
groupNamestringNo"DEFAULT_GROUP"Group name.
serviceNamestringYesNoneService name.
ipstringNoNoneSubscriber IP.
portintegerNoNoneSubscriber port.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
clientIdstringClient ID
addressstringSubscriber client IP
agentstringSubscriber client version
appNamestringApplication name of the subscriber client. unknown means it is not configured or not supported by the client.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/service/subscriber/list?serviceName=service1'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"address": "127.0.0.1",
"agent": "Nacos-Java-Client:v3.0.0-BETA",
"appName": "unknown",
"clientId": "1741748952410_127.0.0.1_53863"
}
]
}

2.11. Query the Responsible Server for a Client

Description

Query the responsible server by client IP and port. This applies only to persistent service instances or ephemeral instances registered through Admin APIs. Ephemeral instances registered by clients later than 2.x cannot use this API to locate the responsible server node.

This API also applies to instances registered by 1.x clients, but 1.x clients will no longer be supported in future versions.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ns/client/distro

Request Parameters

NameTypeRequiredDescription
ipstringYesClient IP
portintegerYesClient port.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
responsibleServerstringResponsible server information

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/client/distro?ip=127.0.0.1&port=8080'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"responsibleServer": "127.0.0.1:8848"
}
}

2.12. Update Cluster Information

Description

Update metadata information of a specified cluster.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/cluster

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID
serviceNamestringYesService name
clusterNamestringYesCluster name
checkPortintegerNoHealth check port
useInstancePort4CheckbooleanNoWhether to use the instance port for health checks
healthCheckerstringNoHealth checker configuration as a JSON string
metadatastringNoExtended cluster metadata. Defaults to "".
groupNamestringNo-

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/cluster' -d 'serviceName=test&clusterName=DEFAULT&checkPort=80&useInstancePort4Check=true&healthChecker={"type":"none"}'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.13. Update Instance Health Status

Description

Update the health status of a specified instance.

This is valid only for instances of persistent services whose health check mode is NONE. The health status of an ephemeral instance is maintained by its connection (client). For persistent services that use other health check types, the health check task automatically maintains health status. Even if the update succeeds, it is soon reset by the health check task.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/health/instance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
clusterNamestringNoCluster name. Defaults to DEFAULT.
ipstringYesInstance IP
portintegerYesInstance port
healthybooleanYesHealth status. true means healthy.

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/health/instance' -d 'namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&clusterName=cluster1&ip=127.0.0.1&port=8080&healthy=true'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.14. Get All Health Checkers

Description

Get all health checker types supported by the system and their configurations.

Since

3.0.0

Request Method

GET

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/health/checkers

Request Parameters

None

Response Data

NameTypeDescription
dataMap<String, AbstractHealthChecker>Health checker type and configuration

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/health/checkers'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"HTTP": {
"expectedResponseCode": 200,
"headers": "",
"path": ""
},
"MYSQL": {
"cmd": null,
"pwd": null,
"user": null
},
"NONE": {},
"TCP": {}
}
}

2.15. Register Instance

Description

Register a new instance to a specified service.

Since

3.0.0

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
clusterNamestringNoCluster name. Defaults to DEFAULT.
ipstringYesInstance IP
portintegerYesInstance port
weightnumberNoInstance weight. Defaults to 1.0.
healthybooleanNoHealth status. Defaults to true.
enabledbooleanNoWhether the instance is enabled. Defaults to true.
metadatastringNoInstance metadata
ephemeralbooleanNoWhether this is an ephemeral instance

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance' \
-d 'namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&clusterName=cluster1&ip=127.0.0.1&port=8080&weight=1.0&healthy=true&enabled=true&metadata={"key1=value1"}&ephemeral=true'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.16. Deregister Instance

Description

Deregister an instance from a specified service.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
clusterNamestringNoCluster name. Defaults to DEFAULT.
ipstringYesInstance IP
portintegerYesInstance port

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance?namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&clusterName=cluster1&ip=127.0.0.1&port=8080&ephemeral=true'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.17. Update Instance

Description

Update information of a specified instance.

Metadata updated through this API has higher priority than metadata submitted during instance registration and is remembered for a period of time after the corresponding instance is deleted. If the instance is registered again during this period, the updated metadata remains effective. You can adjust the retention time through nacos.naming.clean.expired-metadata.expired-time and nacos.naming.clean.expired-metadata.interval.

For example, the metadata submitted during instance registration is k1=v1. If this API updates the metadata to k1=v2, the metadata read at this time is k1=v2. If the instance is deregistered and quickly registered again, the metadata is still k1=v2 instead of k1=v1. If the instance is registered again after expired-metadata.expired-time, the metadata is k1=v1.

This API completely overwrites previously updated metadata. For example, if metadata is updated with k1=v1 and then updated with k2=v2, the metadata read at this time is k2=v2 instead of k1=v1,k2=v2.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
clusterNamestringNoCluster name. Defaults to DEFAULT.
ipstringYesInstance IP
portintegerYesInstance port
weightnumberNoInstance weight. Defaults to 1.0.
healthybooleanNoHealth status. Defaults to true.
enabledbooleanNoWhether the instance is enabled. Defaults to true.
metadatastringNoInstance metadata
ephemeralbooleanNoWhether this is an ephemeral instance

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance' \
-d 'serviceName=test&clusterName=DEFAULT&groupName=DEFAULT_GROUP&ip=1.1.1.1&port=3306&ephemeral=true&weight=100&enabled=false&metadata=%7B%22%E5%95%A6%E5%95%A6%E5%95%A6%26%E5%95%B5%E5%95%B5%E5%95%B5%22%3A%22xxx%22%7D'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.18. Batch Update Instance Metadata

Description

Batch update metadata of specified instances.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance/metadata/batch

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
instancesstringNoInstance list as a JSON array string. The default value "" means all instances are updated. If specified, each element represents an instance to update and must contain ip and port; clusterName is optional.
metadatastringYesMetadata
consistencyTypestringNoConsistency type, ephemeral or persist, corresponding to the service ephemeral attribute. Defaults to ephemeral.

Response Data

NameTypeDescription
updatedarrayUpdated instance list.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance/metadata/batch' \
-d 'namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&instances=[{"ip":"127.0.0.1","port":8080}]&metadata={"key1":"value1"}&consistencyType=ephemeral'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"updated": [
"127.0.0.1:8080:unknown:DEFAULT:ephemeral"
]
}
}

2.19. Batch Delete Instance Metadata

Description

Batch delete metadata of specified instances.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance/metadata/batch

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
instancesstringNoInstance list as a JSON string. Defaults to "".
metadatastringYesMetadata
consistencyTypestringNoConsistency type. Defaults to "".

Response Data

NameTypeDescription
dataInstanceMetadataBatchOperationVoOperation result information
data.updatedarrayUpdated instance list.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance/metadata/batch?namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&instances=%5B%7B%22ip%22%3A%22127.0.0.1%22%2C%22port%22%3A8080%7D%5D&metadata=%7B%22key1%22%3A%22value1%22%7D&consistencyType=ephemeral'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"updated": [
"127.0.0.1:8080:unknown:DEFAULT:ephemeral"
]
}
}

2.20. Partially Update Instance

Description

Partially update information of a specified instance.

Unlike Update Instance, this API supports partial updates to instance information. For example, if metadata is updated with k1=v1 and then updated with k2=v2, the metadata read at this time is k1=v1,k2=v2.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance/partial

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
ipstringYesInstance IP
portintegerYesInstance port
clusterNamestringNoCluster name. Defaults to DEFAULT.
weightnumberNoInstance weight. Defaults to 1.0.
enabledbooleanNoWhether the instance is enabled. Enabled by default.
metadatastringNoInstance metadata as a JSON string
ephemeralbooleanNo-
groupNamestringNo-
healthybooleanNo-

Response Data

NameTypeDescription
datastringOperation result information

Examples

  • Request example
Terminal window
curl -X PUT "http://127.0.0.1:8848/nacos/v3/admin/ns/instance/partial" -d 'namespaceId=public&serviceName=example-service&ip=127.0.0.1&clusterName=DEFAULT&port=8080&weight=1.0&enabled=true&metadata={"key":"value"}'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

2.21. Query Service Instance List

Description

Query all instances of a specified service.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance/list

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name
clusterNamestringNoCluster name. If not provided, instances of all clusters will be returned.
healthyOnlybooleanNoWhether to return only healthy instances. Defaults to false.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
serviceNamestringService name in the groupName@@serviceName format
clusterNamestringCluster name of the instance
ipstringInstance IP
portintegerInstance port
weightnumberInstance weight
healthybooleanWhether the instance is healthy
enabledbooleanWhether the instance is enabled
ephemeralbooleanWhether this is an ephemeral instance
metadatamap<string, string>Instance metadata.
instanceIdstringInstance ID

The heartbeat parameters instanceHeartBeatInterval, instanceHeartBeatTimeOut, and ipDeleteTimeout are used to maintain compatibility with the heartbeat mode of 1.x clients. Support for 1.x clients may be removed in later versions, and these three parameters will then be deprecated.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance/list?namespaceId=public&serviceName=service1&healthyOnly=true'
  • Response example
{
"code": 0,
"data": [
{
"clusterName": "DEFAULT",
"enabled": true,
"ephemeral": false,
"healthy": false,
"instanceHeartBeatInterval": 5000,
"instanceHeartBeatTimeOut": 15000,
"instanceId": "1.1.1.1#3306#DEFAULT#DEFAULT_GROUP@@service1",
"ip": "1.1.1.1",
"ipDeleteTimeout": 30000,
"metadata": {
"key": "value"
},
"port": 3306,
"serviceName": "DEFAULT_GROUP@@service1",
"weight": 1.0
}
],
"message": "success"
}

2.22. Query Instance Details

Description

Query details of a specified instance.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/instance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name
clusterNamestringNoCluster name. Defaults to DEFAULT.
ipstringYesIPAddress
portintegerYesPort number

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
serviceNamestringService name in the groupName@@serviceName format
clusterNamestringCluster name of the instance
ipstringInstance IP
portintegerInstance port
weightnumberInstance weight
healthybooleanWhether the instance is healthy
enabledbooleanWhether the instance is enabled
ephemeralbooleanWhether this is an ephemeral instance
metadatamap<string, string>Instance metadata.
instanceIdstringInstance ID

The heartbeat parameters instanceHeartBeatInterval, instanceHeartBeatTimeOut, and ipDeleteTimeout are used to maintain compatibility with the heartbeat mode of 1.x clients. Support for 1.x clients may be removed in later versions, and these three parameters will then be deprecated.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/instance?namespaceId=public&serviceName=service1&ip=1.1.1.1&port=3306'
  • Response example
{
"code": 0,
"data": [
{
"clusterName": "DEFAULT",
"enabled": true,
"ephemeral": false,
"healthy": false,
"instanceHeartBeatInterval": 5000,
"instanceHeartBeatTimeOut": 15000,
"instanceId": "1.1.1.1#3306#DEFAULT#DEFAULT_GROUP@@service1",
"ip": "1.1.1.1",
"ipDeleteTimeout": 30000,
"metadata": {
"key": "value"
},
"port": 3306,
"serviceName": "DEFAULT_GROUP@@service1",
"weight": 1.0
}
],
"message": "success"
}

2.23. Create Service

Description

Create a new persistent service.

Since

3.0.0

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name
metadatastringNoService metadata. Defaults to empty.
ephemeralbooleanNoWhether this is an ephemeral instance. Defaults to false.
protectThresholdnumberNoProtection threshold. Defaults to 0.
selectorstringNoAccess policy. Defaults to empty.

Response Data

NameTypeDescription
databooleanWhether execution succeeds

Examples

  • Request example
Terminal window
curl -d 'serviceName=nacos.test.1' \
-d 'ephemeral=true' \
-d 'metadata={"k1":"v1"}' \
-X POST 'http://127.0.0.1:8848/nacos/v3/admin/ns/service'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

2.24. Delete Service

Description

Delete a specified service.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name

Response Data

NameTypeDescription
databooleanWhether execution succeeds

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ns/service?serviceName=nacos.test.1'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

2.25. Query Service Details

Description

Query details of a specified service.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
namespaceIdstringNamespace ID to which the service belongs.
groupNamestringGroup name to which the service belongs.
serviceNamestringService name.
ephemeralbooleanPersistence attribute of the service. true means ephemeral service, and false means persistent service.
protectThresholdnumberService protection threshold.
selectorobjectService selector.
metadataobjectService metadata.
clusterMapobjectService cluster map. The key is the cluster name and the value is the cluster details.
clusterMap.$ClusterName.clusterNamestringCluster name.
clusterMap.$ClusterName.healthCheckerobjectHealth checker.
clusterMap.$ClusterName.healthyCheckPortintegerHealth check port.
clusterMap.$ClusterName.useInstancePortForCheckbooleanWhether to use the registered instance IP:Port for health checks.
clusterMap.$ClusterName.metadatamap<string, string>Cluster metadata.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/service?serviceName=nacos.test.1'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"clusterMap": {
"DEFAULT": {
"clusterName": "DEFAULT",
"healthChecker": {
"type": "NONE"
},
"healthyCheckPort": 80,
"hosts": null,
"metadata": {},
"useInstancePortForCheck": true
}
},
"ephemeral": false,
"groupName": "DEFAULT_GROUP",
"metadata": {},
"namespaceId": "public",
"protectThreshold": 0.0,
"selector": {
"contextType": "NONE",
"type": "none"
},
"serviceName": "test"
}
}

2.26. Query Service List

Description

Query all services. Pagination and conditional filtering are supported.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service/list

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
pageNointegerYesCurrent page. Defaults to 1.
pageSizeintegerYesPage size. Defaults to 20; maximum value is 500.
groupNameParamstringNo-
ignoreEmptyServicebooleanNo-
serviceNameParamstringNo-
withInstancesbooleanNo-

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of services that match the criteria.
pageNumberintegerCurrent page number, starting from 1.
pagesAvailableintegerAvailable pages.
pageItemsarrayService list.
pageItems[i].namestringService name.
pageItems[i].groupNamestringGroup name of the service.
pageItems[i].clusterCountstringNumber of clusters under the service.
pageItems[i].ipCountstringNumber of instances under the service.
pageItems[i].healthyInstanceCountstringNumber of healthy instances under the service.
pageItems[i].triggerFlagstringWhether service protection is triggered.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/service/list'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"pageItems": [
{
"clusterCount": 1,
"groupName": "DEFAULT_GROUP",
"healthyInstanceCount": 1,
"ipCount": 1,
"name": "com.test.SyncCallbackService",
"triggerFlag": "false"
},
{
"clusterCount": 1,
"groupName": "DEFAULT_GROUP",
"healthyInstanceCount": 0,
"ipCount": 1,
"name": "test",
"triggerFlag": "true"
}
],
"pageNumber": 1,
"pagesAvailable": 1,
"totalCount": 2
}
}

2.27. Update Service

Description

Update configuration information of a specified service.

This API completely overwrites previously updated metadata. For example, if metadata is updated with k1=v1 and then updated with k2=v2, the metadata read at this time is k2=v2 instead of k1=v1,k2=v2.

Since

3.0.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
serviceNamestringYesService name
metadatastringNoService metadata. Defaults to empty.
protectThresholdnumberNoProtection threshold. Defaults to 0.
selectorstringNoAccess policy. Defaults to empty.
ephemeralbooleanNo-

Response Data

NameTypeDescription
databooleanWhether execution succeeds

Examples

  • Request example
Terminal window
curl -d 'serviceName=nacos.test.1' \
-d 'metadata={"k1":"v2"}' \
-X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ns/service'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

2.28. Query Subscriber List

Description

Query subscribers of a specified service.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service/subscribers

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
serviceNamestringYesService name
groupNamestringNoGroup name. Defaults to DEFAULT_GROUP.
pageNointegerYesPage number
pageSizeintegerYesPage size
aggregationbooleanNoWhether to aggregate. Defaults to true.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of services that match the criteria.
pageNumberintegerCurrent page number, starting from 1.
pagesAvailableintegerAvailable pages.
pageItemsarrayService list.
pageItems[i].ipstringSubscriber IP.
pageItems[i].portintegerSubscriber port.
pageItems[i].addressstringSubscriber address, usually in ip:port format.
pageItems[i].agentstringSubscriber client version.
pageItems[i].appNamestringApplication to which the subscriber belongs.
pageItems[i].namespaceIdstringNamespace to which the subscriber belongs.
pageItems[i].groupNamestringSubscribed group name.
pageItems[i].serviceNamestringSubscribed service name.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/service/subscribers?namespaceId=public&serviceName=service1&groupName=DEFAULT_GROUP&pageNo=1&pageSize=10'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"pageItems": [
{
"address": "127.0.0.1:0",
"agent": "Nacos-Java-Client:v3.0.0-BETA",
"appName": "unknown",
"groupName": "DEFAULT_GROUP",
"ip": "127.0.0.1",
"namespaceId": "public",
"port": 0,
"serviceName": "service1"
}
],
"pageNumber": 1,
"pagesAvailable": 1,
"totalCount": 1
}
}

2.29. Query Selector Types

Description

Query all selector types supported by the system.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ns/service/selector/types

Request Parameters

None

Response Data

NameTypeDescription
dataarraySelector type list.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ns/service/selector/types'
  • Response example
{
"code": 0,
"message": "success",
"data": [
"none",
"label"
]
}

3. Nacos Config Admin APIs

3.1. Get Config

Description

Get a specified config.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
groupNamestringYesNoneConfig group name
dataIdstringYesNoneConfig name

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idstringID of the config in the storage system. It is usually a string of the Long type.
dataIdstringConfig ID.
groupNamestringConfig group.
namespaceIdstringNamespace ID.
contentstringConfig content.
descstringConfig description.
md5stringMD5 value of the config content.
configTagsstringConfig tags.
encryptedDataKeystringKey used to encrypt config content. This field exists when a config encryption plugin is used.
appNamestringApplication name to which the config belongs.
typestringConfig type.
createTimeintegerConfig creation time.
modifyTimeintegerConfig modification time.
createUserstringConfig creator.
createIpstringConfig creation IP.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config?dataId=nacos.example&groupName=DEFAULT_GROUP&namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"appName": "",
"configTags": null,
"content": "contentTest",
"createIp": "127.0.0.1",
"createTime": 1741761841327,
"createUser": "nacos",
"dataId": "nacos.example",
"desc": null,
"encryptedDataKey": "",
"groupName": "DEFAULT_GROUP",
"id": "873810262413545472",
"md5": "9f67e6977b100e00cab385a75597db58",
"modifyTime": 1741761841327,
"namespaceId": "public",
"type": "text"
}
}

3.2. Publish Config

Description

Publish a specified config.

If the config already exists, it is updated.

Since

3.0.0

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace ID.
groupNamestringYesNoneConfig group name.
dataIdstringYesNoneConfig ID.
contentstringYesNoneConfig content.
appNamestringNoNoneApplication name.
configTagsstringNoNoneConfig tags.
descstringNoNoneConfig description.
typestringNoNoneConfig type.
encryptedDataKeystringNo-Data key for encrypted config content.
srcUserstringNo-Publishing user.
tagstringNo-Config tag.

Response Data

NameTypeDescription
databooleanWhether execution succeeds

Examples

  • Request example
Terminal window
curl -d 'dataId=nacos.example' \
-d 'groupName=DEFAULT_GROUP' \
-d 'namespaceId=public' \
-d 'content=contentTest' \
-X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/config'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.3. Delete Config

Description

Delete a specified config.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
groupNamestringYesNoneConfig group name
dataIdstringYesNoneConfig name

Response Data

NameTypeDescription
databooleanWhether execution succeeds

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/cs/config?dataId=nacos.example&groupName=DEFAULT_GROUP&namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.4. Batch Delete Configs

Description

Batch delete configs by config ID.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/batch

Request Parameters

NameTypeRequiredDescription
idsarrayYesConfig ID list. Separate multiple IDs with commas.

Response Data

NameTypeDescription
databooleanOperation result

Examples

  • Request example
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/batch?ids=1,2,3'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.5. Query Config Listeners

Description

Query listener information of a specified config.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/listener

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
dataIdstringYesNoneConfig ID
groupNamestringYesNoneGroup name
aggregationbooleanNotrueWhether to aggregate data from other nodes.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
queryTypestringSubscriber query type. This API uses config.
listenersStatusmap<string, string>Subscriber list. The key is the subscriber IP, and the value is the MD5 value of the current config subscribed by the subscriber.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/listener?namespaceId=public&dataId=example&groupName=DEFAULT_GROUP'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"listenersStatus": {
"127.0.0.1": "32cacc65accfdab47954de3fc781e938"
},
"queryType": "config"
}
}

3.6. Query Config List by Config Content

Description

Search configs by config details, such as content and tags.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/list

Request Parameters

NameTypeRequiredDefaultDescription
pageNointegerYes1Page number.
pageSizeintegerYes100Page size.
namespaceIdstringNopublicNamespace ID.
dataIdstringYes""Config ID to match.
groupNamestringYes""Config group name to match.
appNamestringNo""Application name to match.
configTagsstringNo""Config tags to match.
typestringNo""Config type to match.
configDetailstringYes""Config content or details to match.
searchstringNoblurSearch mode: blur or accurate.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of configs that match the criteria.
pagesAvailableintegerTotal number of available pages.
pageNumberintegerCurrent page number.
pageItemsarrayConfigurations matching the query criteria.
pageItems[i].idstringID of the config in the storage system. It is usually a string of the Long type.
pageItems[i].dataIdstringConfig ID.
pageItems[i].groupNamestringConfig group.
pageItems[i].namespaceIdstringNamespace ID.
pageItems[i].md5stringMD5 value of the config content.
pageItems[i].appNamestringApplication name to which the config belongs.
pageItems[i].typestringConfig type.
pageItems[i].createTimeintegerConfig creation time.
pageItems[i].modifyTimeintegerConfig modification time.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/list?pageNo=1&pageSize=10'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"pageItems": [
{
"appName": "",
"createTime": 0,
"dataId": "111",
"groupName": "DEFAULT_GROUP",
"id": "873475812546842624",
"md5": null,
"modifyTime": 0,
"namespaceId": "public",
"type": "text"
},
{
"appName": "",
"createTime": 0,
"dataId": "qtc-user.yaml",
"groupName": "DEFAULT_GROUP",
"id": "873476606771859456",
"md5": null,
"modifyTime": 0,
"namespaceId": "public",
"type": "text"
}
],
"pageNumber": 1,
"pagesAvailable": 1,
"totalCount": 2
}
}

3.7. Stop Beta Config

Description

Stop the beta config of a specified config.

This API can stop beta publishing only after betaIps is set in the Header when Publish Config is called and the config is changed to the BETA publishing state.

Since

3.0.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/beta

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
dataIdstringYesNoneConfig ID
groupNamestringYesNoneGroup name

Response Data

NameTypeDescription
databooleanOperation result

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/beta?namespaceId=public&dataId=example&groupName=DEFAULT_GROUP'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.8. Query Beta Config

Description

Query the beta config of a specified config.

This API can stop beta publishing only after betaIps is set in the Header when Publish Config is called and the config is changed to the BETA publishing state.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/beta

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
dataIdstringYesNoneConfig ID
groupNamestringYesNoneGroup name

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idstringStorage ID of the beta config.
dataIdstringConfig dataId.
groupNamestringConfig groupName.
namespaceIdstringNamespace to which the config belongs.
descstringConfig description.
md5stringMD5 value of the config content.
configTagsstringConfig tags.
encryptedDataKeystringKey used to encrypt config content. This field exists when a config encryption plugin is used.
appNamestringApplication name to which the config belongs.
typestringConfig type.
createTimeintegerConfig creation time.
modifyTimeintegerConfig modification time.
createUserstringConfig creator.
createIpstringConfig creation IP.
grayNamestringGray release rule name. Fixed value: beta.
grayRulestringGray release rule in JSON format. The expr field is the beta IP list.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/beta?namespaceId=public&dataId=example&groupName=DEFAULT_GROUP'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"appName": "",
"configTags": null,
"content": "bbb11xxccc",
"createIp": null,
"createTime": 0,
"createUser": "nacos",
"dataId": "example",
"desc": null,
"encryptedDataKey": null,
"grayName": "beta",
"grayRule": "{\"type\":\"beta\",\"version\":\"1.0.0\",\"expr\":\"1.1.1.1\",\"priority\":2147483647}",
"groupName": "DEFAULT_GROUP",
"id": "873481464488923136",
"md5": "2f080e5e21ba12bb8ca6894ac0fc5862",
"modifyTime": 1741683449619,
"namespaceId": "public",
"type": null
}
}

3.9. Import and Publish Configs

Description

Import configs and publish them to a specified namespace.

Since

3.0.0

Request Method

POST

Request body type: multipart/form-data. Parameters are sent in the request body.

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/import

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicTarget namespace ID.
src_userstringNoNoneImporting user.
policystringNoABORTImport policy.
fileMultipartFileNoNoneZIP file containing configs.

Response Data

NameTypeDescription
datamap<string, object>Import result.
data.succCountintegerNumber of successfully imported items
data.skipCountintegerNumber of skipped items

Examples

Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/import' \
-H 'Content-Type: multipart/form-data' \
-F 'namespaceId=test' \
-F 'file=@/path/to/config.zip'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"succCount": 10,
"skipCount": 2
}
}

3.10. Export Configs

Description

Export specified configs as a ZIP file.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/export

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace ID.
groupNamestringNo""Config group name.
dataIdstringNo""Config ID.
idsarrayNoNoneConfig ID list.
appNamestringNo-Application name.

When using this API, use ids or the dataId + groupName combination separately. Choose only one method and pass empty strings for the other type. Otherwise, the exported file may be empty.

Response Data

The response body is a ZIP file that contains config content and metadata.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/export?namespaceId=public&ids=' --output config.zip

3.11. Clone Configs

Description

Clone configs to a specified namespace.

Since

3.0.0

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/config/clone

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringYespublicTarget namespace ID.
policystringNoABORTClone policy.
src_userstringNo-Cloning user.

Request Parameters

The request body type is application/json. The request body is an array of configs. Each item is SameNamespaceCloneConfigBean and contains cfgId, dataId, and group.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
succCountintegerNumber of successfully imported items
skipCountintegerNumber of skipped items

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/clone' -d "namespaceId=test&policy=ABORT" \
-H 'Content-Type: application/json' \
-d "[{\"cfgId\":\"838029534438625280\",\"dataId\":\"111\",\"group\":\"DEFAULT_GROUP\"},{\"cfgId\":\"838033747294031872\",\"dataId\":\"qtc-user.yaml\",\"group\":\"DEFAULT_GROUP\"}]"
  • Response example
{
"code": 0,
"message": "success",
"data": {
"succCount": 2,
"skipCount": 0
}
}

3.12. Query Config History List

Description

Get the history version list of a specified config.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/history/list

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
groupNamestringYesNoneConfig group name
dataIdstringYesNoneConfig name
pageNointegerYes1Current page
pageSizeintegerYes100 (maximum 500)Page size

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of history records.
pageNumberintegerCurrent page number, starting from 1.
pagesAvailableintegerAvailable pages.
pageItemsarrayHistory record list.
pageItems[i].idstringHistory record ID.
pageItems[i].dataIdstringConfig dataId.
pageItems[i].groupNamestringConfig groupName.
pageItems[i].namespaceIdstringNamespace to which the config belongs.
pageItems[i].appNamestringApplication name to which the config belongs.
pageItems[i].opTypestringOperation type. I means insert, U means update, and D means delete.
pageItems[i].publishTypestringPublish type. formal means normal publishing, and gray means beta publishing.
pageItems[i].srcIpstringSource IP of the publishing operation.
pageItems[i].srcUserstringPublishing user. This exists only when authentication is enabled and the user publishes the config after logging in.
pageItems[i].createTimeintegerConfig creation time.
pageItems[i].modifyTimeintegerConfig modification time.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/history/list?dataId=nacos.example&groupName=DEFAULT_GROUP&namespaceId=public&pageNo=1&pageSize=100'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"pageItems": [
{
"appName": "",
"createTime": 1272988800000,
"dataId": "nacos.example",
"groupName": "DEFAULT_GROUP",
"id": "102",
"md5": null,
"modifyTime": 1741762032116,
"namespaceId": "public",
"opType": "D ",
"publishType": "formal",
"srcIp": "127.0.0.1",
"srcUser": "nacos",
"type": null
},
{
"appName": "",
"createTime": 1272988800000,
"dataId": "nacos.example",
"groupName": "DEFAULT_GROUP",
"id": "101",
"md5": null,
"modifyTime": 1741761841295,
"namespaceId": "public",
"opType": "I ",
"publishType": "formal",
"srcIp": "127.0.0.1",
"srcUser": "nacos",
"type": null
}
],
"pageNumber": 1,
"pagesAvailable": 1,
"totalCount": 2
}
}

3.13. Query Config History Version Details

Description

Use this API to query a historical change record of a config.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/history

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
groupNamestringYesNoneConfig group name
dataIdstringYesNoneConfig name
nidintegerYesNoneConfig history ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idstringHistory record ID.
dataIdstringConfig dataId.
groupNamestringConfig groupName.
namespaceIdstringNamespace to which the config belongs.
contentstringConfig content.
appNamestringApplication name to which the config belongs.
opTypestringOperation type. I means insert, U means update, and D means delete.
publishTypestringPublish type. formal means normal publishing, and gray means beta publishing.
srcIpstringSource IP of the publishing operation.
srcUserstringPublishing user. This exists only when authentication is enabled and the user publishes the config after logging in.
createTimeintegerConfig creation time.
modifyTimeintegerConfig modification time.
grayNamestringGray release rule name. Fixed value: beta.
extInfostringExtended information. It currently includes src_user, type, and c_desc; when publishType is gray, it also includes grayRule.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/history/??dataId=111&groupName=DEFAULT_GROUP&nid=7'
  • Response example
{
"code": 0,
"data": {
"appName": "",
"content": "bbb11xx",
"createTime": 1272988800000,
"dataId": "111",
"encryptedDataKey": "",
"extInfo": "{\"src_user\":\"nacos\",\"type\":\"text\",\"c_desc\":\"111\"}",
"grayName": "",
"groupName": "DEFAULT_GROUP",
"id": "7",
"md5": "7d37afdb0b04d958d529bcb6de44fa71",
"modifyTime": 1741682102157,
"namespaceId": "public",
"opType": "I ",
"publishType": "formal",
"srcIp": "0:0:0:0:0:0:0:1",
"srcUser": "nacos",
"type": null
},
"message": "success"
}

3.14. Query Previous Config Version

Description

Get the previous version of a specified config.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/history/previous

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringNopublicNamespace
groupNamestringYesNoneConfig group name
dataIdstringYesNoneConfig name
idintegerYesNoneConfig ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idstringHistory record ID.
dataIdstringConfig dataId.
groupNamestringConfig groupName.
namespaceIdstringNamespace to which the config belongs.
contentstringConfig content.
appNamestringApplication name to which the config belongs.
opTypestringOperation type. I means insert, U means update, and D means delete.
publishTypestringPublish type. formal means normal publishing, and gray means beta publishing.
srcIpstringSource IP of the publishing operation.
srcUserstringPublishing user. This exists only when authentication is enabled and the user publishes the config after logging in.
createTimeintegerConfig creation time.
modifyTimeintegerConfig modification time.
grayNamestringGray release rule name. Fixed value: beta.
extInfostringExtended information. It currently includes src_user, type, and c_desc; when publishType is gray, it also includes grayRule.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/history/previous?id=101&dataId=nacos.example&groupName=DEFAULT_GROUP&namespaceId=public'
  • Response example
{
"code": 0,
"data": {
"appName": "",
"content": "bbb11xx",
"createTime": 1272988800000,
"dataId": "nacos.example",
"encryptedDataKey": "",
"extInfo": "{\"src_user\":\"nacos\",\"type\":\"text\",\"c_desc\":\"111\"}",
"grayName": "",
"groupName": "DEFAULT_GROUP",
"id": "7",
"md5": "7d37afdb0b04d958d529bcb6de44fa71",
"modifyTime": 1741682102157,
"namespaceId": "public",
"opType": "I ",
"publishType": "formal",
"srcIp": "0:0:0:0:0:0:0:1",
"srcUser": "nacos",
"type": null
},
"message": "success"
}

3.15. Query Config List in a Specified Namespace

Description

Get the config information list in a specified namespace.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/history/configs

Request Parameters

NameTypeRequiredDefaultDescription
namespaceIdstringYesNoneNamespace

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
dataIdstringConfig dataId.
groupNamestringConfig groupName.

Other fields are not used.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/history/configs?namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"appName": "",
"createTime": 0,
"dataId": "111",
"groupName": "DEFAULT_GROUP",
"id": "0",
"md5": null,
"modifyTime": 1741682102161,
"namespaceId": "public",
"type": "text"
},
{
"appName": "",
"createTime": 0,
"dataId": "qtc-user.yaml",
"groupName": "DEFAULT_GROUP",
"id": "0",
"md5": null,
"modifyTime": 1741682291519,
"namespaceId": "public",
"type": "text"
}
]
}

3.16. Query Capacity Information

Description

Query capacity information of a specified group or namespace.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/capacity

Request Parameters

NameTypeRequiredDefaultDescription
groupNamestringNoNoneGroup name
namespaceIdstringNoNoneNamespace ID

Note: At least one of groupName and namespaceId must be provided.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idintegerUnique ID of the capacity information
groupNamestringGroup name
namespaceIdstringNamespace ID
quotaintegerQuota
usageintegerCurrent usage
maxSizeintegerMaximum size of a single config
gmtCreatestringCreation time. Deprecated
gmtModifiedstringLast modification time. Deprecated
maxAggrCountintegerUnused. Deprecated
maxAggrSizeintegerUnused. Deprecated

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/capacity?namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"gmtCreate": null,
"gmtModified": null,
"id": "1",
"maxAggrCount": 10000,
"maxAggrSize": 1024,
"maxSize": 102400,
"namespaceId": "public",
"quota": 200,
"usage": 2
}
}

3.17. Update Capacity Information

Description

Update capacity information of a specified group or namespace. If the capacity information is not initialized, it is automatically initialized.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/capacity

Request Parameters

NameTypeRequiredDescription
groupNamestringYesGroup name. Either groupName or namespaceId must be provided.
namespaceIdstringNoNamespace ID. Either namespaceId or groupName must be provided.
quotaintegerNoQuota
maxSizeintegerNoMaximum size
maxAggrCountintegerNo-
maxAggrSizeintegerNo-

Response Data

NameTypeDescription
databooleanOperation result

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/capacity' -d 'namespaceId=public&quota=200&maxSize=2048'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.18. Manually Trigger Local Cache Update

Description

Manually trigger loading all config data from storage into the local cache.

Since

3.0.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/ops/localCache

Request Parameters

None

Response Data

NameTypeDescription
datastringOperation result

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/ops/localCache'
  • Response example
{
"code": 0,
"message": "success",
"data": "Local cache updated from store successfully!"
}

3.19. Set Log Level

Description

Dynamically set the log level of a specified module.

Since

3.0.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/ops/log

Request Parameters

NameTypeRequiredDefaultDescription
logNamestringYesNoneModule name
logLevelstringYesNoneLog level, such as INFO or DEBUG

Response Data

NameTypeDescription
datastringOperation result

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/cs/ops/log' -d "logName=config-server&logLevel=DEBUG"
  • Response example
{
"code": 0,
"message": "success",
"data": "Log level updated successfully! Module: com.alibaba.nacos, Log Level: DEBUG"
}

3.20. Execute Derby Database Operations

Description

Execute query operations on the Derby database. Only SELECT statements are supported.

Note: This API requires the nacos.config.derby.ops.enabled configuration to be enabled and can be used only when the database is Derby. It is provided only for maintainers to troubleshoot Derby database data issues.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/ops/derby

Request Parameters

NameTypeRequiredDefaultDescription
sqlstringYesNoneSQL query statement

Response Data

NameTypeDescription
dataarrayQuery result.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/ops/derby?sql=SELECT%20*%20FROM%20config_info'
  • Response example
{
"code": 0,
"message": "success",
"data": [
{
"APP_NAME": "",
"CONTENT": "bbb11xx",
"C_DESC": "111",
"C_SCHEMA": null,
"C_USE": null,
"DATA_ID": "111",
"EFFECT": null,
"ENCRYPTED_DATA_KEY": "",
"GMT_CREATE": "2025-03-11T08:35:02.161+00:00",
"GMT_MODIFIED": "2025-03-11T08:35:02.161+00:00",
"GROUP_ID": "DEFAULT_GROUP",
"ID": 873475812546842624,
"MD5": "7d37afdb0b04d958d529bcb6de44fa71",
"SRC_IP": "0:0:0:0:0:0:0:1",
"SRC_USER": "nacos",
"TENANT_ID": "public",
"TYPE": "text"
}
]
}

If the feature is not enabled, the response is as follows:

{
"code": 30000,
"data": null,
"message": "Derby ops is disabled, please set `nacos.config.derby.ops.enabled=true` to enabled this feature."
}

3.21. Import Derby Database Data

Description

Import data from an external data source into the Derby database.

Note: This API requires the nacos.config.derby.ops.enabled configuration to be enabled and can be used only when the database is Derby. It is provided only for maintainers to troubleshoot Derby database data issues.

Since

3.0.0

Request Method

POST

The request body type is multipart/form-data, and parameters are placed in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/ops/derby/import

Request Parameters

NameTypeRequiredDefaultDescription
fileMultipartFileNoNoneImport file (SQL file).

Response Data

NameTypeDescription
datastringImport result information

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/ops/derby/import' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@data.sql'
  • Response example
{
"code": 0,
"message": "success",
"data": "Data imported successfully!"
}

3.22. Get Client Subscription Information

Description

Get subscription config information of a specified IP client.

Since

3.0.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/cs/listener

Request Parameters

NameTypeRequiredDefaultDescription
ipstringYesNoneClient IP address
allbooleanNofalseWhether to return all config information
namespaceIdstringNopublicNamespace ID
aggregationbooleanNotrueWhether to aggregate from other nodes

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
queryTypestringSubscriber query type. This API uses ip.
listenersStatusmap<string, string>Subscriber list. The key is subscribed config information in the format dataId + groupName + namespaceId, and the value is the MD5 value of the current config subscribed by the subscriber.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/listener?ip=127.0.0.1&namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"listenersStatus": {
"qtc-user.yaml+DEFAULT_GROUP+public": "32cacc65accfdab47954de3fc781e938"
},
"queryType": "ip"
}
}

3.23. Get Cluster Client Metrics

Description

Get config metric information of a specified IP client in the cluster.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/metrics/cluster

Request Parameters

NameTypeRequiredDefaultDescription
ipstringYesNoneClient IP address
dataIdstringNoNoneConfig ID
groupNamestringNoNoneGroup name
namespaceIdstringNopublicNamespace ID

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
dataService information
data.{namespaceId}.isFixedServerbooleanWhether this is a fixed server
data.{namespaceId}.snapshotDirstringSnapshot directory path
data.{namespaceId}.clientVersionstringClient version
data.{namespaceId}.serverUrlsstringServer URL list
data.{namespaceId}.listenConfigSizeintegerListen config size
data.{namespaceId}.metricValues.cacheDatastringMD5 value of cached data
data.{namespaceId}.metricValues.snapshotDatastringMD5 value of snapshot data

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/metrics/cluster?ip=127.0.0.1&dataId=example&groupName=DEFAULT_GROUP&namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"a981e0a8-f394-425c-ac2a-ab753586428b": {
"isFixedServer": true,
"snapshotDir": "/path/to/nacos/config",
"clientVersion": "Nacos-Java-Client:v2.1.0",
"serverUrls": "http://127.0.0.1:8848",
"listenConfigSize": 1,
"metricValues": {
"cacheData": "asdasd:a8f5f167f44f4964e6c998dee827110c",
"snapshotData": "asdasd:a8f5f167f44f4964e6c998dee827110c"
}
}
}
}

3.24. Get Local Client Metrics

Description

Get metric information of a specified IP client on the local machine.

Since

3.0.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/metrics/ip

Request Parameters

NameTypeRequiredDefaultDescription
ipstringYesNoneClient IP address
dataIdstringNoNoneConfig ID
groupNamestringNoNoneGroup name
namespaceIdstringNopublicNamespace

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
dataService information
data.{namespaceId}.isFixedServerbooleanWhether this is a fixed server
data.{namespaceId}.snapshotDirstringSnapshot directory path
data.{namespaceId}.clientVersionstringClient version
data.{namespaceId}.serverUrlsstringServer URL list
data.{namespaceId}.listenConfigSizeintegerListen config size
data.{namespaceId}.metricValues.cacheDatastringMD5 value of cached data
data.{namespaceId}.metricValues.snapshotDatastringMD5 value of snapshot data

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/metrics/ip?ip=127.0.0.1&dataId=example&groupName=DEFAULT_GROUP&namespaceId=public'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"a981e0a8-f394-425c-ac2a-ab753586428b": {
"isFixedServer": true,
"snapshotDir": "/path/to/nacos/config",
"clientVersion": "Nacos-Java-Client:v2.1.0",
"serverUrls": "http://127.0.0.1:8848",
"listenConfigSize": 1,
"metricValues": {
"cacheData": "asdasd:a8f5f167f44f4964e6c998dee827110c",
"snapshotData": "asdasd:a8f5f167f44f4964e6c998dee827110c"
}
}
}
}

3.25. Update Config Metadata

Description

Use this API to update config metadata. Only Description and tags can be updated.

Since

3.1.0

Request Method

PUT

Authorization

A user identity with namespace write permission is required.

Request URL

/nacos/v3/admin/cs/config/metadata

Request Parameters

NameTypeRequiredDefaultDescription
dataIdstringYesNoneConfig ID
groupNamestringYesNoneGroup name
namespaceIdstringNopublicNamespace
descstringNonullNew config description
configTagsstringNonullNew config tags

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
databooleanOperation result

Examples

  • Request example
Terminal window
curl -X PUT '127.0.0.1:8848/v3/admin/cs/config/metadata' \
-d 'namespaceId=public' \
-d 'groupName=DEFAULT_GROUP' \
-d 'dataId=test' \
-d 'desc=testDesc' \
-d 'configTags=customTag'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : true
}

3.26. Get Gray Configuration

Description

This interface retrieves the details of a specified gray configuration.

Since

3.2.2

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/config/gray

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public when omitted.
groupNamestringYesConfiguration group name.
dataIdstringYesConfiguration ID.
grayNamestringYesGray configuration name.

Response Data

NameTypeDescription
data.dataIdstringConfiguration ID.
data.groupNamestringConfiguration group name.
data.namespaceIdstringNamespace ID.
data.contentstringGray configuration content.
data.grayNamestringGray configuration name.
data.grayRulestringGray matching rule.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/gray?namespaceId=public&groupName=DEFAULT_GROUP&dataId=example&grayName=gray'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

3.27. Publish Gray Configuration

Description

This interface publishes a gray configuration using tagv2 gray matching rules.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/config/gray

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public when omitted.
groupNamestringYesConfiguration group name.
dataIdstringYesConfiguration ID.
contentstringYesGray configuration content.
grayNamestringYesGray configuration name.
grayTypestringNoGray rule type.
grayMatchRuleExpstringYesGray matching rule expression.
grayVersionstringYesGray version.
grayPriorityintegerNoGray rule priority.
typestringNoConfiguration type.
srcUserstringNoOperator username.
encryptedDataKeystringNoData key for encrypted configuration content.

Response Data

NameTypeDescription
databooleanWhether the gray configuration was published successfully.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/gray' \
-d 'namespaceId=public' \
-d 'groupName=DEFAULT_GROUP' \
-d 'dataId=example' \
-d 'content=gray-content' \
-d 'grayName=gray' \
-d 'grayType=tagv2' \
-d 'grayMatchRuleExp=tag=gray' \
-d 'grayVersion=1' \
-d 'grayPriority=1'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

3.28. Delete Gray Configuration

Description

This interface deletes a specified gray configuration.

Since

3.2.2

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/cs/config/gray

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public when omitted.
groupNamestringYesConfiguration group name.
dataIdstringYesConfiguration ID.
grayNamestringYesGray configuration name.

Response Data

NameTypeDescription
databooleanWhether the gray configuration was deleted successfully.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/cs/config/gray?namespaceId=public&groupName=DEFAULT_GROUP&dataId=example&grayName=gray'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

4. MCP Management

4.1. Query MCP Service List

Description

Use this API to query the list of MCP services hosted on Nacos.

Since

3.0.1

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/mcp/list

Request Parameters

NameTypeRequiredDescription
pageNointegerYesCurrent page. Defaults to 1.
pageSizeintegerYesPage size. Defaults to 20; maximum value is 500.
namespaceIdstringNoNamespace ID of the MCP service. Defaults to public.
mcpNamestringNoName pattern of the MCP service. If empty, all MCP services are queried. When search is blur, * can be used for fuzzy search.
searchstringNoSearch mode: blur or accurate. Defaults to blur.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of services that match the criteria.
pageNumberintegerCurrent page number, starting from 1.
pagesAvailableintegerAvailable pages.
pageItemsarrayService list.
pageItems[i].idstringMCP service ID, usually a UUID.
pageItems[i].namestringMCP service name.
pageItems[i].protocolstringMCP protocol, such as stdio, sse, streamable, http, or dubbo.
pageItems[i].frontProtocolstringFrontend protocol exposed by the MCP service, usually for protocol converters such as gateways. If no converter is used, it is the same as protocol.
pageItems[i].descriptionstringMCP service description.
pageItems[i].repositorystringMCP service repository.
pageItems[i].versionDetailobjectLatest version information of the MCP service.
pageItems[i].localServerConfigmap<string, object>Startup information for a local MCP service when the MCP service type is stdio.
pageItems[i].remoteServerConfigobjectRemote service information when the MCP service type is not stdio.
pageItems[i].latestPublishedVersionstringLatest published version of the MCP service.
pageItems[i].versionDetailsarrayMCP service version details.
pageItems[i].capabilitiesarrayCapability types supported by the MCP service, such as TOOL, PROMPT, and RESOURCE.

The VersionDetail structure is as follows:

NameTypeDescription
versionstringMCP service version.
release_datestringMCP service release time.
is_latestbooleanWhether this is the latest version of the MCP service.

Examples

  • Request example
Terminal window
curl -X GET '127.0.0.1:8848/nacos/v3/admin/ai/mcp/list?pageNo=1&pageSize=100&namespaceId=public&search=blur'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"totalCount": 1,
"pageNumber": 1,
"pagesAvailable": 1,
"pageItems": [
{
"id": "d7a64724-a556-4fe4-82fa-e806d43e00dc",
"name": "test",
"protocol": "stdio",
"frontProtocol": "stdio",
"description": "ceshi",
"repository": null,
"versionDetail": {
"version": "1.0.0",
"release_date": "2025-05-22T06:40:37Z",
"is_latest": null
},
"remoteServerConfig": null,
"localServerConfig": null,
"enabled": true,
"capabilities": null,
"latestPublishedVersion": "1.0.0",
"versionDetails": [
{
"version": "1.0.0",
"release_date": "2025-05-22T06:40:37Z",
"is_latest": null
}
]
}
]
}
}

4.2. Query MCP Service Details

Description

Use this API to query details of a specified MCP service hosted on Nacos.

Since

3.0.1

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/mcp

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID of the MCP service. Defaults to public.
mcpIdstringNoMCP service ID. It is usually a UUID. Either mcpId or mcpName must be provided, and passing this value is recommended.
mcpNamestringNoName pattern of the MCP service. Either mcpName or mcpId must be provided. Passing mcpId is recommended.
versionstringNoMCP service version. If not specified, the latest version is returned.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
idstringMCP service ID. It is usually a UUID.
namestringMCP service name.
namespaceIdstringNamespace ID to which the MCP service belongs.
protocolstringMCP protocol, such as stdio, sse, streamable, http, or dubbo.
frontProtocolstringFrontend exposure protocol of MCP. It is usually used by a protocol converter such as a gateway. If no converter is used, it is the same as protocol, such as stdio, sse, streamable, http, or dubbo.
descriptionstringMCP service description.
repositorystringRepository of the MCP service.
versionDetailobjectQueried version information of the MCP service.
localServerConfigmap<string, object>Startup information for a local MCP service when the MCP service type is stdio.
remoteServerConfigobjectRemote service information when the MCP service type is not stdio.
enabledbooleanWhether the MCP service is enabled.
capabilitiesarrayCapability types supported by the MCP service, such as TOOL, PROMPT, and RESOURCE.
backendEndpointsarrayBackend endpoint details when the MCP service type is not stdio.
toolSpecmap<string, object>Tool details when the MCP service supports the TOOL capability.
allVersionsarrayAll version details of the MCP service.

The VersionDetail structure is as follows:

NameTypeDescription
versionstringMCP service version.
release_datestringMCP service release time.
is_latestbooleanWhether this is the latest version of the MCP service.

Examples

  • Request example
Terminal window
curl -X GET '127.0.0.1:8848/nacos/v3/admin/ai/mcp?namespaceId=public&mcpName=test&mcpId=d7a64724-a556-4fe4-82fa-e806d43e00dc'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"id": "d7a64724-a556-4fe4-82fa-e806d43e00dc",
"name": "test",
"protocol": "stdio",
"frontProtocol": "stdio",
"description": "ceshi",
"repository": null,
"versionDetail": {
"version": "1.0.0",
"release_date": "2025-05-22T06:40:37Z",
"is_latest": true
},
"remoteServerConfig": null,
"localServerConfig": {
"test": {}
},
"enabled": true,
"capabilities": [],
"backendEndpoints": null,
"toolSpec": null,
"allVersions": [
{
"version": "1.0.0",
"release_date": "2025-05-22T06:40:37Z",
"is_latest": true
}
],
"namespaceId": "public"
}
}

4.3. Update MCP Service

Description

Use this API to update an MCP service hosted on Nacos.

Since

3.0.1

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/mcp

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID of the MCP service. Defaults to public.
serverSpecificationstringYesMCP service description details
toolSpecificationstringNoMCP service tool description details
endpointSpecificationstringNoRemote service endpoint details of the MCP service. This takes effect only for non-stdio protocols.
overrideExistingbooleanNoWhether to overwrite the original endpointSpecification when updating the MCP service. This takes effect only for non-stdio protocols.
latestbooleanNo-

The details of the serverSpecification, toolSpecification, and endpointSpecification parameters are as follows:

serverSpecification

NameTypeDescription
idstringMCP service ID. It is usually a UUID and must be provided to locate the MCP service to update.
namestringMCP service name.
protocolstringMCP protocol, such as stdio, sse, streamable, http, or dubbo.
frontProtocolstringFrontend exposure protocol of MCP. It is usually used by a protocol converter such as a gateway. If no converter is used, it is the same as protocol, such as stdio, sse, streamable, http, or dubbo.
descriptionstringMCP service description.
repositorystringRepository of the MCP service.
versionDetailobjectMCP service version information.
versionstringSimple version information of the MCP service, mainly used for compatibility. If versionDetail is set, this field is invalid.
localServerConfigmap<string, object>Startup information for a local MCP service when the MCP service type is stdio.
remoteServerConfigobjectRemote service information when the MCP service type is not stdio.
enabledbooleanWhether the MCP service is enabled.
capabilitiesarrayCapability types supported by the MCP service, such as TOOL, PROMPT, and RESOURCE.

The VersionDetail structure is as follows:

NameTypeDescription
versionstringMCP service version number.
release_datestringMCP service version release time.
is_latestbooleanWhether this MCP service version is the latest version.

toolSpecification

NameTypeDescription
toolsarrayTool list provided by the MCP Server. See the standard MCP protocol definition of MCP Tool.
toolsMetamap<string, object>Extra metadata for tools provided by the MCP Server. This can extend information not defined in the standard MCP protocol. The key is the name of McpTool, and the value is the extended metadata.
securitySchemesarrayMCP tool security schemes. See the standard MCP protocol.

The McpTool structure is as follows:

NameTypeDescription
namestringMCP tool name
descriptionstringMCP tool description
inputSchemamap<string, object>MCP tool input schema. See the standard MCP protocol; it mainly includes type, required flag, and description.

The McpToolMeta structure is as follows:

NameTypeDescription
invokeContextmap<string, string>Context information used when invoking the MCP tool, such as the backend service Path.
enabledbooleanWhether the MCP tool is enabled.
templatesmap<string, string>Template information of the MCP tool. It is used to map parameters during protocol conversion.

The SecurityScheme structure is as follows:

NameTypeDescription
idstringSecurity scheme ID. It is used and referenced by MCP tools.
typestringSecurity scheme type. Possible values include http, apiKey, localEnv, or other custom extensions.
schemestringSecurity scheme subtype. Used when type is http. Possible values include basic or bearer.
instringSecurity scheme location. Possible values include query and header.
namestringSecurity scheme name. Used when type is apiKey or localEnv, such as the key name of apiKey or the environment variable name of localEnv.
defaultCredentialstringDefault credential used when no credential is provided in the configuration parameters. Optional.

endpointSpecification

NameTypeDescription
typestringBackend service type of the MCP endpoint. Optional values are REF and DIRECT.
datamap<string, string>Actual backend service data of the MCP endpoint. The parameters vary by type. For REF, pass namespaceId, groupName, and serviceName; for DIRECT, pass address and port.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringMCP service update result.

Examples

  • Request example
Terminal window
curl -X PUT '127.0.0.1:8848/nacos/v3/admin/ai/mcp' \
-d 'namespaceId=public' \
-d 'mcpName=test' \
-d 'serverSpecification={"protocol":"stdio","frontProtocol":"stdio","name":"test","id":"d7a64724-a556-4fe4-82fa-e806d43e00dc","description":"ceshi","versionDetail":{"version":"1.0.0"},"enabled":true,"localServerConfig":{"test":{}}}'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "ok"
}

4.4. Create MCP Service

Description

Use this API to create an MCP service hosted on Nacos. The service can be converted from an existing API or come from the MCP marketplace.

Since

3.0.1

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/mcp

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID of the MCP service. Defaults to public.
serverSpecificationstringYesMCP service description details
toolSpecificationstringNoMCP service tool description details
endpointSpecificationstringNoRemote service endpoint details of the MCP service. This takes effect only for non-stdio protocols.

The details of the serverSpecification, toolSpecification, and endpointSpecification parameters are as follows:

serverSpecification

NameTypeDescription
idstringMCP service ID. It is usually a UUID. It does not need to be provided because the system automatically generates it.
namestringMCP service name.
protocolstringMCP protocol, such as stdio, sse, streamable, http, or dubbo.
frontProtocolstringFrontend exposure protocol of MCP. It is usually used by a protocol converter such as a gateway. If no converter is used, it is the same as protocol, such as stdio, sse, streamable, http, or dubbo.
descriptionstringMCP service description.
repositorystringRepository of the MCP service.
versionDetailobjectMCP service version information.
versionstringSimple version information of the MCP service, mainly used for compatibility. If versionDetail is set, this field is invalid.
localServerConfigmap<string, object>Startup information for a local MCP service when the MCP service type is stdio.
remoteServerConfigobjectRemote service information when the MCP service type is not stdio.
enabledbooleanWhether the MCP service is enabled.
capabilitiesarrayCapability types supported by the MCP service, such as TOOL, PROMPT, and RESOURCE.

The VersionDetail structure is as follows:

NameTypeDescription
versionstringMCP service version number.
release_datestringMCP service version release time.
is_latestbooleanWhether this MCP service version is the latest version.

toolSpecification

NameTypeDescription
toolsarrayTool list provided by the MCP Server. See the standard MCP protocol definition of MCP Tool.
toolsMetamap<string, object>Extra metadata for tools provided by the MCP Server. This can extend information not defined in the standard MCP protocol. The key is the name of McpTool, and the value is the extended metadata.
securitySchemesarrayMCP tool security schemes. See the standard MCP protocol.

The McpTool structure is as follows:

NameTypeDescription
namestringMCP tool name
descriptionstringMCP tool description
inputSchemamap<string, object>MCP tool input schema. See the standard MCP protocol; it mainly includes type, required flag, and description.

The McpToolMeta structure is as follows:

NameTypeDescription
invokeContextmap<string, string>Context information used when invoking the MCP tool, such as the backend service Path.
enabledbooleanWhether the MCP tool is enabled.
templatesmap<string, string>Template information of the MCP tool. It is used to map parameters during protocol conversion.

The SecurityScheme structure is as follows:

NameTypeDescription
idstringSecurity scheme ID. It is used and referenced by MCP tools.
typestringSecurity scheme type. Possible values include http, apiKey, localEnv, or other custom extensions.
schemestringSecurity scheme subtype. Used when type is http. Possible values include basic or bearer.
instringSecurity scheme location. Possible values include query and header.
namestringSecurity scheme name. Used when type is apiKey or localEnv, such as the key name of apiKey or the environment variable name of localEnv.
defaultCredentialstringDefault credential used when no credential is provided in the configuration parameters. Optional.

endpointSpecification

NameTypeDescription
typestringBackend service type of the MCP endpoint. Optional values are REF and DIRECT.
datamap<string, string>Actual backend service data of the MCP endpoint. The parameters vary by type. For REF, pass namespaceId, groupName, and serviceName; for DIRECT, pass address and port.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringID of the newly created MCP service.

Examples

  • Request example
Terminal window
curl -X POST '127.0.0.1:8848/nacos/v3/admin/ai/mcp' \
-d 'namespaceId=public' \
-d 'mcpName=test' \
-d 'serverSpecification={"protocol":"stdio","frontProtocol":"stdio","name":"test","id":"","description":"ceshi","versionDetail":{"version":"1.0.0"},"enabled":true,"localServerConfig":{"test":{}}}'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "58e5b430-b16d-4f28-9334-edb64303dc23"
}

4.5. Delete MCP Service

Description

Use this API to delete an MCP service hosted on Nacos.

Since

3.0.1

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/mcp

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID of the MCP service. Defaults to public.
mcpIdstringNoMCP service ID. It is usually a UUID. Either mcpId or mcpName must be provided, and passing this value is recommended.
mcpNamestringNoName pattern of the MCP service. Either mcpName or mcpId must be provided. Passing mcpId is recommended.
versionstringNoMCP service version. If not specified, the latest version is used.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringMCP service deletion result.

Examples

  • Request example
Terminal window
curl -X DELETE '127.0.0.1:8848/nacos/v3/admin/ai/mcp?namespaceId=public&mcpName=test&mcpId=d7a64724-a556-4fe4-82fa-e806d43e00dc'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "ok"
}

5. A2A Registry

5.1. Query Versions of a Specified AgentCard

Description

Use this API to query the version list of a specified AgentCard hosted on Nacos.

Since

3.1.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a/version/list

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace to which the AgentCard belongs. Defaults to public.
agentNamestringYesAgentCard name

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
data[i].versionstringAgentCard version number.
data[i].createdAtstringCreation time of this version.
data[i].updatedAtstringLast update time of this version.
data[i].latestbooleanWhether this version is marked as the latest published version.

Examples

  • Request example
Terminal window
curl -X GET '127.0.0.1:8848/nacos/v3/admin/ai/a2a/version/list?namespaceId=public&agentName=GeoSpatial+Route+Planner+Agent'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : [ {
"version" : "1.2.0",
"createdAt" : "2025-09-12T03:33:51Z",
"updatedAt" : "2025-09-12T07:21:49Z",
"latest" : true
} ]
}

5.2. Query AgentCard List

Description

Use this API to query the list of AgentCards hosted on Nacos.

Since

3.1.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a/list

Request Parameters

NameTypeRequiredDescription
pageNointegerYesCurrent page. Defaults to 1.
pageSizeintegerYesPage size. Defaults to 100.
namespaceIdstringNoNamespace ID of the AgentCard. Defaults to public.
agentNamestringNoAgentCard name. If empty, all AgentCards are queried.
searchstringNoblur or accurate

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
totalCountintegerTotal number of services that match the criteria.
pageNumberintegerCurrent page number, starting from 1.
pagesAvailableintegerAvailable pages.
pageItemsarrayService list.
pageItems[i].protocolVersionstringA2A protocol version of the AgentCard.
pageItems[i].namestringAgentCard name.
pageItems[i].descriptionstringAgentCard description.
pageItems[i].versionstringAgentCard version.
pageItems[i].iconUrlstringAgentCard icon URL.
pageItems[i].capabilitiesobjectAgentCard capabilities, matching A2A standard capabilities.
pageItems[i].skillsarrayAgentCard skill list, matching A2A standard skill.
pageItems[i].latestPublishedVersionstringLatest published version of the AgentCard.
pageItems[i].versionDetailsarrayAll version details of the AgentCard.
pageItems[i].registrationTypestringDefault registration type of the AgentCard. Optional values are URL and SERVICE.

The AgentVersionDetail content is as follows:

NameTypeDescription
versionstringAgentCard version.
createdAtstringCreation time of this version.
updatedAtstringLast update time of this version.
latestbooleanWhether this version is marked as the latest published version.

Examples

  • Request example
Terminal window
curl -X GET '127.0.0.1:8848/nacos/v3/admin/ai/a2a/list?pageNo=1&pageSize=100&namespaceId=public&search=blur'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : {
"totalCount" : 1,
"pageNumber" : 1,
"pagesAvailable" : 1,
"pageItems" : [ {
"protocolVersion" : "0.2.9",
"name" : "GeoSpatial Route Planner Agent",
"description" : "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.",
"version" : "1.2.0",
"iconUrl" : "https://georoute-agent.example.com/icon.png",
"capabilities" : {
"streaming" : true,
"pushNotifications" : true,
"stateTransitionHistory" : false,
"extensions" : null
},
"skills" : [ {
"id" : "route-optimizer-traffic",
"name" : "Traffic-Aware Route Optimizer",
"description" : "Calculates the optimal driving route between two or more locations, taking into account real-time traffic conditions, road closures, and user preferences (e.g., avoid tolls, prefer highways).",
"tags" : [ "maps", "routing", "navigation", "directions", "traffic" ],
"examples" : [ "Plan a route from '1600 Amphitheatre Parkway, Mountain View, CA' to 'San Francisco International Airport' avoiding tolls.", "{\"origin\": {\"lat\": 37.422, \"lng\": -122.084}, \"destination\": {\"lat\": 37.7749, \"lng\": -122.4194}, \"preferences\": [\"avoid_ferries\"]}" ],
"inputModes" : [ "application/json", "text/plain" ],
"outputModes" : [ "application/json", "application/vnd.geo+json", "text/html" ]
}, {
"id" : "custom-map-generator",
"name" : "Personalized Map Generator",
"description" : "Creates custom map images or interactive map views based on user-defined points of interest, routes, and style preferences. Can overlay data layers.",
"tags" : [ "maps", "customization", "visualization", "cartography" ],
"examples" : [ "Generate a map of my upcoming road trip with all planned stops highlighted.", "Show me a map visualizing all coffee shops within a 1-mile radius of my current location." ],
"inputModes" : [ "application/json" ],
"outputModes" : [ "image/png", "image/jpeg", "application/json", "text/html" ]
} ],
"latestPublishedVersion" : "1.2.0",
"versionDetails" : [ {
"version" : "1.2.0",
"createdAt" : "2025-09-12T03:33:51Z",
"updatedAt" : "2025-09-12T07:21:49Z",
"latest" : true
} ],
"registrationType" : "URL"
} ]
}
}

5.3. Query AgentCard Details

Description

Use this API to query details of a specified AgentCard hosted on Nacos.

Since

3.1.0

Request Method

GET

Authorization

Requires read permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace to which the AgentCard belongs. Defaults to public.
agentNamestringYesAgentCard name
versionstringNoAgentCard version. If empty, details of the latest version are returned.
registrationTypestringNoDefault registration type of the AgentCard. Optional values are URL and SERVICE. If not specified, the url is generated based on the default registrationType of this AgentCard.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
protocolVersionstringA2A protocol version of the AgentCard.
namestringAgentCard name.
descriptionstringAgentCard description.
versionstringAgentCard version number.
iconUrlstringAgentCard icon URL.
capabilitiesobjectAgentCard capabilities, matching A2A standard capabilities.
skillsarrayAgentCard skill list, matching A2A standard skill.
urlstringDefault access URL of the AgentCard.
preferredTransportstringTransport protocol of the default access URL of the AgentCard. It should be JSONRPC, GRPC, or HTTP+JSON.
additionalInterfacesarrayAll accessible interfaces of the AgentCard, matching the A2A standard.
providerobjectAgentCard provider information, matching the A2A standard.
documentationUrlstringDocumentation URL of the AgentCard.
securitySchemesmap<string, object>AgentCard security scheme definitions, matching the A2A standard.
securityarrayAll security requirement objects of the AgentCard.
defaultInputModesarrayAll default input modes of the AgentCard.
defaultOutputModesarrayAll default output modes of the AgentCard.
supportsAuthenticatedExtendedCardstringWhether the AgentCard supports authenticated extended cards.
registrationTypestringDefault registration type of the AgentCard. Optional values are URL and SERVICE.
latestVersionstringWhether the current AgentCard version is the latest version.

Examples

  • Request example
Terminal window
curl -X GET '127.0.0.1:8848/nacos/v3/admin/ai/a2a?namespaceId=public&agentName=GeoSpatial+Route+Planner+Agent&version=1.0.0&registrationType=SERVICE'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : {
"protocolVersion" : "0.2.9",
"name" : "GeoSpatial Route Planner Agent",
"description" : "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.",
"version" : "1.2.0",
"iconUrl" : "https://georoute-agent.example.com/icon.png",
"capabilities" : {
"streaming" : true,
"pushNotifications" : true,
"stateTransitionHistory" : false,
"extensions" : null
},
"skills" : [ {
"id" : "route-optimizer-traffic",
"name" : "Traffic-Aware Route Optimizer",
"description" : "Calculates the optimal driving route between two or more locations, taking into account real-time traffic conditions, road closures, and user preferences (e.g., avoid tolls, prefer highways).",
"tags" : [ "maps", "routing", "navigation", "directions", "traffic" ],
"examples" : [ "Plan a route from '1600 Amphitheatre Parkway, Mountain View, CA' to 'San Francisco International Airport' avoiding tolls.", "{\"origin\": {\"lat\": 37.422, \"lng\": -122.084}, \"destination\": {\"lat\": 37.7749, \"lng\": -122.4194}, \"preferences\": [\"avoid_ferries\"]}" ],
"inputModes" : [ "application/json", "text/plain" ],
"outputModes" : [ "application/json", "application/vnd.geo+json", "text/html" ]
}, {
"id" : "custom-map-generator",
"name" : "Personalized Map Generator",
"description" : "Creates custom map images or interactive map views based on user-defined points of interest, routes, and style preferences. Can overlay data layers.",
"tags" : [ "maps", "customization", "visualization", "cartography" ],
"examples" : [ "Generate a map of my upcoming road trip with all planned stops highlighted.", "Show me a map visualizing all coffee shops within a 1-mile radius of my current location." ],
"inputModes" : [ "application/json" ],
"outputModes" : [ "image/png", "image/jpeg", "application/json", "text/html" ]
} ],
"url" : "https://georoute-agent.example.com/a2a/v1",
"preferredTransport" : "JSONRPC",
"additionalInterfaces" : [ {
"url" : "https://georoute-agent.example.com/a2a/v1",
"transport" : "JSONRPC"
}, {
"url" : "https://georoute-agent.example.com/a2a/grpc",
"transport" : "GRPC"
}, {
"url" : "https://georoute-agent.example.com/a2a/json",
"transport" : "HTTP+JSON"
} ],
"provider" : {
"organization" : "Example Geo Services Inc.",
"url" : "https://www.examplegeoservices.com"
},
"documentationUrl" : "https://docs.examplegeoservices.com/georoute-agent/api",
"securitySchemes" : {
"google" : {
"type" : "openIdConnect",
"openIdConnectUrl" : "https://accounts.google.com/.well-known/openid-configuration"
}
},
"security" : [ {
"google" : [ "openid", "profile", "email" ]
} ],
"defaultInputModes" : [ "application/json", "text/plain" ],
"defaultOutputModes" : [ "application/json", "image/png" ],
"supportsAuthenticatedExtendedCard" : true,
"registrationType" : "URL",
"latestVersion" : true
}
}

5.4. Update AgentCard

Description

Use this API to update an AgentCard hosted on Nacos.

Since

3.1.0

Request Method

PUT

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace to which the AgentCard belongs. Defaults to public.
agentCardstringYesComplete AgentCard object. For details, see Standard AgentCard.
registrationTypestringNoDefault registration type of the AgentCard. Optional values are URL and SERVICE. If not specified, the url is generated based on the default registrationType of this AgentCard.
setAsLatestbooleanNoWhether to set this version as the latest published version. Defaults to false.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringAgentCard service update result.

Examples

  • Request example
Terminal window
curl -X PUT '127.0.0.1:8848/nacos/v3/admin/ai/a2a' \
-d 'namespaceId=public' \
-d 'agentCard={"protocolVersion":"0.2.9","name":"GeoSpatial Route Planner Agent","description":"Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.","url":"https://georoute-agent.example.com/a2a/v1","preferredTransport":"JSONRPC","additionalInterfaces":[{"url":"https://georoute-agent.example.com/a2a/v1","transport":"JSONRPC"},{"url":"https://georoute-agent.example.com/a2a/grpc","transport":"GRPC"},{"url":"https://georoute-agent.example.com/a2a/json","transport":"HTTP+JSON"}],"provider":{"organization":"Example Geo Services Inc.","url":"https://www.examplegeoservices.com"},"iconUrl":"https://georoute-agent.example.com/icon.png","version":"1.2.0","documentationUrl":"https://docs.examplegeoservices.com/georoute-agent/api","capabilities":{"streaming":true,"pushNotifications":true,"stateTransitionHistory":false},"securitySchemes":{"google":{"type":"openIdConnect","openIdConnectUrl":"https://accounts.google.com/.well-known/openid-configuration"}},"security":[{"google":["openid","profile","email"]}],"defaultInputModes":["application/json","text/plain"],"defaultOutputModes":["application/json","image/png"],"skills":[{"id":"route-optimizer-traffic","name":"Traffic-Aware Route Optimizer","description":"Calculates the optimal driving route between two or more locations, taking into account real-time traffic conditions, road closures, and user preferences (e.g., avoid tolls, prefer highways).","tags":["maps","routing","navigation","directions","traffic"],"examples":["Plan a route from '\''1600 Amphitheatre Parkway, Mountain View, CA'\'' to '\''San Francisco International Airport'\'' avoiding tolls.","{\"origin\": {\"lat\": 37.422, \"lng\": -122.084}, \"destination\": {\"lat\": 37.7749, \"lng\": -122.4194}, \"preferences\": [\"avoid_ferries\"]}"],"inputModes":["application/json","text/plain"],"outputModes":["application/json","application/vnd.geo+json","text/html"]},{"id":"custom-map-generator","name":"Personalized Map Generator","description":"Creates custom map images or interactive map views based on user-defined points of interest, routes, and style preferences. Can overlay data layers.","tags":["maps","customization","visualization","cartography"],"examples":["Generate a map of my upcoming road trip with all planned stops highlighted.","Show me a map visualizing all coffee shops within a 1-mile radius of my current location."],"inputModes":["application/json"],"outputModes":["image/png","image/jpeg","application/json","text/html"]}],"supportsAuthenticatedExtendedCard":true,"signatures":[{"protected":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJrZXktMSIsImprdSI6Imh0dHBzOi8vZXhhbXBsZS5jb20vYWdlbnQvandrcy5qc29uIn0","signature":"QFdkNLNszlGj3z3u0YQGt_T9LixY3qtdQpZmsTdDHDe3fXV9y9-B3m2-XgCpzuhiLt8E0tV6HXoZKHv4GtHgKQ"}]}' \
-d 'registrationType=SERVICE' \
-d 'setAsLatest=true'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "ok"
}

5.5. Create AgentCard

Description

Use this API to create an AgentCard hosted on Nacos.

Since

3.1.0

Request Method

POST

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace to which the AgentCard belongs. Defaults to public.
agentCardstringYesComplete AgentCard object. For details, see Standard AgentCard.
registrationTypestringNoDefault registration type of the AgentCard. Optional values are URL and SERVICE. If not specified, the url is generated based on the default registrationType of this AgentCard. Defaults to URL.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringAgentCard publish result.

Examples

  • Request example
Terminal window
curl -X POST '127.0.0.1:8848/nacos/v3/admin/ai/a2a' \
-d 'namespaceId=public' \
-d 'agentCard={"protocolVersion":"0.2.9","name":"GeoSpatial Route Planner Agent","description":"Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.","url":"https://georoute-agent.example.com/a2a/v1","preferredTransport":"JSONRPC","additionalInterfaces":[{"url":"https://georoute-agent.example.com/a2a/v1","transport":"JSONRPC"},{"url":"https://georoute-agent.example.com/a2a/grpc","transport":"GRPC"},{"url":"https://georoute-agent.example.com/a2a/json","transport":"HTTP+JSON"}],"provider":{"organization":"Example Geo Services Inc.","url":"https://www.examplegeoservices.com"},"iconUrl":"https://georoute-agent.example.com/icon.png","version":"1.2.0","documentationUrl":"https://docs.examplegeoservices.com/georoute-agent/api","capabilities":{"streaming":true,"pushNotifications":true,"stateTransitionHistory":false},"securitySchemes":{"google":{"type":"openIdConnect","openIdConnectUrl":"https://accounts.google.com/.well-known/openid-configuration"}},"security":[{"google":["openid","profile","email"]}],"defaultInputModes":["application/json","text/plain"],"defaultOutputModes":["application/json","image/png"],"skills":[{"id":"route-optimizer-traffic","name":"Traffic-Aware Route Optimizer","description":"Calculates the optimal driving route between two or more locations, taking into account real-time traffic conditions, road closures, and user preferences (e.g., avoid tolls, prefer highways).","tags":["maps","routing","navigation","directions","traffic"],"examples":["Plan a route from '\''1600 Amphitheatre Parkway, Mountain View, CA'\'' to '\''San Francisco International Airport'\'' avoiding tolls.","{\"origin\": {\"lat\": 37.422, \"lng\": -122.084}, \"destination\": {\"lat\": 37.7749, \"lng\": -122.4194}, \"preferences\": [\"avoid_ferries\"]}"],"inputModes":["application/json","text/plain"],"outputModes":["application/json","application/vnd.geo+json","text/html"]},{"id":"custom-map-generator","name":"Personalized Map Generator","description":"Creates custom map images or interactive map views based on user-defined points of interest, routes, and style preferences. Can overlay data layers.","tags":["maps","customization","visualization","cartography"],"examples":["Generate a map of my upcoming road trip with all planned stops highlighted.","Show me a map visualizing all coffee shops within a 1-mile radius of my current location."],"inputModes":["application/json"],"outputModes":["image/png","image/jpeg","application/json","text/html"]}],"supportsAuthenticatedExtendedCard":true,"signatures":[{"protected":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJrZXktMSIsImprdSI6Imh0dHBzOi8vZXhhbXBsZS5jb20vYWdlbnQvandrcy5qc29uIn0","signature":"QFdkNLNszlGj3z3u0YQGt_T9LixY3qtdQpZmsTdDHDe3fXV9y9-B3m2-XgCpzuhiLt8E0tV6HXoZKHv4GtHgKQ"}]}' \
-d 'registrationType=SERVICE'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "ok"
}

5.6. Delete AgentCard

Description

Use this API to delete an AgentCard hosted on Nacos.

Since

3.1.0

Request Method

DELETE

Authorization

Requires write permission for the corresponding namespace.

Request URL

/nacos/v3/admin/ai/a2a

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace to which the AgentCard belongs. Defaults to public.
agentNamestringYesAgentCard name
versionstringNoAgentCard version. If empty, details of the latest version are returned.

Response Data

The response body follows the Nacos open API unified response format. The table below describes only the response parameters in the data field.

NameTypeDescription
datastringAgentCard deletion result.

Examples

  • Request example
Terminal window
curl -X DELETE '127.0.0.1:8848/nacos/v3/admin/ai/a2a?namespaceId=public&agentName=GeoSpatial+Route+Planner+Agent&version=1.0.0'
  • Response example
{
"code" : 0,
"message" : "success",
"data" : "ok"
}

6. AI Prompt Management

6.1. Publish Prompt

Description

This API publishes a new Prompt version.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace. Defaults to public.
promptKeystringYesPrompt key.
versionstringYesVersion.
templatestringNoTemplate content.
commitMsgstringNoCommit message.
descriptionstringNoDescription.
bizTagsstringNoBusiness tags.
variablesstringNoPrompt template variable definitions as a JSON string.

Response Data

On success, the API returns the common response body with data set to true; on failure, it returns the Nacos OpenAPI common response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt' \
-d 'namespaceId=public' -d 'promptKey=my-prompt' -d 'version=1.0.0' -d 'template=hello'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

6.2. Delete Prompt

Description

This API deletes the specified Prompt.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.

Response Data

On success, the API returns the common response body with data set to true; on failure, it returns the Nacos OpenAPI common response format.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt?namespaceId=public&promptKey=my-prompt'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

6.3. Get Prompt Detail

Description

This API queries Prompt details by version or label.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/detail

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringNoVersion.
labelstringNoLabel.
md5stringNoContent MD5.

Response Data

The response body follows the Nacos OpenAPI common response format. data contains fields such as promptKey, version, template, commitMsg, and md5.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/detail?namespaceId=public&promptKey=my-prompt&version=1.0.0'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"version": "1.0.0",
"template": "",
"commitMsg": ""
}
}

6.4. Bind Label

Description

This API binds a label to the specified Prompt version.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/label

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
labelstringYesLabel name.
versionstringYesVersion.

Response Data

On success, the API returns the common response body with data set to true; on failure, it returns the Nacos OpenAPI common response format.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/label' \
-d 'namespaceId=public' -d 'promptKey=my-prompt' -d 'label=stable' -d 'version=1.0.0'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

6.5. Unbind Label

Description

This API unbinds a label from a Prompt.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/label

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
labelstringYesLabel name.

Response Data

On success, the API returns the common response body with data set to true; on failure, it returns the Nacos OpenAPI common response format.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/label?namespaceId=public&promptKey=my-prompt&label=stable'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

6.6. List Prompts

Description

This API queries Prompts by page.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/list

Request Parameters

NameTypeRequiredDescription
pageNointegerYesPage number.
pageSizeintegerYesNumber of records per page.
namespaceIdstringNoNamespace.
promptKeystringNoPrompt key filter.
searchstringNoSearch mode: blur or accurate.
bizTagsstringNoBusiness tags.

Response Data

The response body follows the Nacos OpenAPI common response format. data is a paginated object that contains fields such as totalCount, pageNumber, pagesAvailable, and pageItems.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/list?pageNo=1&pageSize=10&namespaceId=public&search=blur'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"totalCount": 1,
"pageNumber": 1,
"pagesAvailable": 1,
"pageItems": [
{
"promptKey": "my-prompt",
"description": ""
}
]
}
}

6.7. Get Prompt Metadata

Description

This API queries metadata of the specified Prompt.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/metadata

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.

Response Data

The response body follows the Nacos OpenAPI common response format. data contains fields such as promptKey, description, bizTags, latestVersion, versions, and labels.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/metadata?namespaceId=public&promptKey=my-prompt'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"promptKey": "my-prompt",
"description": "",
"bizTags": ""
}
}

6.8. Update Prompt Metadata

Description

This API updates Prompt metadata, such as description and business tags.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/metadata

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
descriptionstringNoDescription.
bizTagsstringNoBusiness tags.

Response Data

On success, the API returns the common response body with data set to true; on failure, it returns the Nacos OpenAPI common response format.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/metadata' \
-d 'namespaceId=public' -d 'promptKey=my-prompt' -d 'description=desc'
  • Response example
{
"code": 0,
"message": "success",
"data": true
}

6.9. List Prompt Versions

Description

This API queries versions of the specified Prompt by page.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/versions

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
pageNointegerYesPage number.
pageSizeintegerYesNumber of records per page.

Response Data

The response body follows the Nacos OpenAPI common response format. data is a paginated object that contains totalCount, pageNumber, pagesAvailable, and pageItems; each item contains fields such as version, commitMsg, and gmtModified.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/prompt/versions?namespaceId=public&promptKey=my-prompt&pageNo=1&pageSize=10'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"totalCount": 1,
"pageNumber": 1,
"pagesAvailable": 1,
"pageItems": [
{
"version": "1.0.0",
"commitMsg": ""
}
]
}
}

6.10. Update Prompt Business Tags

Description

This API updates Prompt business tags.

Since

3.2.1

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/biz-tags

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
bizTagsstringNoBusiness tags.

6.11. Update Prompt Description

Description

This API updates the Prompt description.

Since

3.2.1

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/description

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
descriptionstringYesDescription.

6.12. Create Prompt Draft

Description

This API creates a Prompt draft version, or recreates a draft from an existing version.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
basedOnVersionstringNoVersion to base the draft on.
targetVersionstringNoTarget version.
templatestringNoTemplate content.
variablesstringNoPrompt template variable definitions as a JSON string.
commitMsgstringNoCommit message.
descriptionstringNoDescription.
bizTagsstringNoBusiness tags.

6.13. Update Prompt Draft

Description

This API updates the current Prompt draft content.

Since

3.2.1

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
templatestringYesTemplate content.
variablesstringNoPrompt template variable definitions as a JSON string.
commitMsgstringNoCommit message.

6.14. Delete Prompt Draft

Description

This API deletes the current Prompt draft version.

Since

3.2.1

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.

6.15. Force Publish Prompt Version

Description

This API force-publishes a Prompt version while bypassing pipeline validation.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/force-publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringYesVersion number.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

6.16. Get Prompt Governance Details

Description

This API retrieves Prompt metadata, version governance information, and version summaries.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/governance

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.

6.17. Update Prompt Labels

Description

This API updates the runtime routing labels of a Prompt.

Since

3.2.1

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/labels

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
labelsstringYesLabel JSON string.

6.18. Offline Prompt Version

Description

This API takes a specified Prompt version offline.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/offline

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringYesVersion number.

6.19. Online Prompt Version

Description

This API brings a specified Prompt version online.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/online

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringYesVersion number.

6.20. Publish Prompt Version

Description

This API publishes an approved Prompt version.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringYesVersion number.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

6.21. Redraft Prompt Version

Description

This API converts a reviewed Prompt version back to a draft.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/redraft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringYesVersion number.

6.22. Submit Prompt Version for Review

Description

This API submits a Prompt version to the pipeline for review.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/submit

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringNoVersion number.

6.23. Get Prompt Version Details

Description

This API retrieves details of a specified Prompt version.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/version

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringNoVersion number.

6.24. Download Prompt Version

Description

This API downloads a specified Prompt version as a Markdown file.

Since

3.2.2

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/prompt/version/download

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
promptKeystringYesPrompt key.
versionstringNoVersion number.

7. AI Skills Management

7.1. Get Skill Details

Description

This API obtains the details of a specified skill by namespace and skill name.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.

Response Data

The response follows the Nacos open API unified response format. data contains fields such as name, description, instruction, resource, version, inputModes, and outputModes.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills?namespaceId=public&skillName=my-skill'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"name": "my-skill",
"description": "",
"version": "1.0.0",
"inputModes": [],
"outputModes": []
}
}

7.2. Create Skill Draft Version

Description

This API creates a draft version of a skill based on an existing version or a new SkillCard.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringNoSkill name.
basedOnVersionstringNoCreate the draft based on this version.
targetVersionstringNoTarget version.
skillCardstringNoSkill card JSON; required if basedOnVersion is not set

Response Data

On success, returns the unified response body with data as a string indicating the draft creation result. On failure, returns the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/draft' \
-d 'namespaceId=public' -d 'skillName=my-skill' -d 'basedOnVersion=1.0.0'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

7.3. Update Skill Draft Content

Description

This API updates the SkillCard content of the current skill draft version.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillCardstringYesSkill card JSON string containing complete Skill information
skillNamestringYesSkill name.

Response Data

On success, returns the unified response body with data as a string indicating the draft update result. On failure, returns the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/draft' \
-d 'namespaceId=public' -d 'skillName=my-skill' -d 'skillCard={}'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

7.4. Delete Skill

Description

This API deletes a skill from Nacos by namespace and skill name.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.

Response Data

On success, returns the unified response body with data as a string indicating the operation result, such as “ok”. On failure, returns the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills?namespaceId=public&skillName=my-skill'
  • Response example
{
"code": 0,
"message": "success",
"data": "ok"
}

7.5. List Skills

Description

This API filters and paginates the skill list by query conditions.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/list

Request Parameters

NameTypeRequiredDescription
pageNointegerYesPage number.
pageSizeintegerYesPage size.
filterableFormstringYesFilter condition form.
namespaceIdstringNoNamespace.
skillNamestringNoSkill name filter.
searchstringNoSearch mode: accurate or blur

Response Data

The response follows the Nacos open API unified response format. data is a pagination structure containing totalCount, pageNumber, pagesAvailable, and pageItems. Each item includes fields such as name, description, and updateTime.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/list?pageNo=1&pageSize=100&namespaceId=public&search=blur'
  • Response example
{
"code": 0,
"message": "success",
"data": {
"totalCount": 1,
"pageNumber": 1,
"pagesAvailable": 1,
"pageItems": [
{
"name": "my-skill",
"description": "",
"version": "1.0.0"
}
]
}
}

7.6. Upload Skill from ZIP File

Description

This API uploads a ZIP package in multipart/form-data format and registers the skill. The file must be a valid skill package.

Since

3.2.2

Request Method

POST

The request body type is multipart/form-data, and parameters are placed in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/upload

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID. Defaults to public.
overwritebooleanNoWhether to overwrite an existing skill with the same name.
targetVersionstringNoTarget version after upload.
commitMsgstringNoCommit message.
filefileNoZIP file containing skill package.

Response Data

On success, returns the unified response body with data as the uploaded skill name. On failure, returns the Nacos open API unified response format.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/upload' \
-F "file=@skill.zip" -F "namespaceId=public" -F "overwrite=false" -F "targetVersion=1.0.0" -F "commitMsg=initial"
  • Response example
{
"code": 0,
"message": "success",
"data": "uploaded-skill-name"
}

7.7. Delete Skill Draft Version

Description

This API deletes the current draft version of a specified skill.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.

7.8. Update Skill Business Tags

Description

This API updates the business tag list of a skill without changing the version status.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/biz-tags

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
bizTagsstringYesBusiness tags.

7.9. Update Skill Version Labels

Description

This API updates the version routing labels of a skill, such as latest.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/labels

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
labelsstringYesLabel JSON string.

7.10. Skill Version Online, Offline, and Publish Operations

Description

The following APIs are used to control the skill version publishing workflow.

Request Parameters

MethodRequest URLKey parameters
POST/nacos/v3/admin/ai/skills/offlinenamespaceId, skillName, scope, version
POST/nacos/v3/admin/ai/skills/onlinenamespaceId, skillName, scope, version
POST/nacos/v3/admin/ai/skills/publishnamespaceId, skillName, version, updateLatestLabel
PUT/nacos/v3/admin/ai/skills/scopenamespaceId, skillName, scope
POST/nacos/v3/admin/ai/skills/submitnamespaceId, skillName, version

7.11. Get Skill Version Details

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/admin/ai/skills/version

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
versionstringNoVersion number.

7.12. Download Skill Version ZIP Package

Since

3.2.0

Request Method

GET

Request URL

/nacos/v3/admin/ai/skills/version/download

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
versionstringNoVersion number.

7.13. Offline Skill

Description

This interface allows executing an offline operation on a specific version or the entire skill, making it not callable.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/offline

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
skillNamestringYesSkill name.
scopestringNoUse ‘skill’ for skill-level offline; otherwise version-level
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/offline' -d "namespaceId=namespaceId&skillName=skillName&scope=scope&version=version"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

7.14. Online Skill

Description

This interface allows executing an online operation on a specific version or the entire skill, making it callable.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/online

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
skillNamestringYesSkill name.
scopestringNoUse ‘skill’ for skill-level online; otherwise version-level
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/online' -d "namespaceId=namespaceId&skillName=skillName&scope=scope&version=version"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

7.15. Publish Skill Version

Description

This interface allows publishing an approved skill version.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
skillNamestringYesSkill name.
versionstringYesVersion identifier.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/publish' -d "namespaceId=namespaceId&skillName=skillName&version=version&updateLatestLabel=updateLatestLabel"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

7.16. Update Skill Visibility Scope

Description

This interface allows setting the visibility scope of a skill to PUBLIC or PRIVATE.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/scope

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
skillNamestringYesSkill name.
scopestringYesPUBLIC or PRIVATE

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/scope' -d "namespaceId=namespaceId&skillName=skillName&scope=scope"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

7.17. Submit Skill Version for Review

Description

This interface allows submitting a skill draft version to the pipeline for review.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/submit

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
skillNamestringYesSkill name.
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/submit' -d "namespaceId=namespaceId&skillName=skillName&version=version"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

7.18. Force Publish Skill Version

Description

This API force-publishes a Skill version while bypassing pipeline validation.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/force-publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
versionstringYesVersion number.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

7.19. Redraft Skill Version

Description

This API converts a reviewed Skill version back to a draft.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/redraft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
skillNamestringYesSkill name.
versionstringYesVersion number.

7.20. Batch Upload Skills

Description

This API batch uploads Skills from a ZIP file that contains multiple Skill subdirectories.

Since

3.2.2

Request Method

POST

Request body type: multipart/form-data. Parameters are sent in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/skills/upload/batch

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
overwritebooleanNoWhether to overwrite existing skills with the same names.
filefileNoZIP package containing multiple Skill subdirectories.

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/skills/upload/batch' \
-F "file=@skills.zip" -F "namespaceId=public" -F "overwrite=false"

8. AgentSpec Management

8.1. Get AgentSpec

Description

This interface allows getting the latest published version of an AgentSpec by namespace and name.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.data.namespaceIdstring-
data.data.namestring-
data.data.descriptionstring-
data.data.updateTimeinteger-
data.data.enableboolean-
data.data.bizTagsstring-
data.data.fromstring-
data.data.scopestring-
data.data.labelsobject-
data.data.editingVersionstring-
data.data.reviewingVersionstring-
data.data.onlineCntinteger-
data.data.downloadCountinteger-
data.data.versionsarray-

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs?namespaceId=public&agentSpecName=my-agentspec'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.2. Delete AgentSpec

Description

This interface allows deleting an AgentSpec and all its versions by namespace and name.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs?namespaceId=public&agentSpecName=my-agentspec'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.3. Update AgentSpec Business Tags

Description

This interface allows updating the business tag list of an AgentSpec without changing version status.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/biz-tags

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
bizTagsstringYesBusiness tags; pass multiple tags using the agreed format.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/biz-tags' -d "namespaceId=public&agentSpecName=my-agentspec&bizTags=demo"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.4. Create AgentSpec Draft Version

Description

This interface allows creating an AgentSpec draft version based on an existing version.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
basedOnVersionstringNoBase version used to create the draft.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/draft' -d "namespaceId=public&agentSpecName=my-agentspec&basedOnVersion=1.0.0"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.5. Update AgentSpec Draft Content

Description

This interface allows updating the card content of the current AgentSpec draft version.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringNoAgentSpec name.
agentSpecCardstringYesAgentSpec card JSON string containing complete AgentSpec information

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/draft' -d "namespaceId=public&agentSpecName=my-agentspec&agentSpecCard={}"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.6. Delete AgentSpec Draft Version

Description

This interface allows deleting the current draft version of a specified AgentSpec.

Since

3.2.0

Request Method

DELETE

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/draft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X DELETE 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/draft?namespaceId=public&agentSpecName=my-agentspec'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.7. Update AgentSpec Version Labels

Description

This interface allows updating AgentSpec version routing labels (e.g. latest label) without changing version status.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/labels

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
labelsstringYesVersion labels, usually as a JSON string.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/labels' -d "namespaceId=public&agentSpecName=my-agentspec&labels={\"latest\":\"1.0.0\"}"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.8. List AgentSpecs

Description

This interface allows paginated listing of AgentSpecs by namespace and name.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/list

Request Parameters

NameTypeRequiredDescription
pageNointegerYesPage number, starting from 1.
pageSizeintegerYesNumber of items per page.
filterableFormstringYesFilter condition form.
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringNoAgentSpec name.
searchstringNoSearch mode: accurate or blur.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/list?pageNo=1&pageSize=20&namespaceId=public&agentSpecName=my-agentspec&search=accurate'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.9. Offline AgentSpec

Description

This interface allows executing an offline operation on a specific version or the entire AgentSpec, making it not callable.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/offline

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
scopestringNoUse ‘agentspec’ for agentspec-level offline; otherwise version-level
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/offline' -d "namespaceId=public&agentSpecName=my-agentspec&scope=agentspec&version=1.0.0"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.10. Online AgentSpec

Description

This interface allows executing an online operation on a specific version or the entire AgentSpec, making it callable.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/online

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
scopestringNoUse ‘agentspec’ for agentspec-level online; otherwise version-level
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/online' -d "namespaceId=public&agentSpecName=my-agentspec&scope=agentspec&version=1.0.0"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.11. Publish AgentSpec Version

Description

This interface allows publishing an approved AgentSpec version.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringYesVersion identifier.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/publish' -d "namespaceId=public&agentSpecName=my-agentspec&version=1.0.0&updateLatestLabel=true"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.12. Update AgentSpec Visibility Scope

Description

This interface allows setting the visibility scope of an AgentSpec to PUBLIC or PRIVATE.

Since

3.2.0

Request Method

PUT

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/scope

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
scopestringYesPUBLIC or PRIVATE

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X PUT 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/scope' -d "namespaceId=public&agentSpecName=my-agentspec&scope=PUBLIC"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.13. Submit AgentSpec Version for Review

Description

This interface allows submitting an AgentSpec draft version to the pipeline for review.

Since

3.2.0

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/submit

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/submit' -d "namespaceId=public&agentSpecName=my-agentspec&version=1.0.0"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.14. Upload AgentSpec

Description

This interface allows uploading a ZIP-packaged AgentSpec; the package is parsed and the AgentSpec is created or updated.

Since

3.2.0

Request Method

POST

Request body type: multipart/form-data. Parameters are sent in the request body.

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/upload

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
overwritebooleanNoWhether to overwrite an existing resource with the same name.
filefileNoZIP file containing AgentSpec package.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.datastring-

Examples

  • Request example
Terminal window
curl -X POST 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/upload' -F "file=@agentspec.zip" -F "namespaceId=public" -F "overwrite=false"
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.15. Get AgentSpec Version

Description

This interface allows getting a specific version of an AgentSpec by namespace, name, and version.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/version

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringNoVersion identifier.

Response Data

NameTypeDescription
data.codeinteger-
data.messagestring-
data.data.namespaceIdstring-
data.data.namestring-
data.data.descriptionstring-
data.data.bizTagsstring-
data.data.contentstring-
data.data.resourceobject-

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/agentspecs/version?namespaceId=public&agentSpecName=my-agentspec&version=1.0.0'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

8.16. Force Publish AgentSpec Version

Description

This API force-publishes an AgentSpec version while bypassing pipeline validation.

Since

3.2.1

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/force-publish

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringYesVersion number.
updateLatestLabelbooleanNoWhether to update the latest label after publishing.

8.17. Redraft AgentSpec Version

Description

This API converts a reviewed AgentSpec version back to a draft.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/redraft

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringYesVersion number.

8.18. Get AgentSpec Version Metadata

Description

This API retrieves metadata for a specified AgentSpec version without reading resource file content.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/agentspecs/version/meta

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace ID, default is public.
agentSpecNamestringYesAgentSpec name.
versionstringNoVersion number.

9. Pipeline Execution Records

9.1. List Pipeline Execution Records

Description

This API lists Pipeline execution records by resource type, resource name, namespace, and version with pagination.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/pipelines

Request Parameters

NameTypeRequiredDescription
resourceTypestringYesResource type.
resourceNamestringNoResource name.
namespaceIdstringNoNamespace.
versionstringNoResource version.
pageNointegerYesPage number.
pageSizeintegerYesPage size.

Response Data

NameTypeDescription
data.codeintegerResponse code.
data.messagestringResponse message.
data.datastringPaginated Pipeline execution records.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/pipelines?resourceType=agentspec&resourceName=my-agentspec&namespaceId=public&version=1.0.0&pageNo=1&pageSize=20'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

9.2. Get Pipeline Execution Record Details

Description

This API retrieves Pipeline execution record details by Pipeline ID.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/pipelines/{pipelineId}

Request Parameters

NameTypeRequiredDescription
pipelineIdstringYesPipeline ID.

Response Data

NameTypeDescription
data.codeintegerResponse code.
data.messagestringResponse message.
data.data.executionIdstringPipeline execution ID.
data.data.resourceTypestringResource type.
data.data.resourceNamestringResource name.
data.data.namespaceIdstringNamespace.
data.data.versionstringResource version.
data.data.statusstringExecution status.
data.data.pipelinearrayPipeline stage information.
data.data.createTimeintegerCreation time.
data.data.updateTimeintegerUpdate time.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/pipelines/pipeline-001'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

9.3. List Pipeline Execution Records

Description

This API lists Pipeline execution records by resource type, resource name, namespace, and version with pagination.

Since

3.2.0

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/pipelines/list

Request Parameters

NameTypeRequiredDescription
resourceTypestringYesResource type.
resourceNamestringNoResource name.
namespaceIdstringNoNamespace.
versionstringNoResource version.
pageNointegerYesPage number.
pageSizeintegerYesPage size.

Response Data

NameTypeDescription
data.codeintegerResponse code.
data.messagestringResponse message.
data.datastringPaginated Pipeline execution records.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/pipelines/list?resourceType=agentspec&resourceName=my-agentspec&namespaceId=public&version=1.0.0&pageNo=1&pageSize=20'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

9.4. Get Pipeline Execution Record Details

Description

This API retrieves Pipeline execution record details by Pipeline ID.

Since

3.2.1

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/pipelines/detail

Request Parameters

NameTypeRequiredDescription
pipelineIdstringYesPipeline ID.

Response Data

NameTypeDescription
data.codeintegerResponse code.
data.messagestringResponse message.
data.data.executionIdstringPipeline execution ID.
data.data.resourceTypestringResource type.
data.data.resourceNamestringResource name.
data.data.namespaceIdstringNamespace.
data.data.versionstringResource version.
data.data.statusstringExecution status.
data.data.pipelinearrayPipeline stage information.
data.data.createTimeintegerCreation time.
data.data.updateTimeintegerUpdate time.

Examples

  • Request example
Terminal window
curl -X GET 'http://127.0.0.1:8848/nacos/v3/admin/ai/pipelines/detail?pipelineId=pipeline-001'
  • Response example
{
"code": 0,
"message": "success",
"data": {}
}

10. AI Resource Import

10.1. List AI Resource Import Sources

Description

This API lists the currently configured AI resource import sources.

Since

3.2.2

Request Method

GET

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/import/sources

Request Parameters

NameTypeRequiredDescription
resourceTypestringNoResource type.

10.2. Search External AI Resources

Description

This API searches importable external AI resources from a specified import source.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/import/search

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
resourceTypestringYesResource type.
sourceIdstringYesImport source ID.
querystringNoSearch keyword.
cursorstringNoPagination cursor.
limitintegerNoResult limit.
optionsstringNoExtension options as a JSON string.

10.3. Validate AI Resource Import Items

Description

This API validates whether selected external AI resources can be imported.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/import/validate

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
resourceTypestringYesResource type.
sourceIdstringYesImport source ID.
selectedItemsstringYesResource items to validate as a JSON string.
overwriteExistingbooleanNoWhether to overwrite existing resources.
optionsstringNoExtension options as a JSON string.

10.4. Execute AI Resource Import

Description

This API imports the selected external AI resources.

Since

3.2.2

Request Method

POST

Authorization

Administrator permissions required.

Request URL

/nacos/v3/admin/ai/import/execute

Request Parameters

NameTypeRequiredDescription
namespaceIdstringNoNamespace.
resourceTypestringYesResource type.
sourceIdstringYesImport source ID.
selectedItemsstringYesResource items to import as a JSON string.
overwriteExistingbooleanNoWhether to overwrite existing resources.
skipInvalidbooleanNoWhether to skip invalid resource items.
validationTokenstringNoValidation token.
optionsstringNoExtension options as a JSON string.