GitHub user Ruchitha598 created a discussion: Is there an API in Superset to
retrieve chart structure for chart creation?
Hi team,
I wanted to check if Apache Superset provides any API to retrieve the chart
structure or template that defines the mandatory parameters required to create
a chart.
For example, when creating a chart via the Superset Chart API by passing the
chart JSON, I’d like to know if there’s an API endpoint that returns the
expected or default chart structure (i.e., the required fields and their
formats) needed to build a valid chart JSON payload.
I’m looking for something that could return a structure like this:
"example_params": {
"datasource": "{id}__table",
"viz_type": "pivot_table_v2",
"metrics": ["<METRIC>"],
"groupbyRows": ["<DIMENSION_COLUMN>"],
"groupbyColumns": ["<DATE_OR_CATEGORY_COLUMN>"],
"adhoc_filters": ["<FILTERS>"],
"aggregatorName": "Sum",
"transposePivot": false,
"combineMetric": false,
"row_limit": 1000,
"result_format": "json",
"result_type": "full"
}
Is there any Superset API that can return this kind of chart parameter
structure or schema (per viz_type) that helps in dynamically generating or
validating chart JSONs for creation?
Superset version 4.1.1
Thanks in advance for any guidance!
GitHub link: https://github.com/apache/superset/discussions/35978
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]