Configure the Primavera Unifier Connection

This recipe includes one connection for Primavera Unifier:

  • Unifier Rest API

This connection uses the standard REST Adapter to make calls to the Primavera Unifier REST API.

To configure the Unifier Rest API connection:

  1. In the Connections section, click Actions Actions icon on the connection, then select Edit.
  2. In the Properties section, do the following:
    1. In the Connection type field, select REST API Base URL.
    2. In the Connection URL field, enter the URL of your Primavera Unifier instance, including your region (if applicable), the host server, and your specific company code.

      For example: https://<region>.unifier.oraclecloud.com/<companycode>

      If there is no region, the base connection URL is:

      https://unifier.oraclecloud.com/<companycode>

  3. In the Security section, do the following:
    1. In the Security policy field, select OAuth Custom Two Legged Flow.
    2. In the Access Token Request field, enter the access token request in the following format:
      -X GET "https://<SERVER_URL>/ws/rest/service/v2/auth/token" \
        -H "Authorization: Basic <Base64-encoded-username-and-password>" \
        -H "Content-Type: application/x-www-form-urlencoded" \
        -d "grant_type=client_credentials"

      Where:

      • <SERVER_URL> is the base URL of your Primavera Unifier instance, including your region (if applicable), host server, and your specific company code (for example: <region>.unifier.oraclecloud.com/<companycode>).

      • <Base64-encoded-username-and-password> is the encoded Primavera Unifier user name and password value. See Prepare Base64-Encoded Credentials.

  4. In the Optional Security section enter the details in the following format:
    • Refresh Token Request = not applicable/leave blank
    • $access_token = access.[tT]oken
    • $refresh_token = refresh.[tT]oken
    • $expiry = expires_in
    • $token_type = token.[tT]ype
    • $access_token_usage = -H Authorization: Bearer ${access_token}

      Add Multi-tenancy headers to the access token usage (if applicable):

      -H x-unifier-tenant:<tenant-id> -H x-unifier-tenant-code:<tenant-code>

      You can confirm the exact header names/values by issuing the same token call in Postman/curl and inspecting the successful response for your tenancy.

      These fields map the JSON values from the token response and instruct Oracle Integration how to pass the token.

  5. Click Test to ensure that your connection is successfully configured. A message confirms if your test is successful.
  6. Click Save. If prompted, click Save again.
  7. To return to the project workspace, click Go back.