Make REST Call

Use the Make REST Call step to contact any of the REST Services exposed within or outside Unified CCX.

Make REST CaLL

Make REST Call Properties

Property

Description

URL

Variable or an expression resolving to the REST URL.

Open the Expression Editor by clicking the down arrow with ellipses and then form the REST URL using the required variables (parameters).

Note

HTTPS certificate of the remote web service should be added to Unified CCX trust store when using HTTPS URLs.

Use HTTP Proxy

Use this option to enable proxy for this step. The proxy can be configured in the Cisco Unified CCX Administration web interface at the following menu location, System > System Parameters. The options are:

  • Yes (If configured)

  • No

Default value is No.

Timeout (ms)

Use this timeout value for both connection timeout and read timeout. If 5000 milliseconds is specified as the timeout value, the step times out when a connection is not established within five seconds. It also times out when the connection is established but no response is obtained within five seconds.

The default value is 5000 milliseconds.

User ID

Enter the username for the REST Service authentication or declare the username as variable and associate that to User ID from the drop-down list.

Password

The password is shown in plain text. Use a variable for the password and expose it as a script parameter so that changing the password is easy if required.

Content Type

REST step accepts any valid content type. The commonly used content types are Application/XML and Application/JSON.

Method

  • The GET method lists all the instance of the object or gets details of the instances specified by instanceid.

  • The POST method creates a new instance of the object.

  • The PUT method modifies the instance specified by instanceid.

  • The DELETE method deletes the instance specified by the instanceid.

URL Parameters

Enter query parameters as key value pairs. These key value pairs are appended to the URL.

Headers

The names of the headers and the corresponding values that are associated with this REST method call step.

For example: Custom Authorization headers can be provided based on the server requirements as below: Name: Authorization and Value: token 9f40ce248e17d613fb63002f4b4ebad1dad30bd4

Body

Declare the body string as variable and associate that to Body from the drop-down list or directly hard code the string in the Body.

Note

It is applicable only to PUT and POST method.

Response

The REST response is converted to a string and is assigned to the associated string variable.

If it is an XML Document, for more information, see Create XML Document Step and Get XML Document Data Step .

If it is a JSON Document, for more information, see Create JSON Document Step and Get JSON Document Data Step.

Status Code

Status code returned by REST API.

Status Detail

Status details returned by the REST API.

Do not use hard-coded string for the output variables. For output variables such as Response, Status Code, and Status Detail, declare the variables first and then associate the declared variables to the output variables.

For example, for Response, declare a variable called Response and then choose the variable Response from Response drop-down list.

If you access the external secure REST APIs, upload certificates to platform Tomcat’s keystore. The engine Tomcat picks them up from platform Tomcat.

For information about uploading certificates, see Cisco Unified Operating System Administration Guide for Cisco Unified CCX and Cisco Unified IP IVR at https://www.cisco.com/c/en/us/support/customer-collaboration/unified-contact-center-express/products-maintenance-guides-list.html.

Note

If the variable or an expression resolving to the REST URL is an HTTPS URL, by default the hostname in the URL and the hostname in the SSL certificate (either in CN or one of the SubjectAltName) are checked to ensure that they are the same. To disable this default behavior, call the Set Session Info Step prior to the Make REST Call step and set the cc_accept_all_hosts session context variable to true.

To specify the query parameters for the URL, there are two ways:

  • Construct the URL with query parameters using the Unified CCX Express Editor.

  • Pass the query parameters as key value pairs in the Parameters table. These key value pairs are appended to the URL.