API Inspector is an experimental feature. With API Inspector, you can view the API calls behind each operation in the console, and automatically generate API code of different languages. You can debug online through Cloud Shell or OpenAPI Explorer.
- Automatic recording: To obtain related API calls, you only need to perform operations in the console. For more information, see Automatically record API calls.
- Code generating with one click: API code scripts in different languages with pre-filled parameters are generated and can be run directly. For more information, see Generate API codes with one click.
- Online debugging: When API Inspector is used together with OpenAPI Explorer and Cloud Shell, one-click online debugging can be implemented and you do not need to build the development environment. What you see is what you get. For more information, see Debug online through OpenAPI Explorer and Debug online through Cloud Shell.
Enable API Inspector
To enable API Inspector, follow these steps:
- Log on to the SLB console.
- In the lower-right corner of the page, click .
Automatically record API calls
In this topic, modifying the name of an SLB instance is taken as an example to demonstrate the automatic recording function of API Inspector.
- Choose .
- Modify the name of an SLB instance to SLB1.
- Click OK.
- Click on the right side of the page. Then you can see all API calls related to the preceding
- You can click Hide Describe Class to view core APIs. In this example, the core API is SetLoadBalancerName.
Generate API codes with one click
After API recording is completed, click the API name to generate API code scripts in Python, Java, Go, Node.js, and PHP, with pre-filled parameters.
Debug online through OpenAPI Explorer
After the API recording is completed, click OpenAPI Explorer or to go to the OpenAPI Explorer console to debug the corresponding function. The API parameter values have been automatically generated according to operations in the console.
Debug online through Cloud Shell
After API recording, unfold the API calling details and click to use the online one-click debugging function of Cloud Shell.
aliyun slb actionName --parameter1value1 --paramter2value2...
aliyun slb SetLoadBalancerName --RegionId cn-hangzhou --LoadBalancerName SLB1 --LoadBalancerId lb-bp1b6c719dfa08exfuca5
The returned value is: