Querying Chaincode Installation Information
Function
This API is used to query the information about chaincode installation on peers.
URI
GET /v2/agent/apis/chaincode/install
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
chaincode_name |
Yes |
String |
Chaincode name, which can contain 6 to 25 including lowercase letters and digits, and must start with a letter. Minimum: 6 Maximum: 25 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
result |
Array of PeerInstallInfo objects |
Information about chaincode installation on peers. |
Parameter |
Type |
Description |
---|---|---|
org_name |
String |
Name of the organization to which the peer belongs. |
org_id |
String |
ID of the organization to which the peer belongs. |
peer_name |
String |
Peer name. |
peer_id |
String |
Peer ID. |
install_status |
String |
Chaincode installation result, which can be installed or uninstalled. |
version |
String |
Chaincode version. |
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/chaincode/install?chaincode_name=chaincode
Example Responses
Status code: 200
Success
{ "result" : [ { "org_name" : "org1", "org_id" : "65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3", "peer_name" : "peer-0", "peer_id" : "peer-65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3-0.peer-65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3.default.svc.cluster.local", "install_status" : "uninstalled", "version" : "" }, { "org_name" : "org1", "org_id" : "65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3", "peer_name" : "peer-1", "peer_id" : "peer-65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3-1.peer-65cfb1c760f24058c865ffcfd8ce1cdb690bf2a3.default.svc.cluster.local", "install_status" : "installed", "version" : "1.0" } ] }
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