Query Tables Data

post

/pds/rest-service/dataservice/runquery

Send a request to this endpoint to query databases registerd with Primavera data service. This endpoint returns either jobId or query results including with pagination, sinceDate, generated SQL query, current page record count and total records count.

Request

Query Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : QueryObject
Type: object
Title: QueryObject
The input object to fetch table data.
Show Source
Nested Schema : tables
Type: array
A list of queries for tables.
Show Source
Example:
  "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": "1200"          },          {            "columnName": "PROJ_ID",            "operator": "EQUALS",            "value1": "1"          }        ]      }    }  ]
Nested Schema : TableQuery
Type: object
Title: TableQuery
A list of queries for tables.
Show Source
Example:
  "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": "1200"          },          {            "columnName": "PROJ_ID",            "operator": "EQUALS",            "value1": "1"          }        ]      }    }  ]
Nested Schema : columns
Type: array
A comma separated list of columns.
Show Source
Nested Schema : Condition
Type: object
Title: Condition
The criteria of the query
Show Source
Nested Schema : joinedTables
Type: array
Joined tables.
Show Source
Nested Schema : orderByColumns
Type: array
The order by columns on views/synonyms.
Show Source
Nested Schema : conditions
Type: array
List of Conditions if the operator is AND/OR.
Show Source
Nested Schema : joinConditions
Type: array
List of Join Conditions with operator AND for an inner table
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful Operation
Body ()
Root Schema : DataObject
Type: object
Title: DataObject
The response entity.
Show Source
  • data
    The query response which contains pagination and sinceDate details.This will exists in response only if the mode is SYNC.
  • The unique identifier for the background service. This will exists in response only if the mode is either ASYNC or BLOB_COLUMNS.
Nested Schema : data
Type: object
The query response which contains pagination and sinceDate details.This will exists in response only if the mode is SYNC.

202 Response

Accepted

400 Response

Bad Request

500 Response

Internal Server Error

503 Response

Service Unavailable
Back to Top