Debugging an API
Scenarios
You can debug an API on the management console by adding HTTP header parameters and body parameters.
- APIs whose backend paths contain environment variables cannot be debugged.
- APIs bound to a signature key cannot be debugged.
- If a request throttling policy has been bound to an API, the policy does not take effect when you debug the API.
Prerequisites
- An API has been created.
- The backend service has been set up.
Procedure
- On the DataArts Studio console, locate a workspace and click DataArts DataService.
- In the left navigation pane, choose an edition, for example, Exclusive Edition. The Overview page is displayed.
- Choose .
- Use either of the following methods to debug an API:
- Locate the row that contains the target API, and choose .
- Click the name of the target API, and click Test on the displayed API details page.
You can configure API request parameters in the left pane. See Table 1 for parameter details. The request information sent by the API and the returned result after the API request is invoked are displayed on the right.
Table 1 Debugging APIs Parameter
Description
Parameters
Query parameters and their values.
Cluster Settings
Supported only by Exclusive Edition. Select the instance where the API to be debugged resides.
The information displayed on the debugging page varies according to the request type.
- After request parameters are added, click Debug.
The API calling response information is displayed in the command output area in the right pane.
- If the API is successfully called, HTTP status code 200 and response information are returned.
- If no result is returned within 60 seconds (default value), a timeout error is reported.
- If the debugging fails, the HTTP status code 4xx or 5xx is returned.
- You can send different requests using varied parameters and values to verify the API.
To modify the API parameters, click Edit in the upper right corner. The API editing page is displayed.
Follow-up Procedures
After the API is successfully debugged, you can publish the API so that the API can be called by users. For how to publish an API, see Publishing an 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