All Products
Search
Document Center

Hologres:DataWorks DataService Studio

Last Updated:Feb 29, 2024

This topic describes how to connect DataWorks DataService Studio to Hologres and how to use DataWorks DataService Studio to create an API.

Prerequisites

  • DataWorks is activated. For more information, see Overview.

  • A Hologres instance is purchased and associated with a DataWorks workspace.

Background information

DataWorks DataService Studio is designed to build a unified data service bus to help you manage APIs. You can create APIs from tables or register existing APIs with DataService Studio. This helps you manage and publish APIs in a centralized manner.

Hologres is deeply integrated with DataWorks and directly connects to DataService Studio. You can quickly create APIs based on data query results and use the APIs to provide services.

Procedure

  1. Log on to the DataWorks console and add a Hologres data source. For more information, see Add a Hologres data source.

  2. Create an API.

    1. In the upper-left corner of the DataStudio page, click the 图标 icon.

    2. Choose All Products > Data Service > DataService Studio.

    3. In the left-side navigation pane of the DataService Studio page, move the pointer over the 新建 icon.

    4. Choose Create API > Generate API. In the Generate API dialog box, you can select Wizard Mode or Script Mode to create an API.生成API

      For more information about how to create an API in wizard mode, see Create an API by using the codeless UI.

      For more information about how to create an API in script mode, see Create an API in the code editor.

  3. Test the API.

    1. On the configuration tab of the API, click Test in the upper-right corner.

    2. In the Test APIs dialog box, specify the values in Request Parameters and click Test.测试

      If the Tested successfully message appears in the lower part of the Test APIs dialog box, the API passes the test.

      You can also test the API in the Test APIs module of DataService Studio. For more information, see Test an API.

  4. Publish and view the API.

    1. On the configuration tab of the API, click Publish in the upper-right corner.

      Publish the API to API Gateway and make the API available in the API marketplace. For more information, see Publish an API.

    2. On the DataService Studio page, click Service Management in the top navigation bar.

    3. Find the published API and click the API name to view the details.

  5. Call the API.

    For more information about how to call a published API, see Examples on calling APIs.