Adding blockchain as a service data source

更新时间:
复制 MD 格式

Add Blockchain as a Service (BaaS) data sources in DataV and configure the required parameters. With BaaS, you can invoke smart contracts through REST APIs, query blockchain information, and retrieve block and transaction data.

Prerequisites

The Blockchain as a Service data source that you want to add is prepared.

Limits

This feature is available only in DataV Enterprise Edition and later versions.

Adding blockchain as a service data source

  1. Access the DataV console.

  2. On the Workbench page, click Data Preparation > Data Source in the navigation pane on the left. On the Data Source page, click New Data Source.

  3. From the Type list, select Blockchain as a Service.

  4. Enter the necessary information for the Blockchain as a Service data source.

    image

    Parameter

    Description

    Custom Data Source Name

    The display name of the data source. You can specify a custom name.

    Endpoint

    The REST API address of the data source. In the Blockchain as a Service console, click your Organization User REST API REST API Address to find it. REST API地址步骤图

    refreshToken

    The access token for authenticating requests to this data source. In the Blockchain as a Service console, click your Organization REST-API, click Generate Token in the sidebar, and copy the token from the output. token获取

    network

    The channel name of the data source. In the Blockchain as a Service console, click your Organization > Joined Channels to find it. 通道获取步骤

  5. Once the information is filled in, click OK to finalize the data source addition.

    The new data source is automatically added to the data source list.

Using blockchain as a service data source

  1. Access the DataV console.

  2. On the Workbench page, hover over the data dashboard you want to edit and click Edit.

    Important

    If you have not created a data dashboard, see Create a PC Dashboard Using a Template.

  3. On the canvas editing page, select a widget from the canvas.

    If the canvas has no widgets, add one first. For more information, see Widget Canvas Operations.

  4. In the widget configuration panel on the right, select Data Source.

    image

  5. In the Set Data Source section, choose Data Source Type as Blockchain as a Service.

  6. From the Select Existing Data Source list, choose the configured Blockchain as a Service data source.

  7. In the Query Parameter field, input the necessary blockchain parameters for the query.

    Note

    Blockchain data can be queried in multiple ways. Enter the query parameters that match your data type.

  8. Click View Data Return Results to examine the returned data.

What to do next

To use the data source in your widgets, see Configure a widget data source.

FAQ

For more information, see FAQ about data source configuration and usage.