Working with HCL OneTest Server REST services

When you want to use the HCL OneTest Server REST APIs in your test automation scripts, you can view the REST APIs that are exposed by HCL OneTest Server. You can also run the APIs from within your project in HCL OneTest Server.

All REST services are accessible from the base URL of HCL OneTest Server and are defined by using Swagger. A navigable user interface lists the available set of APIs at <server_URL>/#/Initial/Admin/docs. This Swagger file describes the individual APIs along with details of the parameters and response bodies.

You must be assigned the role of an administrator to be able to view or run the REST APIs.

After you log into HCL OneTest Server with your credentials that has administrator privileges, you must go to the following URL: <server_URL>/#/Initial/Admin/docs

The Swagger docs that are available can be viewed from the drop down list.

You can select the Swagger doc for the REST APIs that you want to view or use. For example, you can select the /jobservicev2/api-docs to view the APIs for the execution micro-service.

You can perform the following steps to view or run the API:
  1. Expand the section to view the APIs that are available.
  2. Expand each of the APIs to view the details such as the description, examples, parameters, and responses.
  3. Run the API by clicking the Try it out option and then enter the required values for the parameters.
  4. Click Execute to start the API.

You can view the response after the API runs.