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
- application/json
Query Parameters
-
nodeID(optional): string
Node ID of a specific proxy
Response
Supported Media Types
- application/json
200 Response
Response with the configured chaincode by restriction
400 Response
Invalid arguments
Default Response
Unexpected error
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" ] } ] } ] }