Introduction

The P6 REST API is a flexible interface to P6 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 to connect to the API. If the command runs successfully, the P6 server will return a JSON object containing all the user data in your P6 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 P6 username.

cURL Commands

Establish a login session:

curl -c cookies.txt -X POST "https://<host:port>/p6ws/restapi/login?DatabaseName=orcl" -H "accept: */*" -H "username:<username>" -H "password:<password>"

Get list of projects where ObjectId is less than 1000:

curl -b cookies.txt -X GET "http://<host:port>/p6ws/restapi/project?Filter=ObjectId:lt:1000&Fields=Name,ObjectId&OrderBy=ObjectId+desc" -H "accept: application/json"