Help Center/ Blockchain Service/ API Reference/ Examples/ Example 2: Creating a Channel
Updated on 2022-05-25 GMT+08:00

Example 2: Creating a Channel

Scenario

This section describes how to create a channel by calling an API.

Related APIs of Other Services

None

Creating a Channel

  • URI format

    POST /v2/{project_id}/blockchains/{blockchain_id}/channels

  • Example request

    POST https://{bcs_endpoint}/v2/{project_id}/blockchains/{blockchain_id}/channels

    Obtain the value of {bcs_endpoint} from Regions and Endpoints.

    Body:

    {
     "channels": [
      {
       "channel_name": "channel001",
       "channel_description": "channel001"
      }
     ]
    }
  • Example response

    If the operation is successful, the returned value is empty.