All Products
Search
Document Center

Blockchain as a Service:DescribeFabricOrganizationChaincodes

Last Updated:Aug 18, 2023

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeFabricOrganizationChaincodes

The operation that you want to perform. Set the value to DescribeFabricOrganizationChaincodes.

OrganizationIdStringYespeers-aaaaaa2-1eqnj5o5w****

The ID of the organization.

LocationStringNocn-hangzhou

The location information.

RegionIdStringNocn-hangzhou

The ID of the region.

Response parameters

ParameterTypeExampleDescription
ErrorCodeInteger200

The error code.

RequestIdString1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3

The ID of the API request.

Result

The chaincodes of an organization.

ChaincodeIdStringcode-sacc-1pr09q7jmo0np

The ID of the chaincode.

ChaincodeNameStringmycc

The name of the chaincode.

ChaincodeVersionString0.3

The version of the chaincode.

ChannelIdStringchan-first-channel-31hlgpen5k5lig

The ID of the channel.

ChannelNameStringfirst-channel

The name of the channel.

ConsortiumIdStringconsortium-lianmenyumingyi-hc5d1bwlulg7

The ID of the consortium.

CreateTimeString1533025590

The time when the chaincode was created.

CreatorStringuid-23425

The user who created the chaincode.

DeployTimeString1533025590

The time when the chaincode was deployed.

EndorsePolicyStringOR ('perf9141MSP.member')

The endorsement policy.

InstalledStringInstalled

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.

MessageStringOK

The message.

StateStringRUNNING

The status. Valid values:

  • CHECKING
  • ERROR
  • INSTALLABLE
  • INSTALLED
  • RUNNING
  • UPGRADABLE
SuccessBooleantrue

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.