Configuring the Unica Plan REST API in Unica Platform
Use this information to configure the Unica Plan REST API in Unica Platform.
Procedure
-
Under Unica Platform | General
| Miscellaneous, set a
token lifetime
. This value is the number of seconds the token from the login method is valid. For example, you could set this value to 86400 so the token is valid for a day after login. By default this value is 20 seconds. This configuration does not refresh with a call to an API. If this time expires, you have to make a login call, obtain a new token, and use it in the subsequent API calls.Note: Reducing the value oftoken lifetime
increases the number of requests to keep the Offer selector panel open. We recommend that you do not reduce the value oftoken lifetime
. -
Under Unica Platform | Security
| API management, configure the following settings.
Enable session-based API authentication: (Enabled) Delete security token after a single use: (Disabled)
If Delete security token after a single use is enabled, a login call is required before every API call.
-
Under Unica Platform Security |
API management |, configure the following settings for authentication.
API URI: /authentication/login Block API access: (Disabled) Secure API access over HTTPS: (Disabled) Require authentication for API access: (Enabled)
-
Click API configuration template, and add a logout method that the
client stub uses.
New category name: Logout API URI: /authentication/logout Block API access:(Disabled) Secure API access over HTTPS: (Disabled) Require authentication for API access: (Enabled)
-
Under API configuration template, add REST API Ver
1.0
New category name: REST API Ver 1.0 API URI: /* Block API access: (Disabled) Secure API access over HTTPS: (Disabled) Require authentication for API access: (Enabled) Enable SSL if you plan to use SSL
-
Select
and configure the following values:
API URI: /v2/* Block API access: (Disabled) Secure API access over HTTPS: (Disabled) Require authentication for API access: (Enabled)
- Click Save changes to save the configurations.
- Under Unica Platform Security | API management |, only one hard coded user can be used. This user must be a Unica Plan admin user, and the password for this user should not be blank.
-
Use the following REST API URL structure in your configurations.
URL for authentication: http://<Host>:<Port>/unica/api/manager/authentication
The host and port should point to Unica Platform for authentication.
Unica Plan API URL: http://<Host>:<Port>/plan/api/plan/V1
The host and port should point to Unica Plan.