Debugging an API
Overview
After creating an API, you can use the debugging function provided by ROMA Connect to debug the API.
Prerequisites
- APIs with backend request paths containing variables cannot be debugged.
- During API debugging, the request throttling policy bound to the API becomes invalid.
- If the value of Timeout (ms) multiplied by the value of Retry Times is greater than 30 seconds when defining the backend request, the API debugging times out.
Procedure
- Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
- In the navigation pane, choose API Connect > API Management. On the APIs tab page, choose More > Debug.
- In the API request parameter configuration area on the left of the page, configure API request information based on the API definition.
Table 1 Request parameter configuration Parameter
Description
Protocol
This parameter can be set only if the API protocol is set to HTTP&HTTPS.
Method
You can select a request method only if the API request method is set to ANY.
Path
You can add custom suffix (Suffix) to the request path only if the matching mode of the API request path is set to Prefix match.
Path Parameters
This parameter can be only if the API request path contains the path parameter.
Query Parameters
Add and configure query parameters based on the API definition.
Header Parameters
Add and configure header parameters based on the API definition.
Body
Body parameters can be configured only if Method is set to POST, PUT, or PATCH.
- After setting the request parameters, click Send Request. The request sent by the API and the response received by the API are displayed in the right pane of the page.
- If the API is successfully called, the status code 200 and a normal response body are returned.
- If the API fails to be called, the status code 4xx or 5xx and error code description are returned. For details, see Appendix: API Error Codes.
You can send more requests with different parameters and values to verify 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