Query the data for a list of tables
post
/data/rest/dataservice/runquery
The result contains the data from specified tables with specified columns. Invalid columns is ignored.
There are two extra sections in the result: pagination information and timestamp for next incremental query.
Request
There are no request parameters for this operation.
Supported Media Types
- application/json
Root Schema : QueryObject
Type:
objectTitle:
Show Source
QueryObject-
name: string
An optional query name
-
nextKey: string
When there is more data on server, the result from last query returns nextKey property. The value comes from last query when there is more data on server.
-
nextTableName: string
When there is more data on server, the result from last query returns nextTableName property. A value "-1" indicates no more data on server. The value comes from last query when there is more data on server.
-
pageSize: string
Minimum Value:
1Maximum Value:10000Specifies how many rows returned from this query -
sinceDate: string
A database date that the query fetches rows created/updated after it. The value should either be null or returned from last query.
-
tables(required): array
tables
A list of queries for tables
Nested Schema : tables
Type:
arrayA list of queries for tables
Show Source
-
Array of:
object TableQuery
Title:
TableQueryA list of queries for tables
Nested Schema : TableQuery
Type:
objectTitle:
TableQueryA list of queries for tables
Show Source
-
columns(required): array
columns
A comma separated list of columns of the query
-
condition:
condition
The filter of the query
-
joinCondition:
joinCondition
Joined tables
-
joinedTables: array
joinedTables
Joined tables
-
tableName(required): string
The from table name of the query
Nested Schema : columns
Type:
arrayA comma separated list of columns of the query
Show Source
-
Array of:
string
A comma separated list of columns of the query
Nested Schema : joinCondition
Joined tables
Match All
Joined tables
Show Source
-
object
JoinCondition
Title:
JoinConditionJoined tables
Nested Schema : joinedTables
Type:
arrayJoined tables
Show Source
-
Array of:
object TableQuery
Title:
TableQueryA list of queries for tables
Nested Schema : Condition
Type:
objectTitle:
ConditionThe criteria of the query
Show Source
-
columnName: string
The column name. This property is ignored when the operator is AND/OR.
-
conditions: array
conditions
List of Conditions if the operator is AND/OR.
-
operator: string
Allowed Values:
[ "AND", "OR", "IS_NULL", "IS_NOT_NULL", "EQUALS", "NOT_EQUALS", "GREATER_THAN", "LESS_THAN", "GREATER_THAN_OR_EQUALS", "LESS_THAN_OR_EQUALS", "BETWEEN" ]The condition operator -
value1: string
The first value of the criteria. When the operator is AND/OR/IS_NULL/IS_NOT_NULL, this property is ignored.
-
value2: string
The second value of the criteria. This property is used only when the operator is BETWEEN.
Nested Schema : conditions
Type:
arrayList of Conditions if the operator is AND/OR.
Show Source
-
Array of:
object Condition
Title:
ConditionThe criteria of the query
Nested Schema : JoinCondition
Type:
objectTitle:
JoinConditionJoined tables
Show Source
-
joinColumn: string
The column name from joined table
-
parentTableColumn: string
The column name of parent table
Examples
Back to Top
Response
Supported Media Types
- application/json
200 Response
API success
Root Schema : DataObject
Type:
objectTitle:
Show Source
DataObject-
data: object
data
Additional Properties Allowed: additionalPropertiesA list of tables, which contains rows of column data. It also returns a database date for 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 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 server.
Nested Schema : data
Type:
objectAdditional Properties Allowed
Show Source
-
array additionalProperties
A list of tables, which contains rows of column data. It also returns a database date for 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 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 server.
A list of tables, which contains rows of column data.
It also returns a database date for 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 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 server.
Nested Schema : additionalProperties
Type:
arrayA list of tables, which contains rows of column data.
It also returns a database date for 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 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 server.
Show Source
-
Array of:
object items
Additional Properties Allowed: additionalPropertiesA list of tables, which contains rows of column data. It also returns a database date for 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 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 server.
Nested Schema : items
Type:
objectAdditional Properties Allowed
Show Source
-
string
A list of tables, which contains rows of column data. It also returns a database date for 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 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 server.
A list of tables, which contains rows of column data.
It also returns a database date for 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 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 server.
403 Response
You do not have access to the resource.
404 Response
Invalid query