Lattice Hub Docs
Compatibility

Nacos compatibility

service-nacos (default 8848 / gRPC 9848) adapted Nacos HTTP v1 APIs and call examples.

Plugin: service-nacos. Default HTTP 8848; if unset, gRPC listens on HTTP port + 1000 (default 9848) for Nacos 2.x clients. This page lists the mounted HTTP v1 surface.

Mapping

NacosPole
public / empty namespaceId (or config tenant)Default namespace (often default, overridable via defaultNamespace)
GROUP@@serviceName@@ maps to __ in the Pole service name; DEFAULT_GROUP prefix may be omitted

HTTP parameters are primarily URL query (QueryParameter). Put values in the query string; do not assume form bodies always work.

API list

Naming — /nacos/v1/ns

MethodPathNotes
POST/nacos/v1/ns/instanceRegister
PUT/nacos/v1/ns/instanceUpdate
DELETE/nacos/v1/ns/instanceDeregister
PUT/nacos/v1/ns/instance/beatHeartbeat
GET/nacos/v1/ns/instance/listInstance list / discover
GET/nacos/v1/ns/service/listPaginated services
GET/nacos/v1/ns/operator/metricsHealth ({"status":"UP"})

Register requires serviceName, ip, port. Optional: namespaceId, clusterName/cluster, weight, healthy, enabled, metadata, …. Implementation keeps ephemeral=true.

Config — /nacos/v1/cs/configs

MethodPathNotes
POST/nacos/v1/cs/configsPublish (query; import=true for zip import)
GET/nacos/v1/cs/configsGet config body (often plain-text content)
DELETE/nacos/v1/cs/configsDelete
POST/nacos/v1/cs/configs/listenerLong-poll watch

Publish/get/delete need dataId, group; optional tenant, content (publish), appName, …. Listener may use header Long-Pulling-Timeout (ms).

Auth

MethodPathNotes
POST/nacos/v1/auth/loginLogin (compatibility shape)
POST/nacos/v1/auth/users/loginSame

Pass the control-plane token via query accessToken or Authorization. The compatibility login response is not a full Nacos JWT—follow unified control-plane auth.

Debug (ops)

MethodPath
GET/nacos/v1/debug/2.x/connections
GET/nacos/v1/debug/2.x/connections/detail?conn_id=

Call examples

BASE=http://127.0.0.1:8848
SVC='DEFAULT_GROUP@@demo'

# Register
curl -i -X POST "$BASE/nacos/v1/ns/instance?serviceName=$SVC&ip=10.0.0.2&port=8080&namespaceId=public&weight=1&healthy=true&enabled=true"

# Heartbeat
curl -s -X PUT "$BASE/nacos/v1/ns/instance/beat?serviceName=$SVC&ip=10.0.0.2&port=8080&namespaceId=public"

# Discover
curl -s "$BASE/nacos/v1/ns/instance/list?serviceName=$SVC&namespaceId=public"

# Publish / get config
curl -s -X POST "$BASE/nacos/v1/cs/configs?dataId=app.properties&group=DEFAULT_GROUP&tenant=&content=a%3D1"
curl -s "$BASE/nacos/v1/cs/configs?dataId=app.properties&group=DEFAULT_GROUP&tenant="

# Health
curl -s "$BASE/nacos/v1/ns/operator/metrics"

Boundaries

  • Common Nacos OpenAPI subset only—not a full Nacos Server/Console.
  • Nacos 2.x SDKs usually speak gRPC (9848); do not validate 2.x clients with HTTP 8848 alone.
  • No full naming admin CRUD or native cluster/auth semantics; unmounted paths such as /nacos/serverlist are not available APIs.
  • Prefer native HTTP OpenAPI config / gRPC for new publishers.

Back to Compatibility overview.

On this page