All Products
Search
Document Center

DataWorks:Getting started with DataService Studio

Last Updated:Aug 30, 2025

DataService Studio in DataWorks is designed to create a unified data service bus, which allows individuals, teams, and enterprises to centrally manage internal and external API services. For example, you can quickly generate an API from a data table query or register existing APIs on the DataService Studio platform for unified publishing and management. This topic uses a MySQL data source as an example to describe the complete API development process.

Prerequisites

Background information

DataService Studio acts as a bridge between databases and data applications, providing comprehensive data service and sharing capabilities for individuals, teams, and enterprises. This helps you centrally manage APIs from both inside and outside Alibaba Cloud.

DataService Studio is connected to API Gateway and supports one-click publishing of APIs to API Gateway. Together, DataService Studio and API Gateway provide a secure, stable, cost-effective, and easy-to-use service for exposing and sharing data. For more information about DataService Studio, see DataService Studio.

Go to DataService Studio

Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose Data Analysis and Service > DataService Studio. On the page that appears, select the desired workspace from the drop-down list and click Go to DataService Studio.

Procedure

  1. Step 1: Create a data source and configure network connectivity

    Before you create an API in DataService Studio, you must add your database or data warehouse as a DataWorks data source. This data source provides the data for the API. During API development, DataService Studio accesses this data source to retrieve the schema information of the data table. This helps you set the request and response parameters. When the API is called, DataService Studio accesses the data source to run the query. For a list of supported data sources, see List of data sources for DataService Studio.

    Important

    If the connectivity test fails, check the configuration. For more information, see Network connections and whitelists.

  2. Step 2: Create an API group

    DataService Studio provides services to external systems through API Gateway. In API Gateway, a group is a management unit for APIs and is associated with the domain name of the call address. Therefore, you must first create an API group in API Gateway before you create an API in DataService Studio.

  3. Step 3: Create a business process

    In DataService Studio, business processes are used to develop APIs based on business units and to organize and manage files, such as APIs and functions. Therefore, you must first create a business process before you create an API.

  4. Step 4: Generate an API

    After you create the business process, you can create APIs within that process.

  5. Step 5: Test the API

    After you create an API, you must test it. After the API passes the test, you can publish it.

  6. Step 6: Publish the API

    Publish the API that passed the test. After the API is published, other services can call it.

  7. Step 7: Call the API

    DataService Studio supports calling APIs using simple authentication or encrypted signature authentication. You can select a method based on your requirements.

  8. Step 8: View and manage the API

    You can view published APIs on the service management page. DataService Studio also supports management operations, such as unpublishing, authorization, and viewing API call details.

Step 1: Create a data source and configure network connectivity

Before you create an API in DataService Studio, you must add your database or data warehouse as a DataWorks data source. You must also ensure that the DataService Studio resource group can connect to your destination data source so that DataWorks can access the data source when an API is called. This topic uses a MySQL data source named rds_workshop_log as an example and tests its connectivity with the public resource group for DataService Studio.

  1. Go to the Management Center.

  2. In the navigation pane on the left, click Data Source Management to go to the data source management page.

  3. Create a data source and test its network connectivity.

    1. Click Add Data Source and select a data source type.

      This topic uses MySQL as an example.

    2. Configure the data source information.

      Configure the parameters as prompted on the page. For more information, see Configure a MySQL data source.

    3. Select a Serverless resource group and test the connectivity between the resource group and the data source.

      Note
    4. Click Complete to create the data source.

Step 2: Create an API group

DataService Studio provides services to external systems through API Gateway. In API Gateway, a group is a management unit for APIs and is associated with the domain name of the call address. Therefore, you must first create an API group in API Gateway before you create an API in DataService Studio.

  1. Go to the API Gateway console.

  2. In the navigation pane on the left, choose API Management > Group Management.

  3. On the Group Management page, click Create Group.

    This topic uses a group named Workshop as an example.

Step 3: Create a business process

In DataService Studio, business processes are used to develop APIs based on business units and to organize and manage files, such as APIs and functions. Therefore, you must first create a business process before you create an API.

  1. Create a business process.

    On the DataService Studio > Service Development page, you can create a business process in one of the following ways:

    • Method 1: Click the 新建 icon and select Create Business Process.

    • Method 2: In the navigation pane on the left, right-click the Business Process folder and select Create Business Process.

  2. Configure the parameters for the business process.

    Configuration

    Description

    Business Name

    Enter a custom name based on your business scenario. This topic uses DataService as an example.

    API Group

    Select an API group to manage your APIs. This topic uses the Workshop group created in Step 2.

    Note

    An API group is a collection of APIs for a specific feature or scenario. It is also the smallest unit for API management in API Gateway. To create a new group, see Step 2: Create an API group.

  3. Click OK to create the business process.

    After the business process is created, you can view its details in the folder in the navigation pane on the left of the DataService Studio page.

Step 4: Generate an API

