Test an API in DataService Studio to verify that its request parameters and response meet your business requirements before publishing to API Gateway.
Testing uses the shared resource group for DataService Studio to access data sources or backend services. Charges are based on the number of API calls and execution time. For billing details, see Billable items.
Prerequisites
Before you begin, ensure that you have:
Created or registered the API you want to test (for APIs being developed)
Submitted and published the API (for published APIs). For more information, see Publish an API
Test an API being developed
Test an API on the Service Development tab before publishing it to catch parameter and response issues early.
Log on to the DataWorks console. In the top navigation bar, select a region. In the left-side navigation pane, choose Data Analysis and Service > DataService Studio. Select your workspace from the drop-down list and click Go to DataService Studio.
Click Service Management in the top navigation bar. In the left-side navigation pane, click Manage APIs. On the Published APIs tab, find the API and click Test in the Actions column.
In the Test APIs dialog box, configure the request parameters for the API.
Click Test. You can view information that is displayed in the Request Details and Response Details sections on the right side of the Test APIs page. If the test fails, check the error message, update the API settings, and run the test again.
API call latency: The time between sending the request and receiving the response. High latency indicates a potential performance issue — optimize the query logic or data source to reduce it.
Test a published API
Test a published API from the Service Management tab to verify it behaves correctly in production.
On the DataService Studio page, click Service Management in the upper-right corner.
In the left-side navigation pane, click Test APIs.
Select the API from the drop-down list and configure all request parameters.

Click Test. You can view information that is displayed in the Request Details and Response Details sections on the right side of the Test APIs page.
NoteThe Test APIs page only supports published APIs. You cannot update sample success responses from this page.
If paging returned results is enabled for the API, the sort order of results depends on the data source. To control sort order, configure a field for sorting in codeless UI mode, or add an
ORDER BYclause to SQL statements in code editor mode.
What to do next
After verifying that an API works as expected, publish it so other users can call it. For instructions, see Publish an API.