查询实例列表
GET
/nacos/v1/ns/instance/list查询服务下的实例列表
Request
Query Params
serviceName
string
required
服务名
Example:
{{serviceName1}}
groupName
string
optional
分组名
namespaceId
string
optional
命名空间ID
clusters
string
optional
集群名称
healthyOnly
string
optional
是否只返回健康实例
Request samples
Responses
成功(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
name
string
required
groupName
string
required
clusters
string
required
cacheMillis
integer
required
hosts
array [object {14}]
required
instanceId
string
optional
ip
string
optional
port
integer
optional
weight
integer
optional
healthy
boolean
optional
enabled
boolean
optional
ephemeral
boolean
optional
clusterName
string
optional
serviceName
string
optional
metadata
object
optional
instanceHeartBeatInterval
integer
optional
instanceIdGenerator
string
optional
instanceHeartBeatTimeOut
integer
optional
ipDeleteTimeout
integer
optional
lastRefTime
integer
required
checksum
string
required
allIPs
boolean
required
reachProtectionThreshold
boolean
required
valid
boolean
required
Example
{
"name": "DEFAULT_GROUP@@nacos.test.1",
"groupName": "DEFAULT_GROUP",
"clusters": "",
"cacheMillis": 10000,
"hosts": [
{
"instanceId": "10.10.10.10#8888#DEFAULT#DEFAULT_GROUP@@nacos.test.1",
"ip": "10.10.10.10",
"port": 8888,
"weight": 1,
"healthy": false,
"enabled": true,
"ephemeral": false,
"clusterName": "DEFAULT",
"serviceName": "DEFAULT_GROUP@@nacos.test.1",
"metadata": {},
"instanceHeartBeatInterval": 5000,
"instanceIdGenerator": "simple",
"instanceHeartBeatTimeOut": 15000,
"ipDeleteTimeout": 30000
}
],
"lastRefTime": 1528787794594,
"checksum": "",
"allIPs": false,
"reachProtectionThreshold": false,
"valid": true
}
Last modified: 2 年前