Youc an use Personal Access Tokens to connect the HCL Compass REST API to its various REST
endpoints.
About this task
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 Helm Chart.
You can create a personal access token from the welcome page of the HCL Compass REST API. .
Procedure
-
Click on Personal Access Tokens from the left hand menu on the
screen.
-
Click Create New API Token.
-
Create a name for the token, select the expiration duration and click
Create. Optionally, you can extend the duration of the token or
revoke the token.
-
Copy the new token by clicking Copy. You will need to paste this
information when configuring your REST API connection.
-
When configuring authentication to connect to a REST API endpoint, select
Basic authentication and paste the entirely of the token. If
configuring using Postman, click Send. Once you click send, you
will see a response. To pass the request in cURL, see the following example:
curl -H "Authorization: : Basic <PAT>" https://<domain>:<>/ccmweb/rest/<endpoint>