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
Log on to the DataWorks console and add a Hologres data source. For more information, see Add a Hologres data source.
Create an API.
In the upper-left corner of the DataStudio page, click the icon.
Choose All Products > Data Service > DataService Studio.
In the left-side navigation pane of the DataService Studio page, move the pointer over the icon.
Choose Create API > Generate API. In the Generate API dialog box, you can select Wizard Mode or Script Mode to create an 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.
Test the API.
On the configuration tab of the API, click Test in the upper-right corner.
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.
Publish and view the API.
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.
On the DataService Studio page, click Service Management in the top navigation bar.
Find the published API and click the API name to view the details.
Call the API.
For more information about how to call a published API, see Examples on calling APIs.