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

Example 1: Creating a BCS Service

Scenario

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

Related APIs of Other Services

None

Creating a BCS Service

  • URI format

    POST /v2/{project_id}/blockchains

  • Example request

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

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

    Body:

    {
           "name":"bcs-test",
           "fabric_version":"2.0",
           "enterprise_project_id":"0",
           "resource_password":"xxx",
           "create_new_cluster":false,
           "cce_cluster_info":{
                  "cluster_id":"c11ccc2c-aab9-11ea-99da-0255ac100b03",
                  "cluster_name":"byl-fastfabric"
           }
    }
  • Example response
    {
      "blockchain_id": "b95133b2-b933-8fd5-3421-e3ce793a3e2f",
      "blockchain_name": "bcs-test"
    }