Note: Planner API will be deprecated in future releases.
In order to fetch data from the API you need to send a query. In this article we will explain how to build a query. In technical terms a query is a JSON structure containing the information about the requested data model.
There are two types of queries: element query and data query. Element queries return list of elements from a specified dimension (with optional attributes), and data query which return model (cube) data in tabular format.
Dimension (element) query
Element query returns set of elements specified by the expander (set expression). Read read here about expanders.
Syntax of the element query:
db: denotes database name. There is only one database with name Application.
attributes: optional list of attributes. All dimensions have attribute en_US containing label. Other attributes vary by dimension.
expander: set expression
The query must be sent to /v1/dimension/expand API endpoint.
Data query has two forms: crosstab (pivot) format and record format.
For crosstab format use /v1/data/table API endpoint and record format use /v1/data/query API endpoint.
cube: model name
query: array of expanders, one for each dimensions
rows: dimensions to use in crosstab rows (table query only, omit for record query)
cols: dimension to use in crosstab columns (table query only, omit for record query)