Getting started with the HCL Compass REST API

The HCL Compass REST API allows developers to interact with HCL Compass by using HTTP based REST APIs.

Note: Use of the REST API server is not supported in an on premises environment, such as on Windows and Linux. To use the HCL Compass REST API server in a supported environment, deploy the HCL Compass REST API server to a Kubernetes environment. For more information, see Getting Started with HCL Compass on HCL SoFy.

To install the HCL Compass REST API, select RESTful Services from the Server Components section from the package installation page during HCL Compass installation.

To begin using the HCL Compass REST API, you must first launch the HCL Compass REST API server.
  • To launch the HCL Compass REST API server on Windows, run the start.bat file from the <product_install_dir>\product-rest-server-distribution\bin directory.
  • To launch the HCL Compass REST API server on Linux, perform the following steps:
    1. Open a shell/terminal and change directory to the <product_install_dir>/product-rest-server-distribution/bin directory.
    2. Setup the HCL Compass environment by running: source /opt/hcl/ccm/compass/cq_setup.sh.
    3. Start the HCL Compass REST API server by running: ./start.sh.
The HCL Compass REST API utilizes the following conventions:
  • HTTP GET is used for retrieval.
  • HTTP POST is used for creation.
  • HTTP PATCH is used for modification.
  • HTTP DELETE is used for deletion.

The HCL Compass REST APIs expect and provide responses in JSON format (Content-Type: application/json) unless otherwise noted.

The HCL Compass REST APIs return standard HTTP codes, such as
  • 200 for successful operation
  • 404 for record not found

This guide does not cover all available APIs. For detailed documentation for all APIs, see https://localhost:8190/swagger-ui/index.html where localhost is the actual server name where the HCL Compass REST API server is running.

To view the API Specification in JSON format, see https://localhost:8190/api-docs where localhost is the server name where the HCL Compass REST API server is running.