Debugging an API
After creating an API, debug it on the APIG console by setting HTTP headers and body to verify whether the API is running normally.
- APIs with backend request paths containing variables cannot be debugged.
- If an API has been bound with a request throttling policy, the policy will not work during debugging of the API.
- The maximum backend timeout is 60s for API debugging.
Prerequisites
You have set up the backend service of the API.
Procedure
- Go to the APIG console.
- Select a dedicated gateway at the top of the navigation pane.
- Choose API Management > API Groups.
- Click a group name.
- On the APIs tab, select the target API and click Debug.
- Configure the URL and request parameters of the API.
Select a request method, protocol, and domain name, and set request parameters.
Select the debugging or an independent domain name. If you select a wildcard domain name, specify the subdomain name.
If the independent domain name you select is a wildcard domain name, you can use any of its subdomain names to access all APIs in the group to which the domain name is bound.
For example, if a wildcard domain name is *.aaa.com, the subdomain name can be default.aaa.com or 1.aaa.com.
- Click Debug.
- The box on the lower right displays the response of the API request.
- If the debugging is successful, an HTTP status code starting with 2 and response details are displayed.
- If the request fails to be sent, an HTTP status code 4xx or 5xx is displayed. For details, see Error Codes.
- You can send more requests with different parameters and values to verify the API.
Follow-Up Operations
After the API is successfully debugged, publish the API in a specific environment so that the API can be called by users. To ensure security, create policies for the API.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot