Query Chaincode Definition in a Channel

get

/console/admin/api/v2/channels/{channelName}/chaincodeDefinitions

Query approved or committed chaincode definitions in a channel. The new chaincode lifecycle in Hyperledger Fabric 2.x involves approving and committing the chaincode during the deployment. The chaincode definition needs to be approved by a sufficient number of organizations to satisfy the channel's LifecycleEndorsement policy before the chaincode can be committed on the channel.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Optionally query a specific chaincode name for approved or committed status in a channel
  • Optionally query a specific chaincode sequence number for approved or committed status in a channel
  • Select if the query will return a list of approved or committed chaincode definitions in a channel
    Allowed Values: [ "Approved", "Committed" ]
Back to Top

Response

Supported Media Types

200 Response

Success
Body ()
Root Schema : schema
Type: array
Show Source
Nested Schema : queryChaincodeInfo
Type: object
Show Source
Nested Schema : approvals
Type: object
Nested Schema : collections
Type: object
Nested Schema : source
Type: object

400 Response

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

401 Response

Unauthorized

403 Response

Forbidden

500 Response

Internal server error
Body ()
Root Schema : 500errorModels
Type: object
Show Source

Default Response

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