Get the List of Configured Chaincodes (Deprecated in 20.3.1)

get

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

Get the list of configured chaincodes for a specified proxy or for all proxies.

Request

Supported Media Types
Query Parameters
Back to Top

Response

Supported Media Types

200 Response

Response with the configured chaincode by restriction
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : data
Type: array
Show Source
Nested Schema : StatsProxyConfiguredCC
Type: object
Show Source
Nested Schema : configuredCC
Type: array
Show Source
Nested Schema : StatsConfiguredCC
Type: object
Show Source
Nested Schema : endorsers
Type: array
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 of configured chaincodes for the specified proxy if using nodeID, or for all proxies if the node is not specified. The result contains a total number and a list of chaincode names for each proxy in the specified scope. Time range parameters are not applicable.

The following example shows how to generate the configured chaincodes metrics 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/proxyConfiguredCC?nodeID=<nodeID>"

For example,

curl -X GET -u myname@oracle.com:mypswd -k 
"http://server.oracle.com:10000/console/admin/api/v1.1/dashboard/proxyConfiguredCC?nodeID=restproxy1"

Example of the Response Body

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

{
  "data": [
    {
      "nodeID": "restproxy1",
      "configuredCCNum": 4,
      "configuredCC": [
        {
          "channel": "test",
          "chaincode": "obcs-example02",

          "endorsers": [

             "peer0-1",

             "peer0-2"

          ]
        },
        {
          "channel": "tfzch01",
          "chaincode": "tfzcc01",

          "endorsers": [

             "peer0-1"

          ]

        },
        {
          "channel": "tfzch02",
          "chaincode": "tfzcc02",

          "endorsers": [

             "peer0-1",

             "peer0-2"

          ]

        }
      ]
    }
  ]
}
Back to Top