All Products
Search
Document Center

Dataphin:Create an API in wizard mode (Dataphin table)

Last Updated:Nov 18, 2025

In wizard mode, you can create APIs based on Dataphin logical tables by configuring API parameters in a codeless UI. This topic describes how to create an API in wizard mode.

Prerequisites

  • To create an API based on a logical table, you must first create the required logical tables, such as logical dimension tables, logical fact tables, and logical aggregate tables. For more information, see Dimensional modeling.

  • For the logical table that you created, configure a sync task in the integration module as follows:

    The destination data source for the sync task must be supported by DataService Studio. You must also have read-through permissions for the data source.

    • In the navigation pane on the left, choose O&M > Auto Triggered Tasks. Select the node that corresponds to the logical table. Choose Data Backfill > Backfill Current and Downstream Nodes. In the node list, select Layer 6 and then select all nodes in the list. Verify that the data backfill instance ran successfully. For more information, see Appendix: Backfill data for auto triggered tasks.

    • In Ad Hoc Query, verify that the data meets your expectations and that the logical table contains data. For more information, see Query and download data.

    • Configure a sync task in the integration module. For the input component, select Logical Table Input Configuration (LogicalTable). For the output component, select MySQL Output Component. For more information, see Configure the LogicalTable input component and Configure the MySQL output component.

      After you configure and publish the sync task, you can create and submit or publish a logical table API in DataService Studio.

Limits

APIs created from logical tables are subject to the limitations of the compute engine. For more information about supported compute engines, see Compute engines supported by DataService Studio.

Permission description

Project administrators and developers can create APIs.

Notes

The request and response parameters of an API must originate from the same logical table. Otherwise, the API call fails.

Step 1: Select a method to create an API

  1. In the top menu bar of the Dataphin home page, choose Service > API Development.

  2. In the upper-left corner, select a project. In the navigation pane on the left, click API Service. On the API page, click + Create API.

  3. In the Create API dialog box, select Logical Table API-Wizard Mode (Dataphin table).

