DataService Studio in DataWorks is a serverless platform for turning database tables into callable data APIs. It connects directly to your data sources, generates APIs through a visual interface or custom SQL, and publishes them to API Gateway — no infrastructure to manage.
DataService Studio requires the desktop version of Chrome 69 or later.
Key concepts
-
API: An interface that lets applications query data from databases and data tables. DataService Studio APIs support read operations.
-
Business process: An organizational unit in DataService Studio that groups related APIs and functions by business domain. Create a business process before creating any APIs.
-
API group: A management unit in API Gateway that associates a set of APIs with a domain name. APIs in DataService Studio are published through an API group.
-
Function: An API filter backed by Function Compute. A function runs before or after an API call to transform request or response parameters. The pre-filter and post-filter for the same API must be the same function type.
-
Data Push: A DataWorks feature that runs SQL queries against data sources (MySQL, PostgreSQL, Hologres, MaxCompute, ClickHouse) and pushes the results as rich text or tables to channels like DingTalk groups, Lark groups, WeCom groups, email, or Microsoft Teams on a schedule.
-
DataService Studio resource group: The compute resource that runs API calls. Use an exclusive resource group for DataService Studio when your APIs require high queries per second (QPS) or a service-level agreement (SLA) guarantee.
Billing
API calls consume resource group capacity and incur fees based on the number of calls. Two resource group types are available:
-
Serverless resource group:
-
*Pay-as-you-go:* Configure Current CUs in Use for DataService Studio in the resource group. The fee is
Number of CUs in use × Duration of CU allocation. For details, see Allocate CU quotas to tasks. -
*Subscription:* Configure Guaranteed CUs for DataService Studio in the resource group. You are charged based on the number of CUs allocated. For details, see Allocate CU quotas to tasks.
-
-
Exclusive resource group for DataService Studio: Billed by resource group specifications. Suited for high-concurrency, high-frequency API calls that require dedicated capacity. An exclusive resource group for DataService Studio is for the exclusive use of a single enterprise. For details, see Billing for exclusive resource groups for DataService Studio.
The public resource group for DataService Studio is no longer recommended. See Announcement on the discontinuation of the public resource group for DataService Studio in DataWorks.
Feature overview
API development
DataService Studio provides three ways to create APIs:
| Step | Task | Description |
|---|---|---|
| 1 | Create a data source and configure network connectivity | Add your database or data warehouse as a DataWorks data source. DataService Studio accesses this source to retrieve table schema during API development and to run queries during API calls. See List of data sources for DataService Studio for supported sources. If the connectivity test fails, see Network connections and whitelists. |
| 2 | Create a business process | Group your APIs and functions by business domain before creating any API. |
| 3 | Create an API | Codeless UI: Generate an API from a data table using a visual configuration interface — no code required. Code editor: Write custom SQL to support table joins, complex queries, and aggregate functions. Register an existing API: Onboard an existing API for unified management and publishing. |
| 4 | Create a function (filter) | (Optional) Use Function Compute to process API request parameters or response results. |
| 5 | Test an API | Verify request and response behavior before publishing. |
| 6 | Publish an API | Publish the API to API Gateway so other services can call it. After publishing, you can optionally list the API on Alibaba Cloud API Marketplace to sell it. The Alibaba Cloud API Marketplace covers seven major categories: finance, artificial intelligence, e-commerce, transportation and geography, lifestyle services, enterprise management, and public affairs — with thousands of API products currently available for sale. API Gateway manages the full API lifecycle — publishing, throttling, access control, metering, and sales. |
| 7 | Call an API | Call the API using an authorized app. Grant or request authorization using Authorize an API. |
Data Push
Data Push queries data sources on a schedule and pushes the results to messaging channels. Configure the push frequency, target channels, and recipient list to automate data delivery without writing pipeline code. For details, see Data Push.
Quick start
This tutorial walks through the full workflow: create a data source, build an API from a MySQL table, test it, publish it, and call it.
What you'll build: a data API backed by a MySQL table that accepts a uid query parameter and returns matching rows. The API is published to API Gateway and callable by authorized apps.
Prerequisites
Before you begin, ensure that you have:
-
An active DataWorks workspace
-
A MySQL data source configured in DataWorks. This tutorial uses a source named
rds_workshop_log. For setup, see Configure a data source. -
A Serverless resource group with a DataService Studio quota configured. See Configure a quota for DataService Studio in a Serverless resource group.
Step 1: Create a data source and configure network connectivity
DataService Studio uses the data source to retrieve table schema during API configuration and to run queries when the API is called.
-
Go to DataWorks Management Center, select your workspace, and click Go to Management Center.
-
In the left navigation pane, click Data Source.
-
Click Add Data Source and select MySQL.
-
Configure the connection parameters. For field descriptions, see Configure a MySQL data source.
-
Select your Serverless resource group and run the connectivity test.
- If you have high-concurrency tasks that cannot be run during off-peak hours, use dedicated resources to support high-concurrency and high-frequency API calls. We recommend that you purchase and use a Serverless resource group from DataWorks. - When using a Serverless resource group, configure a DataService Studio quota before running API calls. - If the connectivity test fails, see Network connections and whitelists.
-
Click Complete to save the data source.
Step 2: Create an API group
API Gateway organizes APIs into groups. Each group is associated with a domain name used to construct the API call address. Create an API group before creating APIs in DataService Studio.
-
Go to the API Gateway console and open the Group Management page.
-
Click Create Group, fill in the group details, and confirm. This tutorial uses a group named
Workshop.
Step 3: Create a business process
A business process organizes related APIs and functions into a single unit. APIs must belong to a business process.
-
Log on to the DataWorks console. In the top navigation bar, select your region, then choose Data Analysis and Service > DataService Studio. Select your workspace and click Go to DataService Studio.
-
On the Service Development page, create a business process using either method:
-
Click the
icon and select Create Business Process. -
Right-click the Business Process folder in the left navigation pane and select Create Business Process.
-
-
Configure the business process:
Parameter Description Business Name A name for this business process. This tutorial uses DataService.API Group The API group that manages APIs in this business process. Select the Workshopgroup created in Step 2. An API group is the smallest management unit in API Gateway — it maps a set of APIs to a domain name. -
Click OK.
Step 4: Generate an API
With a business process in place, generate an API from the MySQL table.
-
On the Service Development page, start the API creation using either method:
-
Click the
icon and choose Create API > Generate API. -
Right-click the business process in the left navigation pane and choose New > API > Generate API.
-
-
In the Generate API dialog box, configure the API properties:
Parameter Description Destination Folder The folder within the business process where the API is stored. Select a folder, or create a business process first if no folder is available. API Mode Codeless UI — configure without code. Code editor — write custom SQL for advanced queries (table joins, aggregate functions). This tutorial uses the codeless UI. API Name A name for the API. This tutorial uses rpt_user_info_all_d.API Path The URI path appended to the service host to form the call address. This tutorial uses /user.Protocol HTTP or HTTPS. To use HTTPS, bind an independent domain name and upload an SSL certificate in the API Gateway console after publishing. See Support for HTTPS. Request Method GET or POST. With GET, Parameter Position for request parameters must be QUERY. With POST, Parameter Position can be QUERY or BODY. Response Type JSON (only supported format). Visible Scope Workspace — visible to all workspace members, authorization supported. Private — visible only to the API owner, authorization not supported. This tutorial uses Workspace. 
-
Configure the data source and parameters on the API editing page: In Select Table, choose the data source: In Select Parameters, select the table fields to use as request and response parameters. Add fields to Sort Fields to control sort order. This tutorial uses
uidas the request parameter and all table fields as response parameters.Click Request Parameters or Response Parameters in the right navigation pane to edit field type, sample value, and default value.
Parameter Description Data Source Type The database type. This tutorial uses MySQL. Data Source Name The data source configured in Step 1. This tutorial uses rds_workshop_log.Data Source Environment In standard mode workspaces, choose between the development and production environment. See Comparison of basic mode and standard mode. This tutorial uses Production Environment. Data Table Name The table to generate the API from. This tutorial uses rpt_user_info_all_din therds_workshop_logdata source.
-
Configure the resource group: click Service Resource Group on the right side of the API editing page. Select a Serverless resource group with a configured DataService Studio quota (recommended) or an exclusive resource group for DataService Studio.
Step 5: Test the API
Test the API to verify the request and response before publishing.
Click Test in the upper-right corner of the API editing page. Set the uid request parameter to 0016359810821 and run the test. Confirm the response matches the expected data.
For details, see Test an API.
Step 6: Publish the API
After the API passes testing, publish it to API Gateway so other services can call it.
Click Submit in the upper-right corner of the API editing page and select the version to publish. After publishing, the API is available in API Gateway. You can also list the API on Alibaba Cloud API Marketplace to sell it.
For details, see Publish an API.
Step 7: Call the API
DataService Studio supports two authentication methods for API calls:
-
Simple Authentication: Lower security. Suited for internal dashboards and reports.
-
Encrypted Signature Authentication: Higher security. Suited for application development.
To call the API:
-
In the DataService Studio top menu bar, click Service Management.
-
In the left navigation pane, select API Invocation.
Published APIs are hosted in API Gateway and callable using an API Gateway SDK. For code samples, see Examples of calling an API from a client.
Step 8: View and manage the API
After publishing, manage your APIs from the Service Management page.
| Feature | Description |
|---|---|
| API Management | View published APIs, APIs authorized to you, and APIs you have authorized to others. Unpublish, authorize, or test APIs from this page. |
| API Metering | Metering Dashboard: View total API count, status code distribution, error code distribution, overall metering, and resource group allocation. Metering Details: Inspect per-API metrics including API Gateway status codes, DataService Studio error codes, request counts by app, bandwidth, and average response time. Log Analysis: Analyze call requests and diagnose abnormal calls with intelligent analysis. |
What's next
-
Generate API overview — compare codeless UI and code editor in detail
-
Register an external API service — onboard existing APIs for unified management
-
Create a function (filter) — add pre- or post-processing to your APIs
-
Data Push — push query results to messaging channels on a schedule