forked from docs/doc-exports
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
6.0 KiB
6.0 KiB
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 a plug-in or traditional policy is bound to an API, the policy does not take effect during API debugging.
- 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.
- 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.
Parent topic: API Management