Oracle Primavera Cloud REST Connection

This connection uses the standard REST Adapter to make API requests.

  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 Oracle Primavera Cloud REST API instance.

      For example:

      https://primavera.oraclecloud.com/api/restapi/

      Note:

      You must include /api/restapi/ in the URL.
  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 POST "https://<SERVER_URL>/primediscovery/apitoken/request?scope=http://<SERVER_URL>/api" \
        -H "Authorization: Basic <Base64-encoded-username-and-password>" \
        -d "grant_type=client_credentials"

      Where:

      • <SERVER_URL> is the base URL of your Oracle Primavera Cloud instance (for example, primavera.oraclecloud.com)
      • <Base64-encoded-username-and-password> is your encoded user name and password value. See Prepare Base64-Encoded Credentials.

      Note:

      The scope value must reference the application's context root (scope=http://<SERVER_URL>/api) and must always be http (not https).
  4. In the Optional security section, enter values for these fields in the following format:
    • $access_token: access.[tT]oken
    • $refresh_token: refresh.[tT]oken
    • $expiry: expires_in
    • $token_type: token.?[tT]ype
    • $access_token_usage:

      If single tenant, enter:

      -H Authorization: Bearer ${access_token}

      If multi-tenant, enter:

      -H Authorization: Bearer ${access_token} \
      -H x-prime-tenant:<PRIME_TENANT_NAME> \
      -H x-prime-identity-app:<PRIME_IDENTITY_APP> \
      -H x-prime-tenant-code:<PRIME_TENANT_CODE> \
      -H x-prime-region:<PRIME_REGION>

    Note:

    • The values for x-prime-tenant and the other prime headers come from your Oracle Primavera Cloud tenancy context.
    • x-prime-region may be optional depending on your environment.
  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 Back icon.