Introduction

The Primavera Administration API is a flexible interface to Primavera Administration functionality based on the Representational State Transfer (REST) architectural style. Clients can use HTTP enabled technologies to interact with the API and access application features. For example, you can write programs in Javascript, Java, and other languages to create users, view a list of users, update a user's status, or update user details.

Caution: Personal information (PI) may be at risk of exposure. Depending on local data protection laws organizations may be responsible for mitigating any risk of exposure.

Quick Start

You can interact with the API using a variety of tools, such as cURL or Node.js. Run the following cURL command or Node.js script to connect to the API. If the command runs successfully, the Primavera Administration server will return a JSON object containing all the user data in your Primavera Administration environment.

Note: Text surrounded in < > indicates a variable. You must replace variables with your own data to run the examples in this documentation. For example, replace the <username> variable with your Primavera Administration username.

cURL Command

curl -u <username>:<password> -X GET -H "Accept:application/json" -H "Version:2" https://<hostName>:<portNumber>/cloudapi/restapi/user

Node JS Script

		
var https = require('https'); 
      var options = { 
      	hostname : "<hostName>", 
      	port : <portNumber>, 
      	method : 'GET', 
      	path : "/cloudapi/restapi/user", 
      	auth : "<username>:<password>", 
      	headers: { 
      		"Accept" : "application/json", 
      		"Version" : "2" 
      	} 
      } 
      var request = https.request(options, function(result){ 
      	result.setEncoding('utf8'); 
      	result.on('data', function(response){ 
      		console.log(response); 
      	}); 
      }); 
       
      request.on('error', function(err){ 
      	console.log("Could not process request: ", err); 
      }); 
       
      request.on('end', function(){ 
      	console.log("Finished processing response."); 
      }); 
       
      request.end();