You can register existing APIs in DataService Studio to centrally publish and manage them. For example, you can view API call details and logs, and manage API tags and versions.
Register an API
If you do not have an API, you must generate one. For more information, see Generate an API in the codeless UI.
On the Service Development page, click the
icon and choose .You can also open a business process, right-click API, and choose .
In the Register API dialog box, configure the parameters.

Parameter
Description
Destination Folder
The folder where the API is stored. Click the text to select a folder.
ImportantSelect a destination folder first. If you cannot select a folder, create a business process.
API Name
A custom name for the API. The name must be unique within the API gateway group and the workspace.
API Path
The path where the API is stored. Example: /user.
Protocol
The supported protocols are HTTP and HTTPS.
If you want to call the API over HTTPS, publish the API to the gateway. Then, bind an independent domain name in the API Gateway console and upload an SSL Certificate. For more information, see Support HTTPS.
Request Method
The supported methods are GET, POST, PUT, and DELETE.
Return type
The supported formats are JSON and XML.
Visible Scope
The scope can be Workspace or Private.
Workspace: The API is visible to all members in the current workspace.
Private: The API is visible only to its owner. You cannot grant permissions on the API to other members.
NoteIf you set the visible scope to Private, the API is visible only to you in the directory tree. Other members in the workspace cannot see it.
Label
Select tags from the Label list.
Description
A brief description of the API. The description cannot exceed 2,000 characters.
Configure the API
Double-click the registered API to open its configuration page. In the Define Backend Service section, configure the parameters.

Parameter
Description
Backend Service Host
The host of the API service that you want to register. The host must start with http:// or https:// and cannot contain a path.
NoteExample: If the URL of your API service is
http://xxx-cn-xxx.alicloudapi.com/user/info, you can set the backend service host tohttp://xxx-cn-xxx.alicloudapi.com. Configure this parameter based on the actual path of your API service.Backend Service Path
The path of the API service that you want to register. The path can contain parameters enclosed in brackets ([]), such as /user/[userid].
After you configure parameters in the path, the system automatically adds the path parameters to the request parameter list in the next step of the API registration wizard.
NoteExample: If the URL of your API service is
http://xxx-cn-xxx.alicloudapi.com/user/info, you can set the backend service path to/user/info. Configure this parameter based on the actual path of your API service.Backend Timeout
The timeout period for the backend service.
In the Define Request Parameters section, configure the parameters.

Parameter
Description
Request Parameters
Click Add Parameter to configure request parameters for the API.
The Parameter Position can be QUERY, HEAD, PATH, or BODY. Different request methods support different parameter positions. Select a position from the available options as needed.
Constant Parameters
Parameters with fixed values that are not visible to API callers. You do not need to pass constant parameters when you call the API. However, the backend service always receives the constant parameters and their values that you configure here.
This is useful when you need to fix the value of a parameter and hide it from API callers.
Request Body Definition
This parameter appears only when the request method is POST or PUT.
You can enter a body description in JSON or XML format. This serves as an example of the request body for API callers to reference.
In the Define Response Content section, enter a Normal Response Example and an Error Response Example. This helps API callers write code to parse the API response.
In the Define Error Codes section, enter the Error Code, Error Message, and Solution for API calls. This helps API callers identify the cause of errors.
Click the
icon in the toolbar to save the API.
What to do next
Test and publish:
After you configure the API, test it. For more information, see Test an API.
After the test is successful, click Submit in the upper-right corner.
In the navigation pane on the right of the API configuration page, click Version. Find the version that you want to publish and click Request to Publish. On the request page, the request type is set to Publish Data Service API by default. Enter a Reason and click Request Permission to submit the publishing request.
NoteIf an approval process is defined for the workspace, the API must be approved before it can be published. For more information, see Overview of Approval Center.
After the API is published, the configuration of the service resource group is applied to API calls.
Manage the API: You can perform operations on an API, such as cloning and deleting it, from the directory tree on the left side of the Service Development page. Alternatively, go to the Service Management page, expand the API list, and view the details of a published API. For more information, see View, delete, move, and clone an API, perform batch operations, and search for code in APIs.