{
    "openapi":"3.1.0",
    "info":{
        "title":"Oracle Primavera Cloud Data Service API",
        "version":"2026.03.27",
        "description":"Rest API for the Primavera Cloud Data Service",
        "x-summary":"Rest API for the Primavera Cloud Data Service"
    },
    "servers":[
        {
            "url":"/data/rest"
        }
    ],
    "tags":[
        {
            "name":"PrimaveraCloudDataService"
        }
    ],
    "paths":{
        "/dataservice/columns/{tableName}":{
            "get":{
                "tags":[
                    "PrimaveraCloudDataService"
                ],
                "summary":"Get available columns for the specified table",
                "description":"The result contains all available columns for the specified table",
                "operationId":"getColumnsForTable",
                "parameters":[
                    {
                        "name":"tableName",
                        "in":"path",
                        "description":"The table name",
                        "required":true,
                        "schema":{
                            "type":"string",
                            "exampleSetFlag":false,
                            "types":[
                                "string"
                            ]
                        }
                    }
                ],
                "responses":{
                    "403":{
                        "description":"You do not have access to the resource."
                    },
                    "404":{
                        "description":"The table does not exist"
                    },
                    "200":{
                        "description":"API success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "title":"List<MDColumnRO>",
                                    "type":"array",
                                    "exampleSetFlag":false,
                                    "items":{
                                        "$ref":"#/components/schemas/MDColumnRO",
                                        "exampleSetFlag":false
                                    },
                                    "types":[
                                        "array"
                                    ]
                                },
                                "exampleSetFlag":false
                            }
                        }
                    }
                },
                "x-internal-id":"dataservice-columns-{tableName}-get",
                "x-filename-id":"dataservice-columns-tablename-get"
            }
        },
        "/dataservice/assignmentSpread":{
            "post":{
                "tags":[
                    "PrimaveraCloudDataService"
                ],
                "summary":"Query the data for assignment spread",
                "description":"The result contains the spread data filtered in the request for assignment table.",
                "operationId":"getSpread",
                "requestBody":{
                    "description":"The query in json format",
                    "content":{
                        "application/json":{
                            "schema":{
                                "title":"QueryObject",
                                "$ref":"#/components/schemas/QueryObject",
                                "exampleSetFlag":false
                            },
                            "exampleSetFlag":false
                        }
                    },
                    "required":true
                },
                "responses":{
                    "403":{
                        "description":"You do not have access to the resource."
                    },
                    "404":{
                        "description":"Invalid query"
                    },
                    "200":{
                        "description":"API success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "title":"DataObject",
                                    "$ref":"#/components/schemas/DataObject",
                                    "exampleSetFlag":false
                                },
                                "exampleSetFlag":false
                            }
                        }
                    }
                },
                "x-internal-id":"dataservice-assignmentSpread-post",
                "x-filename-id":"dataservice-assignmentspread-post"
            }
        },
        "/dataservice/tables":{
            "get":{
                "tags":[
                    "PrimaveraCloudDataService"
                ],
                "summary":"Get available metadata tables",
                "description":"The result contains all the tables that the user can issue queries to retrieve data from",
                "operationId":"getTables",
                "responses":{
                    "403":{
                        "description":"You do not have access to the resource."
                    },
                    "200":{
                        "description":"API success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "title":"List<MDTableRO>",
                                    "type":"array",
                                    "exampleSetFlag":false,
                                    "items":{
                                        "$ref":"#/components/schemas/MDTableRO",
                                        "exampleSetFlag":false
                                    },
                                    "types":[
                                        "array"
                                    ]
                                },
                                "exampleSetFlag":false
                            }
                        }
                    }
                },
                "x-internal-id":"dataservice-tables-get",
                "x-filename-id":"dataservice-tables-get"
            }
        },
        "/dataservice/runquery":{
            "post":{
                "tags":[
                    "PrimaveraCloudDataService"
                ],
                "summary":"Query the data for a list of tables",
                "description":"The result contains the data from specified tables with specified columns. Invalid columns is ignored.\nThere are two extra sections in the result: pagination information and timestamp for next incremental query.\n",
                "operationId":"runQueryData",
                "requestBody":{
                    "description":"The query in json format",
                    "content":{
                        "application/json":{
                            "schema":{
                                "title":"QueryObject",
                                "$ref":"#/components/schemas/QueryObject",
                                "exampleSetFlag":false
                            },
                            "examples":{
                                "Query_Activity_Data":{
                                    "summary":"Query Activity Data",
                                    "description":"Payload to query data from an activity table.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_with_Specified_Condition":{
                                    "summary":"Query Activity Data with Specified Condition",
                                    "description":"Payload to query data with specified conditions from an activity table.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "condition":{
                                                    "operator":"AND",
                                                    "conditions":[
                                                        {
                                                            "columnName":"Planned Duration",
                                                            "operator":"GREATER_THAN_OR_EQUALS",
                                                            "value1":"0"
                                                        }
                                                    ]
                                                }
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_Joined_with_the_Project":{
                                    "summary":"Query Activity Data Joined with the Project",
                                    "description":"Payload to query data from an activity table joined with a project table.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "joinedTables":[
                                                    {
                                                        "tableName":"PROJECT",
                                                        "columns":[
                                                            "PROJ_ID",
                                                            "PROJECT_NAME"
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_Joined_with_the_Project_and_WBS":{
                                    "summary":"Query Activity Data Joined with the Project and WBS",
                                    "description":"Payload to query data from an activity table joined with project and WBS tables.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "joinedTables":[
                                                    {
                                                        "tableName":"PROJECT",
                                                        "columns":[
                                                            "PROJ_ID",
                                                            "PROJECT_NAME"
                                                        ]
                                                    },
                                                    {
                                                        "tableName":"CO_WBS",
                                                        "columns":[
                                                            "WBS_ID",
                                                            "WBS_NAME"
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_Joined_with_the_Workspace":{
                                    "summary":"Query Activity Data Joined with the Workspace",
                                    "description":"Payload to query data from an activity table with a join to a joined table.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "joinedTables":[
                                                    {
                                                        "tableName":"PROJECT",
                                                        "columns":[
                                                            "PROJ_ID",
                                                            "PROJECT_NAME"
                                                        ],
                                                        "joinedTables":[
                                                            {
                                                                "tableName":"Workspace",
                                                                "columns":[
                                                                    "WORKSPACE_ID",
                                                                    "NAME"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_Joined_with_the_Workspace_with_Specified_Condition":{
                                    "summary":"Query Activity Data Joined with the Workspace with Specified Condition",
                                    "description":"Payload to query data from an activity table with a join to a joined table with specified conditions.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "joinedTables":[
                                                    {
                                                        "tableName":"PROJECT",
                                                        "columns":[
                                                            "PROJ_ID",
                                                            "PROJECT_NAME"
                                                        ],
                                                        "joinedTables":[
                                                            {
                                                                "tableName":"Workspace",
                                                                "columns":[
                                                                    "WORKSPACE_ID",
                                                                    "NAME"
                                                                ],
                                                                "condition":{
                                                                    "operator":"AND",
                                                                    "conditions":[
                                                                        {
                                                                            "columnName":"IS_PRODUCTION",
                                                                            "operator":"EQUALS",
                                                                            "value1":"false"
                                                                        }
                                                                    ]
                                                                }
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                },
                                "Query_Activity_Data_Joined_with_Multiple_Workspaces":{
                                    "summary":"Query Activity Data Joined with Multiple Workspaces",
                                    "description":"Payload to query data from an activity table across multiple workspaces.",
                                    "value":{
                                        "tables":[
                                            {
                                                "tableName":"Activity",
                                                "columns":[
                                                    "ACTIVITY_ID",
                                                    "Name",
                                                    "ACTIVITY_TYPE",
                                                    "STATUS",
                                                    "START_DATE",
                                                    "Finish"
                                                ],
                                                "condition":{
                                                    "operator":"AND",
                                                    "conditions":[
                                                        {
                                                            "columnName":"Planned Duration",
                                                            "operator":"GREATER_THAN_OR_EQUALS",
                                                            "value1":"0"
                                                        }
                                                    ]
                                                },
                                                "joinedTables":[
                                                    {
                                                        "tableName":"PROJECT",
                                                        "columns":[
                                                            "PROJ_ID",
                                                            "PROJECT_NAME"
                                                        ],
                                                        "joinedTables":[
                                                            {
                                                                "tableName":"Workspace",
                                                                "columns":[
                                                                    "WORKSPACE_ID",
                                                                    "NAME"
                                                                ],
                                                                "condition":{
                                                                    "operator":"OR",
                                                                    "conditions":[
                                                                        {
                                                                            "columnName":"WORKSPACE_ID",
                                                                            "operator":"EQUALS",
                                                                            "value1":"2001"
                                                                        },
                                                                        {
                                                                            "columnName":"WORKSPACE_ID",
                                                                            "operator":"EQUALS",
                                                                            "value1":"4001"
                                                                        },
                                                                        {
                                                                            "columnName":"WORKSPACE_ID",
                                                                            "operator":"EQUALS",
                                                                            "value1":"8101"
                                                                        }
                                                                    ]
                                                                }
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "valueSetFlag":true
                                }
                            },
                            "exampleSetFlag":false
                        }
                    },
                    "required":true
                },
                "responses":{
                    "403":{
                        "description":"You do not have access to the resource."
                    },
                    "404":{
                        "description":"Invalid query"
                    },
                    "200":{
                        "description":"API success",
                        "content":{
                            "application/json":{
                                "schema":{
                                    "title":"DataObject",
                                    "$ref":"#/components/schemas/DataObject",
                                    "exampleSetFlag":false
                                },
                                "exampleSetFlag":false
                            }
                        }
                    }
                },
                "x-internal-id":"dataservice-runquery-post",
                "x-filename-id":"dataservice-runquery-post"
            }
        }
    },
    "components":{
        "schemas":{
            "MDColumnRO":{
                "title":"MDColumnRO",
                "type":"object",
                "properties":{
                    "displayName":{
                        "type":"string",
                        "description":"The user friendly column name",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "isPK":{
                        "type":"boolean",
                        "description":"If the column is the primary key",
                        "exampleSetFlag":false,
                        "types":[
                            "boolean"
                        ]
                    },
                    "isFK":{
                        "type":"boolean",
                        "description":"If the column is the foreign key",
                        "exampleSetFlag":false,
                        "types":[
                            "boolean"
                        ]
                    },
                    "tableName":{
                        "type":"string",
                        "description":"The database table name",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "columnName":{
                        "type":"string",
                        "description":"The column name",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "dataType":{
                        "type":"string",
                        "description":"The data type",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "fkTableName":{
                        "type":"string",
                        "description":"The foreign key table name if it is a foreign key column",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "tableType":{
                        "type":"string",
                        "description":"The table type",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ],
                        "enum":[
                            "STANDARD"
                        ]
                    }
                },
                "exampleSetFlag":false
            },
            "DataObject":{
                "title":"DataObject",
                "type":"object",
                "properties":{
                    "data":{
                        "type":"object",
                        "additionalProperties":{
                            "type":"array",
                            "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n",
                            "exampleSetFlag":false,
                            "items":{
                                "type":"object",
                                "additionalProperties":{
                                    "type":"string",
                                    "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n",
                                    "exampleSetFlag":false,
                                    "types":[
                                        "string"
                                    ]
                                },
                                "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n",
                                "exampleSetFlag":false,
                                "types":[
                                    "object"
                                ],
                                "jsonSchema":{
                                    "type":"object",
                                    "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n"
                                }
                            },
                            "types":[
                                "array"
                            ]
                        },
                        "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n",
                        "exampleSetFlag":false,
                        "types":[
                            "object"
                        ],
                        "jsonSchema":{
                            "type":"object",
                            "description":"A list of tables, which contains rows of column data.\nIt also returns a database date for next query to retrieve fresh data only.\nIf next query only cares about the data being created/updated after current query, it would supply sinceDate property from current query in the next query.\nA pagination section is also returned in the response to indicate if there is more data on the server.\nWhen nextTableName=\"-1\", no more data available.\nThe next query should use original query PLUS pagination information to retrieve the remaining data on server.\n"
                        }
                    }
                },
                "exampleSetFlag":false
            },
            "Condition":{
                "title":"Condition",
                "type":"object",
                "properties":{
                    "value1":{
                        "type":"string",
                        "description":"The first value of the criteria. When the operator is AND/OR/IS_NULL/IS_NOT_NULL, this property is ignored.",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "value2":{
                        "type":"string",
                        "description":"The second value of the criteria. This property is used only when the operator is BETWEEN.",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "columnName":{
                        "type":"string",
                        "description":"The column name. This property is ignored when the operator is AND/OR.",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "operator":{
                        "type":"string",
                        "description":"The condition operator",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ],
                        "enum":[
                            "AND",
                            "OR",
                            "IS_NULL",
                            "IS_NOT_NULL",
                            "EQUALS",
                            "NOT_EQUALS",
                            "GREATER_THAN",
                            "LESS_THAN",
                            "GREATER_THAN_OR_EQUALS",
                            "LESS_THAN_OR_EQUALS",
                            "BETWEEN"
                        ]
                    },
                    "conditions":{
                        "type":"array",
                        "description":"List of Conditions if the operator is AND/OR.",
                        "exampleSetFlag":false,
                        "items":{
                            "$ref":"#/components/schemas/Condition",
                            "exampleSetFlag":false
                        },
                        "types":[
                            "array"
                        ]
                    }
                },
                "description":"The criteria of the query",
                "exampleSetFlag":false
            },
            "JoinCondition":{
                "title":"JoinCondition",
                "type":"object",
                "properties":{
                    "parentTableColumn":{
                        "type":"string",
                        "description":"The column name of parent table",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "joinColumn":{
                        "type":"string",
                        "description":"The column name from joined table",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    }
                },
                "description":"Joined tables",
                "exampleSetFlag":false
            },
            "QueryObject":{
                "title":"QueryObject",
                "required":[
                    "tables"
                ],
                "type":"object",
                "properties":{
                    "name":{
                        "type":"string",
                        "description":"An optional query name",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "tables":{
                        "type":"array",
                        "description":"A list of queries for tables",
                        "exampleSetFlag":false,
                        "items":{
                            "$ref":"#/components/schemas/TableQuery",
                            "exampleSetFlag":false
                        },
                        "types":[
                            "array"
                        ]
                    },
                    "nextKey":{
                        "type":"string",
                        "description":"When there is more data on server, the result from last query returns nextKey property.\nThe value comes from last query when there is more data on server.\n",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "sinceDate":{
                        "type":"string",
                        "description":"A database date that the query fetches rows created/updated after it.\nThe value should either be null or returned from last query.\n",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "nextTableName":{
                        "type":"string",
                        "description":"When there is more data on server, the result from last query returns nextTableName property.\nA value \"-1\" indicates no more data on server.\nThe value comes from last query when there is more data on server.\n",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "pageSize":{
                        "maximum":10000,
                        "minimum":1,
                        "type":"string",
                        "description":"Specifies how many rows returned from this query",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    }
                },
                "exampleSetFlag":false
            },
            "TableQuery":{
                "title":"TableQuery",
                "required":[
                    "columns",
                    "tableName"
                ],
                "type":"object",
                "properties":{
                    "columns":{
                        "type":"array",
                        "description":"A comma separated list of columns of the query",
                        "exampleSetFlag":false,
                        "items":{
                            "type":"string",
                            "description":"A comma separated list of columns of the query",
                            "exampleSetFlag":false,
                            "types":[
                                "string"
                            ]
                        },
                        "types":[
                            "array"
                        ]
                    },
                    "tableName":{
                        "type":"string",
                        "description":"The from table name of the query",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "condition":{
                        "description":"The filter of the query",
                        "exampleSetFlag":false,
                        "allOf":[
                            {
                                "$ref":"#/components/schemas/Condition"
                            }
                        ]
                    },
                    "joinedTables":{
                        "type":"array",
                        "description":"Joined tables",
                        "exampleSetFlag":false,
                        "items":{
                            "$ref":"#/components/schemas/TableQuery",
                            "exampleSetFlag":false
                        },
                        "types":[
                            "array"
                        ]
                    },
                    "joinCondition":{
                        "description":"Joined tables",
                        "exampleSetFlag":false,
                        "allOf":[
                            {
                                "$ref":"#/components/schemas/JoinCondition"
                            }
                        ]
                    }
                },
                "description":"A list of queries for tables",
                "exampleSetFlag":false
            },
            "MDTableRO":{
                "title":"MDTableRO",
                "type":"object",
                "properties":{
                    "tableType":{
                        "type":"string",
                        "description":"The table type",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ],
                        "enum":[
                            "STANDARD"
                        ]
                    },
                    "physicalTableName":{
                        "type":"string",
                        "description":"The actual table name in database",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "displayTableName":{
                        "type":"string",
                        "description":"The user friendly table name",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    },
                    "serviceCode":{
                        "type":"string",
                        "description":"the microservice name that the table belongs to",
                        "exampleSetFlag":false,
                        "types":[
                            "string"
                        ]
                    }
                },
                "exampleSetFlag":false
            }
        }
    }
}