Create a Channel
post
/console/admin/api/v1.1/channels
Create a channel on your blockchain network. You can set the application capabilities version for the channel. Refer to the Oracle Blockchain Platform User Guide to learn about capabilities and which version you should select.
Request
Supported Media Types
- application/json
Create a channel. Only certificates from v1.1 API can be used.
Root Schema : createchannel
Type:
Show Source
object
-
applicationCapabilitiesVersion(optional):
string
-
channeName(optional):
string
-
organizations(optional):
array organizations
-
policies(optional):
object policies
Example:
{
"channelName":"mychannel",
"applicationCapabilitiesVersion":"V1_1|V1_3(default)",
"organizations":[
{
"name":"Org1MSP",
"mspId":"Org1MSP",
"anchorPeers":[
"peer.org1.example.com:7051"
],
"certs":{
"adminCert":"example",
"CACert":"example",
"tlsCACert":"example"
},
"signature":"example"
},
{
"name":"Org2MSP",
"mspId":"Org2MSP",
"anchorPeers":[
"peer.org2.example.com:7051"
],
"certs":{
"adminCert":"example",
"CACert":"example",
"tlsCACert":"example"
},
"signature":"example"
}
],
"policies":{
"readers":{
"mspIds":[
"Org1MSP",
"org2MSP"
]
},
"writers":{
"mspIds":[
"Org1MSP",
"org2MSP"
]
}
}
}
Response
Supported Media Types
- application/json
201 Response
Channel created
Root Schema : schema
Type:
object
Example:
{
"status":"SUCCESS"
}
202 Response
In progress
Root Schema : schema
Type:
object
Example:
{
"status":"IN PROGRESS"
}
400 Response
Invalid argument
401 Response
Unauthorized
403 Response
Forbidden
500 Response
Internal Server Error
Default Response
Unexpected error