Querying Peers
Function
Querying Peers
URI
GET /v2/agent/apis/peers
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
peers |
Map<String,PeerInfo> |
The key is the peer domain name, and value is the peer details. |
Parameter |
Type |
Description |
---|---|---|
org_name |
String |
Organization name. |
org_id |
String |
Organization ID. |
peer_name |
String |
Peer name. |
peer_id |
String |
Peer ID. |
status |
String |
Peer status. |
channels |
Array of strings |
Peers where the chaincode is not instantiated. |
url |
String |
URL of the peer. |
peer |
String |
Internal domain name of the peer. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_message |
String |
Error description. |
error_msg |
String |
Error description. |
Example Requests
GET https://192.168.0.90:30603/v2/agent/apis/peers
Example Responses
Status code: 200
Success
{ "peers" : { "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-0.peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5.default.svc.cluster.local" : { "org_name" : "organization", "org_id" : "a9e940a9e947e8af0c9c2fb98d0129e56210d6b5", "peer" : "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-0.peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5.default.svc.cluster.local", "peer_name" : "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-0", "url" : "100.95.146.117:30610", "channels" : [ "channel" ], "status" : "running" }, "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-1.peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5.default.svc.cluster.local" : { "org_name" : "organization", "org_id" : "a9e940a9e947e8af0c9c2fb98d0129e56210d6b5", "peer" : "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-1.peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5.default.svc.cluster.local", "peer_name" : "peer-a9e940a9e947e8af0c9c2fb98d0129e56210d6b5-1", "url" : "100.95.146.117:30611", "channels" : [ "channel" ], "status" : "running" } } }
Status code: 400
Bad Request
{ "error_code" : "BCS.4000013", "error_message" : "request body is too large" }
Status Codes
Status Code |
Description |
---|---|
200 |
Success |
400 |
Bad Request |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot