You can call this operation to obtain the chaincodes of the organization.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
Action | String | Yes | DescribeFabricOrganizationChaincodes | The operation that you want to perform. Set the value to DescribeFabricOrganizationChaincodes. |
OrganizationId | String | Yes | peers-aaaaaa2-1eqnj5o5w**** | The ID of the organization. |
Location | String | No | cn-hangzhou | The location information. |
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 an organization. | ||
ChaincodeId | String | code-sacc-1pr09q7jmo0np | The ID of the chaincode. |
ChaincodeName | String | mycc | The name of the chaincode. |
ChaincodeVersion | String | 0.3 | The version of the chaincode. |
ChannelId | String | chan-first-channel-31hlgpen5k5lig | The ID of the channel. |
ChannelName | String | first-channel | The name of the channel. |
ConsortiumId | String | consortium-lianmenyumingyi-hc5d1bwlulg7 | The ID of the consortium. |
CreateTime | String | 1533025590 | The time when the chaincode was created. |
Creator | String | uid-23425 | The user who created the chaincode. |
DeployTime | String | 1533025590 | The time when the chaincode was deployed. |
EndorsePolicy | String | OR ('perf9141MSP.member') | The endorsement policy. |
Installed | String | Installed | Indicates whether the chaincode is installed. A value of true indicates that the chaincode is installed. A value of false indicates that the chaincode is not installed. |
Message | String | OK | The message. |
State | String | RUNNING | The status. Valid values:
|
Success | Boolean | 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=DescribeFabricOrganizationChaincodes
&OrganizationId=peers-aaaaaa2-1eqnj5o5w****
&Location=cn-hangzhou
&<Common request parameters>Successful response examples
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeFabricOrganizationChaincodesResponse>
<RequestId>1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3</RequestId>
<Success>true</Success>
<ErrorCode>200</ErrorCode>
<Result>
<EndorsePolicy>OR (&#39;perf9141MSP.member&#39;)</EndorsePolicy>
<State>RUNNING</State>
<CreateTime>1533025590</CreateTime>
<ChaincodeId>code-sacc-1pr09q7jmo0np</ChaincodeId>
<Message>OK</Message>
<ChaincodeName>mycc</ChaincodeName>
<Installed>Installed</Installed>
<Creator>uid-23425</Creator>
<DeployTime>1533025590</DeployTime>
<ChaincodeVersion>0.3</ChaincodeVersion>
<ConsortiumId>consortium-lianmenyumingyi-hc5d1bwlulg7</ConsortiumId>
<ChannelName>first-channel</ChannelName>
<ChannelId>chan-first-channel-31hlgpen5k5lig</ChannelId>
</Result>
</DescribeFabricOrganizationChaincodesResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3",
"Success" : true,
"ErrorCode" : 200,
"Result" : [ {
"EndorsePolicy" : "OR ('perf9141MSP.member')",
"State" : "RUNNING",
"CreateTime" : "1533025590",
"ChaincodeId" : "code-sacc-1pr09q7jmo0np",
"Message" : "OK",
"ChaincodeName" : "mycc",
"Installed" : "Installed",
"Creator" : "uid-23425",
"DeployTime" : "1533025590",
"ChaincodeVersion" : "0.3",
"ConsortiumId" : "consortium-lianmenyumingyi-hc5d1bwlulg7",
"ChannelName" : "first-channel",
"ChannelId" : "chan-first-channel-31hlgpen5k5lig"
} ]
}Error codes
For more information about error codes, see Error codes.