Get the Current Number of Instantiated Chaincodes on the Specified Channel

get

/console/admin/api/v1.1/dashboard/statistics/chaincodeInstantiated

Get the current number of instantiated chaincodes on the specified channel.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Response with the total number and a list of chaincode names for each channel by restriction
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : StatsChaincodeInstantiated
Type: object
Show Source
Nested Schema : chaincodes
Type: array
Show Source
Nested Schema : StatsChaincodeInfo
Type: object
Show Source

400 Response

Invalid arguments
Body ()
Root Schema : 400errorModels
Type: object
Show Source
Example:
{
    "respMesg":"invalid argument"
}

Default Response

Unexpected error
Body ()
Root Schema : errorModel
Type: object
Show Source
Back to Top

Examples

This endpoint is used to get the current number and list of instantiated chaincodes on the specified channel if a channel is specified, or on all channels if not. The result contains a total number and a list of chaincode names for each channel. Time range is not supported for chaincodeInstantiated.

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/chaincodeInstantiated?channel=<channel>"

For example,

curl -X GET -u myname@oracle.com:mypswd -k  
"http://server.oracle.com:10000/console/admin/api/v1.1/dashboard/statistics/chaincodeInstantiated?channel=tfzch01"

Example of the Response Body

The following example shows the contents of the response body in JSON format:

{
  "data": [
    {
      "channelName": "tfzch01",
      "chaincodeNum": 1,
      "chaincodes": [
        {
          "ccName": "tfzcc01",
          "ccVersion": "v1"
        }
      ]
    }
  ]
}
Back to Top