All Products
Search
Document Center

Blockchain as a Service:DescribeFabricConsortiumChaincodes

Last Updated:Dec 08, 2023

You can call this operation to query the chaincodes of a consortium.

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

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.

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
&Location=cn-hangzhou
&<Common request parameters>

Successful response examples

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeFabricConsortiumChaincodesResponse>
    <RequestId>1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3</RequestId>
    <Success>true</Success>
    <ErrorCode>200</ErrorCode>
    <Result>
        <Type>1</Type>
        <EndorsePolicy>OR ('aaaaaa1MSP.peer')</EndorsePolicy>
        <State>Instantiatable</State>
        <CreateTime>1544411108000</CreateTime>
        <ChaincodeId>code-sacc-1pr09q7jmo0np</ChaincodeId>
        <ProviderName>name</ProviderName>
        <Message>ok</Message>
        <ChaincodeName>sacc</ChaincodeName>
        <Install>true</Install>
        <Input>input</Input>
        <ProviderId>peers-aaaaaa2-1eqnj5o5w9dt3</ProviderId>
        <DeployTime>1544411108000</DeployTime>
        <ChaincodeVersion>1.0</ChaincodeVersion>
        <ConsortiumId>consortium-lianmenyumingyi-hc5d1bwlulg7</ConsortiumId>
        <ChannelName>cname</ChannelName>
        <ChannelId>chan-channelx-1l1hmckuuisxo</ChannelId>
        <Path>go-sdk-demo/chaincode/src</Path>
    </Result>
</DescribeFabricConsortiumChaincodesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3",
  "Success" : true,
  "ErrorCode" : 200,
  "Result" : [ {
    "Type" : 1,
    "EndorsePolicy" : "OR ('aaaaaa1MSP.peer')",
    "State" : "Instantiatable",
    "CreateTime" : "1544411108000",
    "ChaincodeId" : "code-sacc-1pr09q7jmo0np",
    "ProviderName" : "name",
    "Message" : "ok",
    "ChaincodeName" : "sacc",
    "Install" : true,
    "Input" : "input",
    "ProviderId" : "peers-aaaaaa2-1eqnj5o5w9dt3",
    "DeployTime" : "1544411108000",
    "ChaincodeVersion" : "1.0",
    "ConsortiumId" : "consortium-lianmenyumingyi-hc5d1bwlulg7",
    "ChannelName" : "cname",
    "ChannelId" : "chan-channelx-1l1hmckuuisxo",
    "Path" : "go-sdk-demo/chaincode/src"
  } ]
}

Error codes

For more information about error codes, see Error codes.