Updated on 2022-12-05 GMT+08:00

Debugging an API

Debug APIs to ensure that they function properly.

Constraints

  • APIs whose backend request paths contain environment 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 Retries is greater than 30 seconds in Defining the Backend, API debugging will time out.

Procedure

  1. Log in to the ROMA Connect console. On the Instances page, click View Console next to a specific instance.
  2. In the navigation pane on the left, choose API Connect > APIs. Then choose More > Debug of an API.
  3. On the APIs tab displayed, click Debug in the upper right corner and configure the request parameters.
    Table 1 Request parameter configuration

    Parameter

    Description

    Parameters

    • Path Variables: Path variables can be configured only if the API request path contains path parameters.
    • Query Strings: Click Add Request Parameter to add and configure query parameters.

    Headers

    Click Add Request Parameter to add and configure header parameters.

    Body

    Add body parameters to the edit box. TEXT, JSON, and XML formats are supported.

  4. When the configuration is complete, click Debug. The request sent when you call the API and the response received are displayed in the lower part of the page.
    • Status code 200 and a normal response body: API called successfully
    • Status code 4xx or 5xx and error code description: API call failed. For details, see Appendix: API Error Codes.

    You can send more requests with different parameters and values to verify the API.