You can call this operation to query the chaincodes of a consortium.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeFabricConsortiumChaincodes |
The operation that you want to perform. Set the value to DescribeFabricConsortiumChaincodes. |
ConsortiumId | String | Yes | consortium-lianmenyumingyi-hc5d1bwlulg7 |
The ID of the consortium. |
Location | String | No | cn-hangzhou |
The location. |
RegionId | String | No | cn-hangzhou |
The ID of the region. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
ErrorCode | Integer | 200 |
The error code. |
RequestId | String | 1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3 |
The ID of the API request. |
Result |
The chaincodes of the consortium. |
||
ChaincodeId | String | code-sacc-1pr09q7jmo0np |
The ID of the chaincode. |
ChaincodeName | String | sacc |
The name of the chaincode. |
ChaincodeVersion | String | 1.0 |
The version of the chaincode. |
ChannelId | String | chan-channelx-1l1hmckuuisxo |
The ID of the channel. |
ChannelName | String | cname |
The name of the channel. |
ConsortiumId | String | consortium-lianmenyumingyi-hc5d1bwlulg7 |
The ID of the consortium. |
CreateTime | String | 1544411108000 |
The time when the chaincode was created. |
DeployTime | String | 1544411108000 |
The time when the chaincode was deployed. |
EndorsePolicy | String | OR ('aaaaaa1MSP.peer') |
The endorsement policy. |
Input | String | input |
The input property of the chaincode. |
Install | Boolean | true |
Indicates whether the chaincode is installed. A value of true indicates that the chaincode is installed. A value of false indicates that the chaincode has not been installed. |
Message | String | ok |
The message. |
Path | String | go-sdk-demo/chaincode/src |
The path of the chaincode. |
ProviderId | String | peers-aaaaaa2-1eqnj5o5w9dt3 |
The ID of the user who uploaded the chaincode. |
ProviderName | String | name |
The name of the user who uploaded the chaincode. |
State | String | Instantiatable |
The status. |
Type | Integer | 1 |
The type of the chaincode. |
DO NOT TRANSLATE | DO NOT TRANSLATE | true |
Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed. |
Examples
Sample requests
http(s)://[Endpoint]/? Action=DescribeFabricConsortiumChaincodes
&ConsortiumId=consortium-lianmenyumingyi-hc5d1bwlulg7
&<Common request parameters>
Successful response examples
XML
format
<DescribeFabricConsortiumChaincodesResponse>
<Result>
<ChaincodeName>asset_mgmtv1.0.out</ChaincodeName>
<ChannelId>chan-channel1-1180moa11f7g5a</ChannelId>
<Install>false</Install>
<State>Checking</State>
<ConsortiumId>consortium-testthree-3i6j6d8ian5668</ConsortiumId>
<Type>0</Type>
<CreateTime>2018-07-31T08:13:27.000+0000</CreateTime>
<ProviderId>peers-test3-25c96n9n6jh3dc</ProviderId>
<ChannelName>channel1</ChannelName>
<ChaincodeVersion>unknown</ChaincodeVersion>
<EndorsePolicy>OR (&#test3MSP.member&#39;)</EndorsePolicy>
<ChaincodeId>code-asset_mgmtv1.0.out-1gab808kn8bfgl</ChaincodeId>
</Result>
<RequestId>66495305-6EE5-4023-96F2-93B47B79E076</RequestId>
<Success>true</Success>
<ErrorCode>200</ErrorCode>
</DescribeFabricConsortiumChaincodesResponse>
JSON
format
{
"Result":[
{
"ChannelId":"chan-channel1-1180moa11f7g5a",
"ChaincodeVersion":"unknown",
"ConsortiumId":"consortium-testthree-3i6j6d8ian5668",
"State":"Checking",
"Install":false,
"ChaincodeName":"asset_mgmtv1.0.out",
"Type":0,
"ProviderId":"peers-test3-25c96n9n6jh3dc",
"CreateTime":"2018-07-31T08:13:27.000+0000",
"ChannelName":"channel1",
"EndorsePolicy":"OR (&#test3MSP.member')",
"ChaincodeId":"code-asset_mgmtv1.0.out-1gab808kn8bfgl"
}
],
"RequestId":"66495305-6EE5-4023-96F2-93B47B79E076",
"ErrorCode":200,
"Success":true
}
Error codes
For more information about error codes, see Error codes.