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
- application/json
Path Parameters
-
channelName(required): string
ID of the channel
Query Parameters
-
chaincodeName: string
Optionally query a specific chaincode name for approved or committed status in a channel
-
sequence: string
Optionally query a specific chaincode sequence number for approved or committed status in a channel
-
status(required): string
Select if the query will return a list of approved or committed chaincode definitions in a channelAllowed Values:
[ "Approved", "Committed" ]
Response
Supported Media Types
- application/json
200 Response
Success
Nested Schema : approvals
Type:
object
Nested Schema : collections
Type:
object
Nested Schema : source
Type:
object
400 Response
Invalid arguments
401 Response
Unauthorized
403 Response
Forbidden
500 Response
Internal server error
Default Response
Unexpected error