From f6fe29db87424356c3f12d48406a76f813ce4366 Mon Sep 17 00:00:00 2001 From: Beto Dealmeida Date: Wed, 21 Jul 2021 17:50:56 -0700 Subject: [PATCH] feat: use new API endpoint to build CSV reports (#15830) * feat: add `GET /api/v1/chart/{chart_id}/data/?format{format}` API * feat: use new API endpoint to build CSV reports --- superset/reports/commands/execute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/reports/commands/execute.py b/superset/reports/commands/execute.py index cc7222e302..2ce1346ed6 100644 --- a/superset/reports/commands/execute.py +++ b/superset/reports/commands/execute.py @@ -142,9 +142,9 @@ class BaseReportState: if self._report_schedule.chart: if csv: return get_url_path( - "Superset.explore_json", - csv="true", - form_data=json.dumps({"slice_id": self._report_schedule.chart_id}), + "ChartRestApi.get_data", + pk=self._report_schedule.chart_id, + format="csv", ) return get_url_path( "Superset.slice",