Step 2: Configure API parameters

  1. On the Create API page, configure the basic information and parameters for the API.

    API basic information

    Parameter

    Description

    API Name

    Enter a name for the API. The name must meet the following rules:

    • It can contain only letters, digits, underscores (_), and Chinese characters.

    • It must be 4 to 100 characters in length.

    • It must start with a letter.

    • It must be globally unique.

    Request Method

    The API supports the GET and LIST request methods.

    • GET: Requests the server to retrieve a specific resource.

    • LIST: Requests the server to retrieve a portion of resources.

    Data Update Frequency

    The frequency at which the API returns updated data. This helps callers understand the data timeliness. Supported frequencies are Daily, Hourly, Every Minute, and Custom. If you select Custom, you can enter up to 128 characters.

    API Group

    Select an API group from the current project. To create a group, see Create a service group.

    Description

    Enter a brief description of the API. The description can be up to 128 characters long.

    Protocol

    The API supports the HTTP and HTTPS protocols.

    • HTTP: Hypertext Transfer Protocol. HTTP is the most widely used network protocol.

    • HTTPS: If the gateway is configured as an Alibaba Cloud API Gateway dedicated or shared instance, you can select the HTTPS protocol. Ensure that the SSL certificate for the independent domain is valid to prevent call failures. To configure an SSL certificate, choose Platform Management Network Configuration and go to the Network Configuration page.

    Timeout

    The maximum duration for monitoring an API call. The default value is 3 seconds. You can set a positive integer from 3 to 60 seconds.

    If an API call exceeds the specified Timeout, an error is reported. This helps you promptly detect and handle exceptions during API calls. To view exceptions, see View and manage Service Monitoring APIs.

    Cache Settings

    You can Enable or Disable caching. If enabled, you need to configure Cache Timeout. The default is 300 seconds, and you can set a positive integer between 60 seconds and 1,000,000 seconds (approximately 277.78 hours).

    Version Number

    Enter a version number for the API. Each configuration has a version number so you can compare it with previous versions. The version number must be unique for the API. The naming convention is as follows:

    • The maximum length is 64 characters.

    • It can contain uppercase and lowercase letters, digits, underscores (_), periods (.), and hyphens (-).

    Return Type

    The default value is JSON.

    API request and response parameters

    To configure API Request Parameters and Response Parameters, first determine the source (Logical Table) of the input and output parameters. Then, add the parameters to the Request Parameters and Response Parameters areas. Finally, configure the basic information for the Request Parameters and Response Parameters.

    1. In the Parameter Checking panel, select a Mode and a Dataphin Logical Table. All fields from the selected logical table are listed at the bottom of the page.

      image.png

      Parameter

      Description

      Mode

      The Basic and Dev_Prod modes are supported.

      • In Basic mode, the production database is read during development, submission, and publishing.

      • In Dev-Prod mode, the developer database is read during development and submission, and the production database is read after publishing.

      Logical table fields

      Select the business category that contains the logical table, and then select the logical table. You can copy all fields or a single field from the table.

    2. In the list on the left, select one or more fields. Click the image icon to add the selected fields to the Request Parameters list on the right. Then, configure the basic information for the request parameters.

      image.png

      Parameter

      Description

      Parameter Name

      The public parameter that users use to access the API. The naming convention is as follows:

      • It can contain letters, digits, or underscores (_).

      • It must start with a letter.

      • It must be 1 to 64 characters in length.

      Bind Field

      The internal parameter that is accessed when the API is called.

      Parameter Type

      The parameter types include DOUBLE, FLOAT, STRING, DATE(yyyy-MM-dd HH:mm:ss), BOOLEAN, INT, LONG, SHORT, BYTE, BIGDECIMAL, and BINARY.

      Select a parameter type that corresponds to the field type in the logical table. If the field type is not in the list of available parameter types, select String.

      Operator

      The method used to process request parameters when the API is called. For more information about the supported operators and their meanings, see Appendix: Operators supported for API development.

      Example

      Enter an example value for the request parameter to help developers. For example, if the parameter name is ID, the parameter type is Int, and the operator is =, you can set the example to 5. You can enter up to 1,000 characters.

      Description

      Enter a brief description of the request parameter. You can enter up to 1,000 characters.

      Required

      Specifies whether the request parameter is required to call the API.

      • Select No: The SQL statement to call the API can be executed without this parameter.

      • Select Yes: The SQL statement to call the API cannot be executed without this parameter.

      For example, the request parameter is id and is required, and the response parameter is name. Executing the following statements yields different results:

      • select name from tableA where id=5;: Returns the corresponding name field and data.

      • select name from tableA;: The SQL statement fails to execute.

    3. In the list on the left, select one or more fields. Click the image icon to add the selected fields to the Response Parameters list on the right. Then, configure the basic information for the response parameters.

      image.png

      Parameter

      Description

      Parameter Name

      The name of the public parameter returned to users. The name must meet the following requirements:

      • Can contain letters, digits, and underscores (_).

      • Must start with a letter.

      • Must be 1 to 64 characters in length.

      Associated Column

      The internal parameter that is accessed when the API is called.

      Parameter Type

      The data format of the parameter. Supported parameter types include DOUBLE, FLOAT, STRING, DATE(yyyy-MM-dd HH:mm:ss), BOOLEAN, INT, LONG, SHORT, BYTE, BIGDECIMAL, and BINARY.

      Select a parameter type that corresponds to the field type in the logical table. If the field type is not listed, select String.

      Example

      Enter an example value for the response parameter to provide a reference for developers. The maximum length is 1,000 characters.

      Description

      Enter a brief description of the response parameter. The maximum length is 1,000 characters.

  2. Click Submit to create the API.

What to do next

  • After you create the API, test it and publish it to the DataService Studio marketplace to make it available for applications to call. For more information, see Test and publish APIs.

  • For information about how to delete an API, manage versions, or transfer ownership, see View and manage APIs.