When a data engine returns 200 from a query operation, the body contains the result of the query. I think this should take one of two forms:
1) When the query does NOT contain an Aggregate clause, the result is an array of Atoms.
2) When the query contains an Aggregate clause, the result is a table of data (like the output from a typical SQL query).
For example, if we issued a query that included the aggregate clause:
{ …
"Aggregate": {
"Columns": [
,
],
"GroupBy": ["WHAT_ELEMENT","WHAT_SUBCLASS"]}
"Project" :
}
== SELECT SUM(Duration, AVG(Reliability), Cluster, Class, Groupby Element, Subclass
then the output is a table of values with four columns and could be represented in a number of ways:
{"QueryResult": {
"Table": [
[
,
,
,
,
,
{"ColName": "WHAT_SUBCLASS", "Value": 1256} ],[
,
,
,
,
,
] ] }}
or
{"QueryResult": {
"Table": [
,
]}}