Cherwell REST API Command-Line Options

Use the Command-Line Configure (CLC) /restapiurl commands to get or set the Cherwell® REST API base URL. The base URL for the REST API is required for various CSM features, including authentication, Saved Searches, and webhooks.

You can also set the base URL for the Cherwell REST API in Cherwell Server Manager. See Set the Base URL for the Cherwell REST API.

Always use HTTPS instead of HTTP for security purposes.

In the following examples, square brackets (example: [Common]) denote placeholder variables for customer data. Replace these variables, including the brackets, with your own values.

/restapiurl

Example: Set the API URL:

/restapiurl /baseurl=https://host.domain/CherwellAPI/api/ /connection="[Common]Cherwell Browser" /connectionuserid=CSDAdmin /connectionpassword=CSDAdmin

Example: Get the API URL

/restapiurl /connection="[Common]Cherwell Browser" /connectionuserid=CSDAdmin /connectionpassword=CSDAdmin Output: https://host.domain/CherwellAPI/api/

Sub-command Description

/baseurl

Retrieve the Current URL

To retrieve the current base URL of the REST API, omit this value to write the current URL to the console.

Set the URL

The base URL of the REST API must be in the following format: https://host.domain/CherwellAPI/api/.

Accepted values: string

/connection

The name of the CSM connection.

Accepted values: string

/connectionuserid

The CSM user ID for the requested server.

Accepted values: string

/connectionpassword

The CSM password for the requested server.

Accepted values: string