You can call this operation to create a channel.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateFabricChannel | The operation that you want to perform. Set the value to CreateFabricChannel. |
ChannelName | String | Yes | channelx | The name of the channel. It must be 1 to 50 characters in length and can contain lowercase letters, digits, hyphens (-), and the first letter must be lowercase. |
ConsortiumId | String | Yes | consortium-aaaaaa-akpcsjjac2jd | The ID of the consortium. |
BatchTimeout | Integer | No | 1 | The amount of time (in second) to wait after the first transaction arrives for additional transactions before cutting a block. |
MaxMessageCount | Integer | No | 200 | The maximum number of transactions that are permitted in a block. |
Organization.N.Id | String | Yes | peers-aaaaaa1-1oxw31d046jtl | The ID list of organizations that have joined the channel. Enter: |
PreferredMaxBytes | Integer | No | 5 | The preferred maximum number of bytes (in MB) allowed for. |
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 result. | ||
BatchTimeout | Integer | 1 | The amount of time to wait after the first transaction arrives for additional transactions before cutting a block. |
BlockCount | Integer | 2 | The number of blocks. |
ChaincodeCount | Integer | 2 | The number of chaincodes. |
ChannelId | String | chan-channelx-1l1hmckuuisxo | The ID of the channel. |
ChannelName | String | channelx | The name of the channel. |
ConsortiumId | String | consortium-aaaaaa-akpcsjjac2jd | The ID of the consortium. |
ConsortiumName | String | aaaaaa | The name of the consortium. |
CreateTime | String | 1544768139624 | The time when the channel was created. |
MaxMessageCount | Integer | 200 | The maximum number of transactions that are permitted in a block. |
MemberCount | Integer | 1 | The number of members. |
OwnerBid | String | 26842 | The business ID of the creator. |
OwnerName | String | uid- | The user who created the organization. |
OwnerUid | Integer | 1234 | The user ID of the creator. |
PreferredMaxBytes | Integer | 5 | The preferred maximum number of bytes(in MB) allowed for. |
RequestId | String | 1890FA4F-067A-4CE9-AC9B-2BD2E58FB5D3 | The ID of the API request. |
State | String | Running | The status. |
SupportConfig | Boolean | true | Indicates whether custom parameters are supported. |
UpdateTime | String | 1544768139624 | The time when the channel was last updated. |
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=CreateFabricChannel&ChannelName=channelx&ConsortiumId=consortium-aaaaaa-akpcsjjac2jd&<Common request parameters>
Successful response examples
XML
format
<CreateFabricChannelResponse> </Result> <ChannelId>chan-channelx-1l1hmckuuisxo</ChannelId> <ConsortiumName>aaaaa</ConsortiumName> <ChannelName>channelx</ChannelName> <ConsortiumId>consortium-aaaaaa-akpcsjjac2jd</ConsortiumId> <CreateTime>1544768139624</CreateTime> <MaxMessageCount>50</MaxMessageCount> <MemberCount>2</MemberCount> <OwnerBid>26842</OwnerBid> <OwnerUid></OwnerUid> <OwnerName>name</OwnerName> <PreferredMaxBytes>12</PreferredMaxBytes> <State>Pending</State> <SupportConfig>true</SupportConfig> <UpdateTime>1544768139624</UpdateTime> </Result> <RequestId></RequestId> <Success>true</Success> <ErrorCode>200</ErrorCode></CreateFabricChannelResponse>
JSON
format
{ “Result”:[ { “ConsortiumName”:”aaaaa”, “ConsortiumId”:”consortium-aaaaaa-akpcsjjac2jd”, “UpdateTime”:”1544768139624”, “ChannelName”:”channelx”, “MaxMessageCount”:50, “SupportConfig”:”true”, “OwnerBid”:”26842”, “ChannelId”:”chan-channelx-1l1hmckuuisxo”, “OwnerUid”:””, “State”:”Pending”, “CreateTime”:”1544768139624”, “PreferredMaxBytes”:12, “MemberCount”:2, “OwnerName”:”name” } ], “RequestId”:””, “ErrorCode”:200, “Success”:true}
Error codes
For more information about error codes, see Error codes.
</article>
</main>