Query the data for a list of tables.

post

/sync/rest-service/dataservice/runquery

The result contains the data from specified tables with specified columns. Invalid columns are ignored. There are two extra sections in the result: pagination information and timestamp for next incremental query.

Request

Supported Media Types
Query Parameters
Body ()
The query in json format.
Root Schema : QueryObject
Type: object
The query object for restful service.
Show Source
  • An optional query name.
  • Allowed Values: [ "The value comes from last query when there is more data on server" ]
    When there is more data on server, the result from last query returns nextKey property.
  • Allowed Values: [ "The value comes from last query when there is more data on server" ]
    When there is more data on server, the result from last query returns nextTableName property. A value "-1" indicates no more data on server.
  • Allowed Values: [ "1 - 10000" ]
    Specifies how many rows returned from this query.
  • Allowed Values: [ "The value should either be null or returned from last query" ]
    A database date that the query fetches rows created/updated after that date.
  • tables
    A list of queries for tables.
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
Show Source
Nested Schema : columns
Type: array
A comma separated list of columns of the query.
Show Source
Nested Schema : The criteria of the query
Type: object
Show Source
Nested Schema : joinedTables
Type: array
Joined tables.
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
the result data model
Show Source
  • data
    Additional Properties Allowed: additionalProperties
    A list of tables, which contains rows of column data. It also returns a database date for the next query to retrieve fresh data only. If next query only cares about the data being created/updated after current query, it would supply sinceDate property from the current query in the next query. A pagination section is also returned in the response to indicate if there is more data on the server. When nextTableName="-1", no more data available.The next query should use original query PLUS pagination information to retrieve the remaining data on the server.
Nested Schema : data
Type: object
Additional Properties Allowed
Show Source
A list of tables, which contains rows of column data. It also returns a database date for the next query to retrieve fresh data only. If next query only cares about the data being created/updated after current query, it would supply sinceDate property from the current query in the next query. A pagination section is also returned in the response to indicate if there is more data on the server. When nextTableName="-1", no more data available.The next query should use original query PLUS pagination information to retrieve the remaining data on the server.
Nested Schema : additionalProperties
Type: array
Show Source
Nested Schema : items
Type: object
Additional Properties Allowed
Show Source

400 Response

Bad Request

500 Response

Internal Server Error
Back to Top