This topic describes how to connect Hologres to DataWorks DataService Studio and generate an API.
Prerequisites
-
Activate DataWorks. For more information, see Get started.
-
Activate a Hologres instance and attach it to a DataWorks workspace.
Background information
DataWorks DataService Studio helps you build a unified data service bus. It enables you to quickly generate data APIs from data tables and register existing APIs with the data service platform, allowing you to centrally manage and publish API services.
Hologres is deeply integrated with DataWorks and can connect directly to DataWorks DataService Studio. This integration lets you quickly generate APIs from queried data and provide external services.
Procedure
-
Log on to the DataWorks console and create a Hologres data source. For specific instructions, see Attach a Hologres computing resource.
-
Generate an API.
-
On the DataWorks developer interface, click the
icon in the upper-left corner. -
Hover over All Products and click Data Service > Data Service.
-
On the Service Development page, hover over the
icon. -
Hover over New API > Generate API. You can generate the API in Codeless UI or Code Editor mode.

To generate an API in Codeless UI mode, see Generate an API in codeless UI mode.
To generate an API in Code Editor mode, see Generate an API in code editor mode.
-
-
Test the API.
-
On the API editing page, click Test in the upper-right corner.
-
In the API Test dialog box, enter the request parameters, and click Start Test.

If Test successful appears at the bottom of the API Test dialog box, the API test is passed.
You can also use the API testing module of DataService Studio to run the test. For more information, see Test an API.
-
-
Publish and view the API.
-
On the API editing page, click Publish in the upper-right corner.
To publish the API to API Gateway and create a listing in the API marketplace, see Publish an API.
-
On the DataService Studio page, click Service Management in the upper-right corner.
-
Click the name of the published API to view its details.
-
-
Call the API.
To call the successfully published API, see Examples of calling an API from a client.