Use OAuth Token for HTTPS Authentication
The Oracle Primavera Cloud Data Service uses HTTPS token authentication to authenticate requests. To authenticate, clients must provide the token generated by a valid Primavera Cloud user or an authorization server in the HTTPS headers of their requests. Various tools and programming languages, such as curl and Java, offer mechanisms to facilitate HTTPS token authentication.
Depending on the authentication type you are using, see the How Does Primavera Cloud Data Service Support OAuth 2.0? or How Does Primavera Cloud Data Service Support Basic Authentication? sections to learn how to generate an OAuth token to access the data service.
Authentication Using curl
To authenticate using curl, include the OAuth access token that was generated through Basic Authentication or an authorization server in your request headers.
curl -X GET https://<SERVER_URL>/data/rest/dataservice/tables \ -H "Authorization: Bearer <OAuth-Access-Token>" \ -H "x-prime-tenant-code: <tenant-code>" \ -H "<x-param1>: <param1-value>" \ -H "<x-param2>: <param2-value>" \ -H "<x-paramN>: <paramN-value>"
Where:
-
<SERVER_URL>
is the server URL where Oracle Primavera Cloud is deployed (For example, primavera.oraclecloud.com). -
<OAuth-Access-Token>
is the OAuth token generated using Basic Authentication or an authorization server. -
<tenant-code>
is your Oracle Primavera Cloud tenant code where the data exists (see note below). - All the
<x-param>
and<param-value>
pairs represent the additional headers and their values that need to be specified (see note below).
Note:
You can find the values for<OAuth-Access-Token>
and
<tenant-code>
, and also any additional headers and their values, in the OAuth access token generation response. For details, see
How Does Primavera Cloud Data Service Support Basic Authentication? For the additional headers, note that all fields under '
requestHeaders
' in the access token generation response need to be passed as headers in your Oracle Primavera Cloud Data Service API calls.