Using the Primavera Administration API

Select a client technology

Technologies that can form and send valid HTTP requests can access the Primavera Administration API. Programming languages that provide HTTP libraries and methods, such as Java and JavaScript, are examples of technologies you can use to interact with the API. Additionally, you can use HTTP enabled software, such as cURL, to access the API.

Note: In the examples below, the text surrounded in < > indicates a variable. You must replace variables with your own data to run the examples in this documentation.

Use the API to interact with Primavera Administration

The API exposes access to application functionality through a set of endpoint URLs. All API endpoints follow a consistent pattern. Use the following URL pattern to send requests to the API:

https://<server_URL>/cloudapi/restapi/<service>/<task>

The variables in the previous example should be replaced with the following information when accessing the API:

  • <server_URL>: The URL of the host server on which the application is deployed.
  • <service>: The REST API service you intend to call.
  • <task>: The task you wish the service to complete.

For example, to update the user status of a set of users, send a HTTP PUT request to the following URL:

https://<server_URL>/cloudapi/restapi/user/change-status

The variables in the previous example should be replaced with the following information when accessing the API:

  • <<server_URL>: The URL of the host server on which the application is deployed.

Path Parameters and Query Parameters

You must specify URL path parameters to access some API endpoints. Endpoints that require path parameters match the following URL pattern:

https://<server_URL>/cloudapi/restapi/<service>/<task>/{parameter}

		

For example, to view a status on a user's job with a jobId of 99694, you must specify the jobId as a parameter in the requested endpoint URL:

https://<server_URL>/cloudapi/restapi/user/status/99694

		

Notes:

Some API endpoints require you to provide additional JSON data with your request.

All PUT requests require an "<objectName>id" parameter, where <objectName> is the name of the object, that contains the target object to update's unique system generated identifier. Create requests do not require this parameter. If an object is created using a unique identifier that already exists for an object of the same type, the system will use an autogenerated unique value instead.

Use the most recent version of endpoints available to you.

There are multiple versions of some of the end points listed in this guide. As a general principle, you should use the latest version available to you.

Support for authentication using OAuth was added with version 3 of the REST API. If you are authenticating using OAuth, where there are multiple versions of an endpoint, you should use the version labeled "(v3)".

If you are not using OAuth for authentication, you should use either endpoints labeled "(v2)" where available or original endpoints that include no version number.