Configuring the Unica Plan REST API in Unica Platform

Use this information to configure the Unica Plan REST API in Unica Platform.

Procedure

  1. 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 of token lifetime increases the number of requests to keep the Offer selector panel open. We recommend that you do not reduce the value of token lifetime.
  2. 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.

  3. 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)
  4. 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)
  5. 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
  6. Select Plan V2 APIs > Edit settings and configure the following values:
    
    API URI: /v2/*
    Block API access: (Disabled)
    Secure API access over HTTPS: (Disabled)
    Require authentication for API access: (Enabled)
    
  7. Click Save changes to save the configurations.
  8. 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.
  9. 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.