Get the Current Number and List of Installed Chaincodes on the Specified Peer
get
/console/admin/api/v1.1/dashboard/statistics/chaincodeInstalled
Get the current number and list of installed chaincodes on the specified peer.
Request
Supported Media Types
- application/json
Query Parameters
-
nodeID(optional): string
Node ID of a specific peer
Response
Supported Media Types
- application/json
200 Response
Response with a total number and a list of chaincode names for each peer by restriction
400 Response
Invalid arguments
Default Response
Unexpected error
Examples
This endpoint is used to get the current number and list of installed chaincodes on the specified peer, if peer is specified using nodeID
, or on all peers if not. The result contains a total number and a list of chaincode names for each peer. Time range is not supported for chaincodeInstalled
.
The following example shows how to generate the chaincode information report by submitting a GET request on the REST resource using cURL.
curl -X GET -u username:password -k "http://<rest_server_url>:port/console/admin/api/v1.1/dashboard/statistics/chaincodeInstalled?nodeID=<nodeID>"
For example,
curl -X GET -u myname@oracle.com:mypswd -k "http://server.oracle.com:10000/console/admin/api/v1.1/dashboard/statistics/chaincodeInstalled?nodeID=peer0-1"
Example of the Response Body
The following example shows the contents of the response body in JSON format:
{ "data": [ { "nodeID": "peer0-1", "chaincodeNum": 3, "chaincodes": [ { "ccName": "tfzcc01", "ccVersion": "v1" }, { "ccName": "obcs-example02", "ccVersion": "v0" }, { "ccName": "mycc01", "ccVersion": "v1" } ] } ] }