Listing Installed Chaincodes
Function
This API is used to list installed chaincodes.
URI
GET /v2/agent/apis/chaincodes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Offset to start querying the chaincode list. The default value is 0. |
limit |
No |
Integer |
Number of listed chaincodes. The default value is 10. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of chaincodes. |
chaincodes |
Array of ChaincodeInfo objects |
Chaincodes. |
Parameter |
Type |
Description |
---|---|---|
chaincode_name |
String |
Chaincode name. |
chaincode_language |
String |
Chaincode programming language. |
update_time |
String |
Chaincode update time. |
chaincode_version |
String |
Chaincode version. Separate multiple chaincode versions with commas (,). |
install_org_infos |
Array of PeerInfo objects |
Chaincode installation information. |
instantiated_channel |
instantiated_channel object |
Chaincode channel information. |
instantiated_info |
instantiated_info object |
Instantiation information. |
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. |
Parameter |
Type |
Description |
---|---|---|
error |
Array of CCInstantiatedChannelError objects |
Instantiation error information. |
success |
Array of strings |
Channels where the instantiation succeeded. |
inprogress |
Array of strings |
Instantiation progress. |
Parameter |
Type |
Description |
---|---|---|
channel_name |
String |
Name of the channel where the error occurred. |
error_detail |
String |
Error details. |
Parameter |
Type |
Description |
---|---|---|
channels |
Array of channels objects |
Channel information. |
Parameter |
Type |
Description |
---|---|---|
channel_id |
String |
Channel name. |
orgs |
Array of orgs objects |
Channel organization information. |
versions |
Array of strings |
Version. |
Parameter |
Type |
Description |
---|---|---|
org_name |
String |
Organization name. |
org_id |
String |
Organization ID. |
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/chaincodes
Example Responses
Status code: 200
Success
{ "count" : 12, "chaincodes" : [ { "chaincode_name" : "test001", "chaincode_version" : "1.0", "update_time" : "2021-01-12T11:32:04.193358708+08:00", "instantiated_info" : { "channels" : [ { "channel_id" : "channel", "versions" : [ "1.0" ] }, { "channel_id" : "testchannel", "orgs" : null, "versions" : [ "1.0" ] } ] }, "chaincode_language" : "golang" } ] }
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