Using curl
Perform the following steps to create a project for Oracle Primavera Cloud using the Oracle Primavera Cloud Data Service.
Step 1: Obtain Account Information
Contact your account administrator to obtain the account credentials required to manage workspaces using the data service. You will need:
- A username and password for Oracle Primavera Cloud that has the application administrator privilege
- The URL of your Oracle Primavera Cloud Data Service RESTful endpoints
Step 2: Run a Query
To run a query using the Oracle Primavera Cloud Data Service, send an HTTP POST request to the
/runquery
endpoint. Your POST request must include additional JSON data that specifies the table names, columns, and criteria of the query.
The following example uses a JSON file named query.json to query ACTIVITY_ID, ACTIVITY_NAME, ACTIVITY_TYPE, STATUS, START_DATE, FINISH_DATE columns on SM _ACTIVITY table, with criteria PROJ_ID=1 and PLANNED_HOURS >= 1200.
{ "name": "My Activities", "sinceDate": null, "tables": [{ "tableName": "SM_ACTIVITY", "columns": [ "ACTIVITY_ID", "ACTIVITY_NAME", "ACTIVITY_TYPE", "STATUS", "START_DATE", "FINISH_DATE" ], "condition": { "columnName": null, "operator": "AND", "value1": null, "value2": null, "conditions": [{ "columnName": "PLANNED_HOURS", "operator": "GREATER_THAN_OR_EQUALS", "value1": "1200", "value2": null, "conditions": null }, { "columnName": "PROJ_ID", "operator": "EQUALS", "value1": "1", "value2": null, "conditions": null } ] } }] }