Create a third-party API using the codeless UI
You can use the codeless UI to create APIs from third-party platforms. This process generates an API for subsequent calls and reduces the cost of resource operations.
Prerequisites
An application has been created. For more information, see Create an application.
Procedure
Log on to the Data Resource Platform console.
In the upper-left corner of the page, click the
icon and select Collaboration.In the top menu bar, click the
icon, select the target workspace, and click Asset Processing.In the navigation pane on the left, click the
icon and select API Development > Third-party API.In the upper-right corner of the Third-party API page, select Create API > Create with Codeless UI.
On the Third-party API-Create page, configure the API.
Set the basic information for the API.
Name
Description
API Name
The name of the API to create. This is a custom name.
Application
The application to which the API belongs. You can create a custom application in the System Settings module or on the Create API page. For more information about how to create an application, see Create an application.
Service URL
You can contact the corresponding provider to obtain it.
ContentType
Contact your provider to obtain it.
Request Method
Select the request method for the encapsulated API. POST and GET are supported.
Service Protocol
Select a service protocol.
API Path
The fixed path displayed when the API is called. It is automatically generated by default.
Call Authentication Method
Two methods are available: Simple Authentication and Encrypted Authentication. For more information, see Authentication methods.
Simple Authentication: This method is suitable for API calls within a workspace, such as for testing. To make calls within the workspace, use the AppCode of the application to which the API belongs.
Encrypted Authentication: This method calculates a signature using an encryption algorithm and includes it in the request header to call the API. It provides higher security and is suitable for API calls in application development scenarios after the API is shared.
Tags
Custom tags. This parameter is optional.
Description
A custom description of the API. This parameter is required.
In the Parameter Settings section, configure the API parameters.
Parameter
Description
Resource Group
Select a service resource group.
NoteAPI testing and calls consume resources from the resource group after the API is published. Select a suitable service resource group based on its specifications and resource usage.
Signing Method
Select a Signing Method.
Request and Response Parameters
Set the request and response parameters as needed. The following example uses Request Parameters (Body).
In the Request Parameters (Body) section, click Add Parameter and select Add Parameter. Then, enter a field name, select a data type, set a default value, and specify whether the parameter is required and whether to filter by this parameter during authorization.
In the Request Parameters (Body) section, click Add Parameter and select Add from JSON. In the Add Parameters from JSON dialog box, paste the JSON code and click OK to generate the corresponding fields.
NoteIf you select Yes for Filter at Authorization, the authorization filter configuration item appears on the Authorization page. For more information, see Authorize an API.
You can use either Add Parameter or Add from JSON. The two methods overwrite any parameters that are already set.
The request parameters are derived from the request parameters of the registered API provider's URL.
Filter
(Optional) Turn on the Filter switch to show or hide the information module. For more information, see API result filters.
Test the API. Click Start Test and check the response.
Configure API throttling.
Parameter
Description
Maximum QPS for API
The maximum queries per second (QPS) for the API must be a positive integer no greater than 10,000. If Service Resource Group is set to Public Resource Group, the maximum QPS for the API can only be 1. For more information, see Parameters for API throttling.
Timeout Configuration
Select the response timeout period for a single API call. If Service Resource Group is set to Public Resource Group, the maximum response timeout period is 10s.
Enable Cache
Turn on the Enable Cache switch. API calls will then request the cache.
Cache Duration
After you enable the cache, you can manually set the cache expiration time. The maximum cache duration is 3,600 seconds.
After you configure the API parameters, click Save or Save and Publish.
The new API appears in the API resource list.
Related operations
Operation | Description |
Edit an API | In the API resource list, find the target API and click Edit in the Actions column. You can then modify the API on the editing page. Note
|
Copy an API | In the Actions column of the API resource list, choose More > Copy. A new draft API is created in the API resource list. To modify the copied API, click Edit in its Actions column. |
Delete an API |
Note You cannot delete published APIs. |
What to do next
After you create an API, you must publish it to make it available for use. For more information, see Publish an API.