SynchronizeFabricChaincode
更新時(shí)間:
調(diào)用SynchronizeFabricChaincode同步鏈碼的升級(jí)和實(shí)例化的狀態(tài)。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
請(qǐng)求參數(shù)
名稱 |
類型 |
是否必選 |
示例值 |
描述 |
Action | String | 是 | SynchronizeFabricChaincode | 系統(tǒng)規(guī)定參數(shù)。取值:SynchronizeFabricChaincode。 |
OrganizationId | String | 是 | peers-aaaaaa2-1eqnj5o5w**** | 組織ID |
ChaincodeId | String | 是 | code-sacc-1pr09q7jm**** | 鏈碼ID |
返回?cái)?shù)據(jù)
名稱 |
類型 |
示例值 |
描述 |
RequestId | String | 1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3 | 請(qǐng)求ID |
Success | Boolean | true | 是否成功 |
ErrorCode | Integer | 200 | 錯(cuò)誤碼 |
Result | Object | 返回結(jié)果 |
|
Type | Integer | 1 | 類型 |
EndorsePolicy | String | OR ('aaaaaa1MSP.peer') | 背書策略 |
State | String | Running | 狀態(tài) |
CreateTime | String | 1533025590 | 創(chuàng)建時(shí)間 |
ChaincodeId | String | code-sacc-1pr09q7jm**** | 鏈碼ID |
ProviderName | String | name | 上傳者 |
Message | String | ok | 信息 |
ChaincodeName | String | mychaincode | 鏈碼名 |
Input | String | input | 輸入 |
Install | Boolean | false | false |
ProviderId | String | provider | 上傳者ID |
DeployTime | String | 1533025590 | 部署時(shí)間 |
ChaincodeVersion | String | 1.0 | 鏈碼版本 |
ConsortiumId | String | consortium-lianmenyumingyi-hc5d1bwl**** | 聯(lián)盟ID |
ChannelName | String | chan-channelx-1l1hmckuuisxo | 通道名 |
Path | String | go-sdk-demo/chaincode/src | 路徑 |
示例
請(qǐng)求示例
http(s)://[Endpoint]/?Action=SynchronizeFabricChaincode
&OrganizationId=peers-aaaaaa2-1eqnj5o5w****
&ChaincodeId=code-sacc-1pr09q7jm****
&公共請(qǐng)求參數(shù)
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<SynchronizeFabricChaincodeResponse>
<RequestId>1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3</RequestId>
<Success>true</Success>
<ErrorCode>200</ErrorCode>
<Result>
<Type>1</Type>
<EndorsePolicy>OR ('aaaaaa1MSP.peer')</EndorsePolicy>
<State>Running</State>
<CreateTime>1533025590</CreateTime>
<ChaincodeId>code-sacc-1pr09q7jm****</ChaincodeId>
<ProviderName>name</ProviderName>
<Message>ok</Message>
<ChaincodeName>mychaincode</ChaincodeName>
<Input>input</Input>
<Install>false</Install>
<ProviderId>provider</ProviderId>
<DeployTime>1533025590</DeployTime>
<ChaincodeVersion>1.0</ChaincodeVersion>
<ConsortiumId>consortium-lianmenyumingyi-hc5d1bwl****</ConsortiumId>
<ChannelName>chan-channelx-1l1hmckuuisxo</ChannelName>
<Path>go-sdk-demo/chaincode/src</Path>
</Result>
</SynchronizeFabricChaincodeResponse>
JSON
格式
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" : "Running",
"CreateTime" : "1533025590",
"ChaincodeId" : "code-sacc-1pr09q7jm****",
"ProviderName" : "name",
"Message" : "ok",
"ChaincodeName" : "mychaincode",
"Input" : "input",
"Install" : false,
"ProviderId" : "provider",
"DeployTime" : "1533025590",
"ChaincodeVersion" : "1.0",
"ConsortiumId" : "consortium-lianmenyumingyi-hc5d1bwl****",
"ChannelName" : "chan-channelx-1l1hmckuuisxo",
"Path" : "go-sdk-demo/chaincode/src"
}
}
錯(cuò)誤碼
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。
文檔內(nèi)容是否對(duì)您有幫助?