All Products
Search
Document Center

DataWorks:Publish an API

Last Updated:Jan 25, 2024

After you test an API, you can publish the API to API Gateway for full lifecycle management. For example, you can design, develop, test, publish, monitor, manage, and unpublish APIs. You can also publish APIs to Alibaba Cloud Marketplace for sales. This helps you realize the value of your data and form closed-loop business in an efficient manner. This topic describes how to publish an API to API Gateway and Alibaba Cloud Marketplace.

Prerequisites

Background information

API Gateway provides API lifecycle management services, including API publishing, management, O&M, and sale. API Gateway also provides services such as permission management, throttling, and access control. API Gateway provides a simple, fast, cost-effective, and low-risk service that you can use to aggregate microservices, separate the frontend from the backend, integrate systems, and provide features and data for partners and developers. When you publish an API in DataService Studio, the API is published to API Gateway. Then, API Gateway automatically generates the URL that is used to call the API. For more information about API Gateway, see What is API Gateway?

DataService Studio also allows you to publish the API to Alibaba Cloud Marketplace. For more information, see Publish an API to Alibaba Cloud Marketplace.

Publish an API to API Gateway

  1. Go to the DataService Studio page.

    Log on to the DataWorks console. In the left-side navigation pane, click DataService Studio. On the page that appears, select the desired workspace from the drop-down list and click Go to DataService Studio.

  2. In the Service Development pane, find the API that you want to publish in the Business Processes section and double-click the API name. On the configuration tab of the API, click Submit in the top toolbar.

    Note

    Only the APIs that have been tested can be submitted. For information about how to test APIs, see Test an API.

    After the API is submitted, a prompt message is displayed in the upper part of the page, and an API version is automatically generated. On the Version tab, you can view the current version information of the submitted API, such as the API status.版本

  3. Submit an application to publish the API.

    1. In the right-side navigation pane of the API configuration tab, click Version. Find the API version that you want to publish and click Request to Publish in the Actions column to go to the application page.

    2. Use the default application type Publish data service API and enter the reason for the application in the Reason for application field. Then, click Apply for permission to submit the application.

      Note

      If you defined an approval policy in DataWorks Approval Center, the API must be approved before the API can be published. For more information, see Overview.

  4. Wait for the application to be approved.

    After you submit the application, you can publish the API only after the reviewer completes the approval based on the approval policy in DataWorks Approval Center. The reviewer can view the application details and process the application on the Requests To Be Processed page in DataWorks Approval Center.

    Note

    After the application is approved, the status of the API on the Version tab changes from To Be Requested to Can Be Published.

  5. Publish the API.

    After the application is approved, click Version in the right-side navigation pane of the API configuration tab. Find the approval record and click Publish in the Actions column.

    After the API is published on the DataService Studio page, DataWorks publishes the API to the related API group in API Gateway based on the associated API group of the business process to which the API belongs. To view the API group that is associated with the business process, find the business process in the Service Development pane of the DataService Studio page, right-click the name of the business process, and then select Modify attributes. After the API is published, you can go to the API Gateway console and choose Open API > APIs to view the information about the published API.

After the API is published, you can go to the API Gateway console to view information about the API or configure throttling and access control settings for the API.

If you want to call the API in your application, create the application and authorize the application to use the API in the API Gateway console. Then, call the API in your application by signing the API request with the AppKey and AppSecret. For more information, see Examples on calling APIs. API Gateway also provides SDKs for mainstream programming languages. You can use the SDKs to integrate APIs into your application. For more information, see Download and use an SDK.

Publish an API to Alibaba Cloud Marketplace

The API sector of Alibaba Cloud Marketplace provides thousands of API products in the following categories: finance, AI, e-commerce, transportation and geography, living services, corporate management, and public affairs. Alibaba Cloud Marketplace provides a platform in which you can monetize your data.

After you publish APIs that are created or registered in DataService Studio to API Gateway, you can publish the APIs to Alibaba Cloud Marketplace with a few clicks. This is an easy way to achieve financial gains for your enterprise.

Before you publish an API to Alibaba Cloud Marketplace, you must register with Alibaba Cloud Marketplace as an independent software vendor (ISV).

Note

Only enterprise users can register with Alibaba Cloud Marketplace as an ISV.

  1. Log on to the ISV portal of Alibaba Cloud Marketplace.

  2. In the left-side navigation pane, click Listing. The Commodity Manager page appears.

  3. Click Create Product.

  4. In the Access Information step, configure the parameters based on your business requirements and click Next. Then, finish the other steps as prompted.