Calling an API

Use the API test tool to configure the API request and authentication. For details about how to call an API, see section "Calling Published APIs" > Calling APIs.

  1. Obtain the API request information and construct the API URL.

    For illustration purposes, an API and its documentation are obtained through offline channels. You can also obtain the authentication mode, request method, request path, and other information about the API.

  2. Add the header parameter X-Apig-AppCode and set the parameter value to the generated AppCode.

  3. Add the header parameter x-stage and set the parameter value to the running environment. Skip this step if the API has been published in the RELEASE environment.

  4. Click Send to send a request.

    If the API is called successfully, 200 OK is displayed. Otherwise, rectify the fault by referring to Error Codes.

    image1