hitzelc commented on issue #15456: URL: https://github.com/apache/superset/issues/15456#issuecomment-930477772
Maybe a little too late, but I had a similar problem. A quick-and-dirty fix is to edit the charts/api.py file as follows: https://gist.github.com/hitzelc/10ad912bd246d4358728a8407ac2c842 You can see the addition in **line 291**. Now chart creation via a POST to the /chart/ endpoint will return the uuid associated with the chart. The way I use this is as follows: * create a dashboard, get its id (POST /dashboard/) * create chart(s), with the desired dashboard id in the arguments (POST /chart/) * grab the uuid of these charts and update the dashboard with some position JSON that I hammer together (PUT /dashboard/) Note: the position JSON is kind of a pain...when you create a dashboard via API is has no position JSON at all, even after you add charts to it. You have to manually save/edit any dashboard to have a position JSON associated with it. So I recommend you make your dashboards by hand with the charts you want, and then export that chart and steal that position JSON as a starting point (assuming your goal is to automate dashboard creation moving forward). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
