调用ListAnsInstances接口查看实例详情。

请求参数

名称 类型 是否必选 示例值 描述
Action String ListAnsInstances

系统规定参数,取值:ListAnsInstances。

PageNum Integer 1

页码

PageSize Integer 10

每页展示实例数

ServiceName String name

服务名称

RequestPars String {}

扩展请求参数,JSON格式。

ClusterId String mse-09k1q110q01

集群ID

GroupName String test

联系人组名称

NamespaceId String 12233****

命名空间ID

ClusterName String mse-7413****

集群别名

返回数据

名称 类型 示例值 描述
Data Array of NacosAnsInstance

实例概览信息

App String 111

应用名

ClusterName String DEFAULT

集群名称

DatumKey String 30.5.XX.XX:unknown:DEFAULT

基准键

DefaultKey String 30.5.XX.XX:unknown

缺省键

Enabled Boolean true

生效状态

Ephemeral Boolean true

临时节点

FailCount Integer 0

失败计数

Healthy Boolean true

实例在线状态

InstanceHeartBeatInterval Integer 5000

实例心跳间隔,单位:秒

InstanceHeartBeatTimeOut Integer 15000

实例修改时间

InstanceId String 30.5.XX.XX#0#DEFAULT#DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService

实例ID

Ip String 30.5.XX.XX

公网IP

IpDeleteTimeout Integer 30000

IP删除超时

LastBeat Long 1575357249889

最近一次的心跳时间

Marked Boolean true

标记

Metadata Map 111

元数据

OkCount Integer 0

成功计数

Port Integer 8080

端口号

ServiceName String DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService::

服务名称

Weight Integer 1

权重

ErrorCode String mse-100-000

错误码

HttpCode String 202

HTTP状态码

Message String 请求处理成功

信息

PageNumber Integer 1

页码

PageSize Integer 10

每页展示实例数

RequestId String 52BA6DA6-A702-4362-A32F-DFF79655****

请求ID

Success Boolean true

请求结果

TotalCount Integer 7

实例总数

示例

请求示例

http(s)://[Endpoint]/?Action=ListAnsInstances
&PageNum=1
&PageSize=10
&ServiceName=name
&<公共请求参数>

正常返回示例

XML 格式

<code>200</code>
<data>
    <HttpCode>202</HttpCode>
    <TotalCount>1</TotalCount>
    <Message>请求处理成功</Message>
    <RequestId>52BA6DA6-A702-4362-A32F-DFF796555A39</RequestId>
    <Data>
        <InstanceId>30.5.121.33#0#DEFAULT#DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService::</InstanceId>
        <Ip>30.5.121.33</Ip>
        <Port>0</Port>
        <Metadata>
            <side>consumer</side>
            <methods>sayHello</methods>
            <lazy>false</lazy>
            <release>2.7.3</release>
            <dubbo>2.0.2</dubbo>
            <pid>62852</pid>
            <check>false</check>
            <interface>com.alibaba.edas.IHelloService</interface>
            <path>com.alibaba.edas.IHelloService</path>
            <protocol>consumer</protocol>
            <application>demo-consumer</application>
            <sticky>false</sticky>
            <category>consumers</category>
            <timestamp>1575338711996</timestamp>
        </Metadata>
        <Enabled>true</Enabled>
        <Weight>1</Weight>
        <DatumKey>30.5.121.33:unknown:DEFAULT</DatumKey>
        <OkCount>0</OkCount>
        <ServiceName>DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService::</ServiceName>
        <FailCount>0</FailCount>
        <ClusterName>DEFAULT</ClusterName>
        <LastBeat>1575357249889</LastBeat>
        <DefaultKey>30.5.121.33:unknown</DefaultKey>
        <InstanceHeartBeatTimeOut>15000</InstanceHeartBeatTimeOut>
        <Ephemeral>true</Ephemeral>
        <IpDeleteTimeout>30000</IpDeleteTimeout>
        <Marked>false</Marked>
        <Healthy>true</Healthy>
        <InstanceHeartBeatInterval>5000</InstanceHeartBeatInterval>
    </Data>
    <ErrorCode>mse-100-000</ErrorCode>
    <Success>true</Success>
</data>
<requestId>52BA6DA6-A702-4362-A32F-DFF796555A39</requestId>
<successResponse>true</successResponse>

JSON 格式

{"code":"200","data":{"HttpCode":"202","TotalCount":1,"Message":"请求处理成功","RequestId":"52BA6DA6-A702-4362-A32F-DFF796555A39","Data":[{"InstanceId":"30.5.121.33#0#DEFAULT#DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService::","Ip":"30.5.121.33","Port":0,"Metadata":{"side":"consumer","methods":"sayHello","lazy":"false","release":"2.7.3","dubbo":"2.0.2","pid":"62852","check":"false","interface":"com.alibaba.edas.IHelloService","path":"com.alibaba.edas.IHelloService","protocol":"consumer","application":"demo-consumer","sticky":"false","category":"consumers","timestamp":"1575338711996"},"Enabled":true,"Weight":1,"DatumKey":"30.5.121.33:unknown:DEFAULT","OkCount":0,"ServiceName":"DEFAULT_GROUP@@consumers:com.alibaba.edas.IHelloService::","FailCount":0,"ClusterName":"DEFAULT","LastBeat":1575357249889,"DefaultKey":"30.5.121.33:unknown","InstanceHeartBeatTimeOut":15000,"Ephemeral":true,"IpDeleteTimeout":30000,"Marked":false,"Healthy":true,"InstanceHeartBeatInterval":5000}],"ErrorCode":"mse-100-000","Success":true},"requestId":"52BA6DA6-A702-4362-A32F-DFF796555A39","successResponse":true}

错误码

访问错误中心查看更多错误码。