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

Debugging an API

Overview

After creating an API, you can use the debugging function provided by ROMA Connect to debug the API.

  • APIs with backend request paths containing variables cannot be debugged.
  • During API debugging, the request throttling policy bound to the API becomes invalid.

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, choose API Connect > API Management. On the APIs tab page, choose More > Debug.
  3. 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.

  4. 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.