Configure the Delivered 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.

Unifier Adapter Connection

To configure the Primavera Unifier Adapter 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/<company-code>

      If there is no region, the connection URL is: https://unifier.oraclecloud.com/<company-code>

  3. In the Properties section, do the following:
    1. 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>

  4. In the Security section, do the following:
    1. In the Username and Password fields, enter the username and password of the Primavera Unifier integration user you created for this connection.
  5. Click Save. If prompted, click Save again.
  6. Click Test to ensure that your connection is successfully configured.
    A message confirms if your test is successful.
  7. 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 Primavera Unifier Rest 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 username and password value of your Primavera Unifier integration user. See Prepare Base64-Encoded Credentials.

  4. Click Save. If prompted, click Save again.
  5. Click Test to ensure that your connection is successfully configured.
    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 Primavera Unifier Rest 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 username and password value of your Primavera Unifier integration user. See Prepare Base64-Encoded Credentials.

  4. 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 -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 encoded username and password value of your Primavera Unifier integration user. See Prepare Base64-Encoded Credentials.

      • <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 instance, including your region (if applicable), host server, and your specific company code (for example: <region>.unifier.oraclecloud.com/<companycode>).

  5. Click Save. If prompted, click Save again.
  6. Click Test to ensure that your connection is successfully configured.
    A message confirms if your test is successful.
  7. 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.