The data endpoint is rather a service than a resource. This service can be used to:
add or replace data to/in a data push dataset
query data from one or more datasets
signal external changes to a dataset to clear query cache for the dataset.
The get endpoint can be used to query data from one or more datasets.
The structure of the call is as follows:
{
"action": "get",
"version": "0.1.0",
"key": "< your API/Embed key >",
"token": "< your API/Embed token >",
"find": {
"queries": [
{
"dimensions": [ { ... }, { ... }, ... ],
"measures": [ { ... }, { ... }, ... ],
"where": [ { "and": [ { ... }, { ... }, ... ] } ],
"having": [ { "or": [ { ... }, { ... }, ... ] } ],
"order": [ { ... }, { ... }, ... ],
"limit": { "by": ###, "offset": ### },
"options": { ... }
},
...
]
}
}Dimension columns are typically columns that are grouped on.
Measure columns are typically aggregated fields.
Columns specified in the "where" property are columns that are used to filter the data before aggregating or grouping. These filters can be combined in (nested) "and" or "or" filter groups.
Columns specified in the "having" property are columns that are used to filter the data after aggregating and grouping. These "having" filters can also be combined in (nested) "and" or "or" filter groups.
Order columns that should be used to sort the result on.
Limit the amount of rows that will be returned.
Options: used to retrieve row-level data instead of aggregated data, and indicate in which timezone the data should be retrieved.
Below you can see the different properties that can be used when querying data, the examples section contains some examples. In the "Querying data" guide in the Developer documentation provides more details about each of these properties, as well as some examples .
npm install @luzmo/nodejs-sdk{
"cached": false,
"performance": {
"validating": 0,
"preparing": 115,
"queuing": 0,
"querying": 10331,
"processing": 0,
"rows": 1
},
"data": [
[
19
]
]
}