查询一条蚂蚁区块链的节点信息列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

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

系统规定参数。取值:DescribeAntChainNodes

RegionId String cn-hangzhou

地域ID

AntChainId String 1q8B5R9p

区块链ID

返回数据

名称 类型 示例值 描述
RequestId String BA9738FE-F427-44FD-A1D9-EB4EFB43075A

请求ID

Result Array of Object ["nodeState","publicKey","nodeType","nodeId","endpoints"]

请求结果:

  • publicKey:节点公钥
  • nodeId:节点ID
  • nodestate:节点状态,取值 2, 唯一状态,无其他状态值
  • endpoints:客户端接入地址
  • nodeType:1 共识节点,2 非共识节点

示例

请求示例

http(s)://[Endpoint]/?Action=DescribeAntChainNodes
&<公共请求参数>

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAntChainNodesResponse>
    <code>200</code>
    <data>
        <RequestId>BA9738FE-F427-44FD-A1D9-EB4EFB43075A</RequestId>
        <Result>
            <endpoints>
                <port>18130</port>
                <ip>47.101.74.49</ip>
            </endpoints>
            <nodeState>2</nodeState>
            <publicKey>0x9934CFA59EE6CB241AEC242411BCD67D1DA8E07095FFC49DCB1102F2625031EBE9636CD6C392F675214E406C9AA55CD7F8A9EA11BD54C93258FA93BED717EACD</publicKey>
            <nodeType>1</nodeType>
            <nodeId>0x79233E99716D28740AA00CFE0C1274C34C9E5511EE910C227999683EAF749553</nodeId>
        </Result>
        <Result>
            <endpoints>
                <port>18131</port>
                <ip>47.101.74.49</ip>
            </endpoints>
            <nodeState>2</nodeState>
            <publicKey>0x63F4F303751FB86866718A4C797CE4CD8DDBECCB2E113D5CB9B41818C6C549FEA9E559601916F0F4BDCABDC16C170ECAFA0525C8345490161124EC8386F39B93</publicKey>
            <nodeType>1</nodeType>
            <nodeId>0x9E953C89ADA2E927F7EAE866D2F26828B330D44DD17FEA84195B902B1AD1D1B1</nodeId>
        </Result>
        <Result>
            <endpoints>
                <port>18132</port>
                <ip>47.101.74.49</ip>
            </endpoints>
            <nodeState>2</nodeState>
            <publicKey>0x1143C35FEFF1EB151AEB77C19A6ECC6FFD6BA13AA1913C60A9ADACA08AA6CB51A555ACF6E3E6B658142EB464EF2199AE41CA0EC5ACEB6514B5F56E2D2395CE78</publicKey>
            <nodeType>1</nodeType>
            <nodeId>0x77AD62D5041B92617488A0FDD8E341C06352344FA09F614AD7FDF616C1936B92</nodeId>
        </Result>
        <Result>
            <endpoints>
                <port>18133</port>
                <ip>47.101.74.49</ip>
            </endpoints>
            <nodeState>2</nodeState>
            <publicKey>0xCD15C9C87DAB460C2F4AE48752E98AF023B8810777CAAA563E045EF04F714A8D2934998CAC00F462C81EB23B3816D39E07B81B49695FEA827342FDCEA982E3B6</publicKey>
            <nodeType>1</nodeType>
            <nodeId>0x3F6355C92FB81904A1D9FD6E7781415A2B4455704BCFE2A8A0466302BD8EA5C8</nodeId>
        </Result>
    </data>
    <requestId>BA9738FE-F427-44FD-A1D9-EB4EFB43075A</requestId>
    <successResponse>true</successResponse>
</DescribeAntChainNodesResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "code" : "200",
  "data" : {
    "RequestId" : "BA9738FE-F427-44FD-A1D9-EB4EFB43075A",
    "Result" : [ {
      "endpoints" : [ {
        "port" : "18130",
        "ip" : "47.101.74.49"
      } ],
      "nodeState" : 2,
      "publicKey" : "0x9934CFA59EE6CB241AEC242411BCD67D1DA8E07095FFC49DCB1102F2625031EBE9636CD6C392F675214E406C9AA55CD7F8A9EA11BD54C93258FA93BED717EACD",
      "nodeType" : 1,
      "nodeId" : "0x79233E99716D28740AA00CFE0C1274C34C9E5511EE910C227999683EAF749553"
    }, {
      "endpoints" : [ {
        "port" : "18131",
        "ip" : "47.101.74.49"
      } ],
      "nodeState" : 2,
      "publicKey" : "0x63F4F303751FB86866718A4C797CE4CD8DDBECCB2E113D5CB9B41818C6C549FEA9E559601916F0F4BDCABDC16C170ECAFA0525C8345490161124EC8386F39B93",
      "nodeType" : 1,
      "nodeId" : "0x9E953C89ADA2E927F7EAE866D2F26828B330D44DD17FEA84195B902B1AD1D1B1"
    }, {
      "endpoints" : [ {
        "port" : "18132",
        "ip" : "47.101.74.49"
      } ],
      "nodeState" : 2,
      "publicKey" : "0x1143C35FEFF1EB151AEB77C19A6ECC6FFD6BA13AA1913C60A9ADACA08AA6CB51A555ACF6E3E6B658142EB464EF2199AE41CA0EC5ACEB6514B5F56E2D2395CE78",
      "nodeType" : 1,
      "nodeId" : "0x77AD62D5041B92617488A0FDD8E341C06352344FA09F614AD7FDF616C1936B92"
    }, {
      "endpoints" : [ {
        "port" : "18133",
        "ip" : "47.101.74.49"
      } ],
      "nodeState" : 2,
      "publicKey" : "0xCD15C9C87DAB460C2F4AE48752E98AF023B8810777CAAA563E045EF04F714A8D2934998CAC00F462C81EB23B3816D39E07B81B49695FEA827342FDCEA982E3B6",
      "nodeType" : 1,
      "nodeId" : "0x3F6355C92FB81904A1D9FD6E7781415A2B4455704BCFE2A8A0466302BD8EA5C8"
    } ]
  },
  "requestId" : "BA9738FE-F427-44FD-A1D9-EB4EFB43075A",
  "successResponse" : true
}

错误码

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