You can call this operation to obtain the chaincodes of the organization.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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.

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 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:

  • CHECKING
  • ERROR
  • INSTALLABLE
  • INSTALLED
  • RUNNING
  • UPGRADABLE
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****
&<Common request parameters>

Successful response examples

XML format

<DescribeFabricOrganizationChaincodesResponse>
  <Result>
			    <ChaincodeName>sacc</ChaincodeName>
			    <ChannelId>chan-first-channel-31hlgpen5k5lig</ChannelId>
			    <State>Instantiatable</State>
			    <ConsortiumId>10000</ConsortiumId>
			    <Creator>perf9141</Creator>
			    <CreateTime>2018-08-19T02:00:21.000+0000</CreateTime>
			    <Installed>Installed</Installed>
			    <DeployTime>2018-08-19T08:24:32.000+0000</DeployTime>
			    <ChannelName>first-channel</ChannelName>
			    <ChaincodeVersion>1.0.6</ChaincodeVersion>
			    <EndorsePolicy>OR (&amp;#39;perf914MSP.member&amp;#39;)</EndorsePolicy>
			    <ChaincodeId>code-sacc-1ai2bl61ggb6bf</ChaincodeId>
		        <Message>OK</Message>
          </Result>
		  <Result>
			    <ChaincodeName>sacc</ChaincodeName>
			    <ChannelId>chan-first-channel-31hlgpen5k5lig</ChannelId>
			    <State>Upgradable</State>
			    <ConsortiumId>10000</ConsortiumId>
			    <Creator>perf9143</Creator>
			    <CreateTime>2018-08-19T02:15:54.000+0000</CreateTime>
			    <Installed>Installed</Installed>
			    <ChannelName>first-channel</ChannelName>
			    <ChaincodeVersion>1.0.7</ChaincodeVersion>
			    <EndorsePolicy>OR (&amp;#39;perf9143MSP.member&amp;#39;)</EndorsePolicy>
			    <ChaincodeId>code-sacc-a236mc8gmk9m9</ChaincodeId>
		        <Message>OK</Message>
          </Result>
		  <RequestId>C741EF76-4F31-40BF-B286-E87C9D3E7232</RequestId>
		  <Success>true</Success>
		  <ErrorCode>200</ErrorCode>
</DescribeFabricOrganizationChaincodesResponse>

JSON format

{
	"Result":[
		{
			"ConsortiumId":"10000",
			"Message":"OK",
			"Creator":"perf9143",
			"DeployTime":"2018-08-19T08:43:26.000+0000",
			"ChannelName":"first-channel",
			"EndorsePolicy":"OR (&#39;perf9143MSP.member&#39;)",
			"ChannelId":"chan-first-channel-31hlgpen5k5lig",
			"ChaincodeVersion":"1.0.10",
			"ChaincodeName":"sacc",
			"State":"Upgradable",
			"CreateTime":"2018-08-19T08:37:33.000+0000",
			"Installed":"Installed",
			"ChaincodeId":"code-sacc-nbk70pidp2jm7"
		},
		{
			"ConsortiumId":"10000",
			"Message":"OK",
			"Creator":"perf9141",
			"DeployTime":"2018-08-19T08:46:02.000+0000",
			"ChannelName":"first-channel",
			"EndorsePolicy":"OR (&#39;perf9141MSP.member&#39;)",
			"ChannelId":"chan-first-channel-31hlgpen5k5lig",
			"ChaincodeVersion":"1.0.11",
			"ChaincodeName":"sacc",
			"State":"Upgradable",
			"CreateTime":"2018-08-19T08:38:18.000+0000",
			"Installed":"Installed",
			"ChaincodeId":"code-sacc-2bpegdo9mfchod"
		}
	],
	"RequestId":"C741EF76-4F31-40BF-B286-E87C9D3E7232",
	"ErrorCode":200,
	"Success":true
}

Error codes

For more information about error codes, see Error codes.