Configure the Primavera Unifier Connections

After installing this recipe, you need to configure both of the delivered connections.

This recipe delivers two connections which the integrations will use to connect to Primavera Unifier through Oracle Integration:

  • Primavera Unifier Adapter Connection: Uses the Primavera Unifier Adapter to connect to Primavera Unifier.
  • Primavera Unifier Rest Connection: Uses the REST Adapter to connect to Primavera Unifier.

Follow the steps in the sections below to configure these connections.

Primavera Unifier Adapter Connection

To configure the connection:

  1. In the Connections section, click Actions Actions icon on the Primavera Unifier Adapter Connection, then select Edit.
  2. In the Properties section, in the Connection URL field, enter the base URL of your Primavera Unifier environment, including your region (if there is one), 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, in the Username and Password fields, enter the login credentials of the Primavera Unifier integration user.
  4. Click Save. If prompted, click Save again.
  5. Click Test to ensure that your connection is successfully configured. In the resulting dialog box, click Test again.
    A message confirms if your test is successful.
  6. To return to the project workspace, click Go back Back icon.

REST Adapter Connection

If this is a single tenant configuration (most common), then follow the steps below to configure the connection.

If this is a multi-tenant configuration (less common), then see REST Adapter Connection for Multi-Tenant Configurations (advanced).

To configure the connection:

  1. In the Connections section, click Actions Actions icon on the Primavera Unifier Rest 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 base URL of your Primavera Unifier environment, including your region (if there is one), 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 Two Legged Custom Flow.
    2. In the Access Token Request field, enter the access token request in the following format:

      -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic <Base64-encoded-username-and-password>" -d 'grant_type=client_credentials' https://<SERVER_URL>/ws/rest/service/v2/auth/token

      Where:

      • <Base64-encoded-username-and-password> is the Base64 encoded version of your Primavera Unifier user name and password.

        For information about how to obtain this, see Generate a Base64 Encoded User Name and Password.

      • <SERVER_URL> is the base URL of your Primavera Unifier environment, including your region (if there is one), host server, your specific company code. For example:

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

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

REST Adapter Connection for Multi-Tenant Configurations (advanced)

The configuration of the REST Adapter connection is mostly the same for multi-tenant configurations as it is for single tenant configurations, with the exception of the way you configure the Access Token Request. See below.

To configure the connection:

  1. In the Connections section, click Actions Actions icon on the Primavera Unifier Rest 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 base URL of your Primavera Unifier environment, including your region (if there is one), 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 Two Legged Custom Flow.
    2. In the Access Token Request field, enter the access token request in the following format:

      -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic <Base64-encoded-username-and-password>" -H "x-unifier-tenant:<MultiTenantHeader>" -H "x-unifier-tenant-code: <Tenant-Code>" -d 'grant_type=client_credentials' https://<SERVER_URL>/ws/rest/service/v2/auth/token

      Where:

      • <Base64-encoded-username-and-password> is the Base64 encoded version of your Primavera Unifier user name and password.

        For information about how to obtain this, see Generate a Base64 Encoded User Name and Password.

      • <MultiTenantHeader> is the Unifier tenant name.
      • <Tenant-Code> is the Unifier tenant code.

        For information about how to obtain values for <MultiTenantHeader> and <Tenant-Code>, see Obtain Tenant Information for the Access Token Request. In that section, you will run a curl command that returns a response that includes the required tenant information above. From that response, you will copy the values for <tenant> and <tenant-code>. Then you will return here to finish configuring the access token request, and you will replace the <MultiTenantHeader> variable above with the value for <tenant> that you obtained from the curl command response, and you will replace the <Tenant-Code> variable above with the value for <tenant-code> that you obtained from the curl command response.

      • <SERVER_URL> is the base URL of your Primavera Unifier environment, including your region (if there is one), host server, your specific company code. For example:

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

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

Note:

After configuring this connection, you will also need to copy the values for <endpoint>, <access token>, <tenant-code>, and <tenant> that you obtained from the curl command response mentioned above (see Obtain Tenant Information for the Access Token Request) and add those values to the corresponding lookups in the delivered lookup table. For details, see Configure Lookups.