Create an API in the business process that you created.

  1. Generate an API.

    On the DataService Studio > Service Development page, you can generate an API in one of the following ways:

    • Method 1: Click the 新建 icon and choose Create API > Generate API.

    • Method 2: In the navigation pane on the left, right-click the destination business process and choose New > API > Generate API.

  2. Define the API properties.

    In the Generate API dialog box, configure the API information. The following figure shows an example configuration. 配置APIThe following table describes the main parameters.

    Configuration Item

    Description

    API Mode

    Select the mode to create the API. You can choose the codeless UI or the code editor.

    • Codeless UI: Quickly configure a data API without writing code.

    • Code editor: Supports advanced features such as table joins, complex queries, and aggregate functions. You can write custom SQL queries for the API to meet advanced query requirements.

    This topic uses the codeless UI as an example. For more information about the two modes, see Overview of API generation.

    API Name

    Enter a custom name for the API. This topic uses rpt_user_info_all_d as an example.

    API Path

    The storage path of the API. This is the URI of the request relative to the service host. This path is used to construct the API call address. This topic uses /user as an example.

    Protocol

    HTTP and HTTPS are supported.

    To call the API over HTTPS, bind an independent domain name and upload an SSL Certificate in the API Gateway console after you publish the API to the gateway. For more information, see Support for HTTPS.

    Request Method

    GET and POST are supported.

    Note
    • If you select GET, you can only set the Parameter Position of the Request Parameters to QUERY.

    • If you select POST, you can set the Parameter Position of the Request Parameters to QUERY or BODY.

    Response Type

    Only JSON is supported.

    Visible Scope

    Define the visibility of the API after it is created. Valid values are Workspace and Private.

    • Workspace: The API is visible to all members in the current workspace.

    • Private: The API is visible only to the API owner. Authorization is not supported.

    This topic uses Workspace as an example.

    Destination Folder

    Define the folder where the API is stored in the business process on the left. If you have not created a business process, create one. For more information, see Step 3: Create a business process.

  3. Configure the API parameters.

    On the API editing page, configure the API parameters. The following figure shows an example configuration. 配置API

    1. Select the data source for the API.

      In the Select Table section, select the data source table that you want to use to generate the API.

      Parameter

      Description

      Data Source Type

      Select the type of data source from which to create the API. This topic uses MySQL as an example.

      Data Source Name

      The name of the data source of the selected type based on which you want to generate the API. This topic uses the rds_workshop_log data source created in Step 1: Create a data source and configure network connectivity as an example.

      Data Source Environment

      Workspaces in standard mode support access to data sources in the development or production environment. For more information about the differences between the two environments, see Differences between workspace modes. This topic uses the Production Environment as an example.

      Data Table Name

      Select the data table in the data source from which to generate the API. This topic uses the rpt_user_info_all_d table in the rds_workshop_log data source as an example.

    2. Define the request and response parameters.

      After you select a data table, the Select Parameters section automatically displays all fields from the table. Select the fields to use as request and response parameters for the API. To sort the fields, add the target fields to the Sort Fields section and adjust their order.

      In this example, the request parameter is uid, and the response parameters are all fields in the table.

      Note

      In the right-side navigation pane, click Request Parameters or Response Parameters to modify parameter settings, such as field type, sample value, and default value. You can configure these settings based on your requirements.

  4. Configure the API resource group.

    On the API editing page, click Service Resource Group on the right to configure the resource group. Because the default public resource group for DataService Studio will be discontinued, you must configure a new API to use an exclusive service resource group. Select either a Serverless resource group that has a configured quota for DataService Studio or an exclusive resource group for DataService Studio.

Step 5: Test the API

After the API is generated, click Test in the upper-right corner of the API editing page to verify that the request and return value are as expected. In this example, set the value of the uid request parameter to 0016359810821 and test the result. For more information about testing, see Test an API.测试API

Step 6: Publish the API

An API must be submitted and published before it can be called by other services. In the upper-right corner of the API editing page, click Submit and select the version to publish. After the API is published, you can view it in API Gateway. For more information about publishing, see Publish an API.发布API

Step 7: Call the API

The following authentication methods are supported for calling APIs. You can select one based on your requirements:

  • Simple Authentication: Offers low security. It is suitable for scenarios such as reports and data dashboards.

  • Encrypted Signature Authentication: Offers high security. It is suitable for application development scenarios.

  1. In the top menu bar of DataService Studio, click Service Management to go to the service management page.

  2. In the navigation pane on the left, select API Invocation.

    Published APIs are available in API Gateway. You can call the API using an API Gateway SDK. For more information, see Examples of calling an API from a client.

Step 8: View and manage the API

On the Service Management page, you can view published APIs and perform management operations.

Area

Description

API Management

On the Service Management > API Management page, you can view currently published APIs, APIs you are authorized to use, and APIs you have authorized to others. You can also perform operations such as unpublishing, authorizing, and testing on APIs for which you have permissions.

API Metering

On the Service Management > API Metering page, you can perform the following operations:

  • Metering Dashboard: Get a global view of API call information, including the total number of APIs, status code distribution, error code distribution, overall metering, and resource group allocation.

  • Metering Details: Provides various visualization charts and statistical data. You can view monitoring charts for a single API, including API Gateway status codes, DataService Studio error codes, number of app requests, bandwidth, and average response time.

  • Log Analysis: Use the log analysis feature to analyze call requests. If a call request is abnormal, intelligent analysis can help you quickly locate the problem and provide diagnostic results and suggestions.