apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.78k stars 13.52k forks source link

Does Superset have an API to expose a Chart's JSON data? #4708

Closed CasperLiu closed 6 years ago

CasperLiu commented 6 years ago

Hello, Superset authors,

Make sure these boxes are checked before submitting your issue - thank you!

Superset version

Superset 0.23.3

Expected results

So far, Superset is able to provide a iframe block for chart/dashboard display outside Superset GUI . This is good to integrate this into a website.

Beside iframe block, is there any other way, like RESTFUL API or Web Service , which could expose the data(such as JSON format) ?

PS: Superset chart indeed could provide a JSON output, but this needs a manual operation and couldn't provide JSON output automatically. Is there any interface to get the JSON output by RESTFUL API?

Thanks a lot in advance!

Actual results

We haven't seen an interface to dynamically expose data of a chart besides iframe block.

Steps to reproduce

This is a query of question, no need to reproduce.

Nice Regards, Jiaxu Liu 刘佳旭

CasperLiu commented 6 years ago

If the interface to expose a chart's data is not available, is there any plan or requirement for this API?

Thanks in advance!

Jiaxu

zhaoyongjie commented 6 years ago

You can find at /superset/explore/<datasource>/<id>/

mistercrunch commented 6 years ago

Flask App Builder (FAB) offers a CRUD REST API out of the box for all models. Check out:

/slicemodelview/api
/slicemodelview/api/read
/dashboardmodelview/api
/dashboardmodelview/api/read

http://flask-appbuilder.readthedocs.io/en/latest/quickhowto.html#rest-api

CasperLiu commented 6 years ago

Dear mistercrunch, yongjie

Thanks a lot for your valuable input! Indeed helps! I would close this ticket.

iamcoolkranthi commented 5 years ago

HI , Any body can help me regarding ,access api http://0.0.0.0:8089/superset/explore_json/?form_data=%7B%22slice_id%22%3A49%7D with out login . Thanks, kranthi kumar.

iamcoolkranthi commented 5 years ago

{message | "Access is Denied"

severity | "danger" }

mistercrunch commented 5 years ago

We've move to better urls a little while back. /chart/api/read, or if you want a single chart /chart/api/read?_flt_0_id=1

kalimuthu123 commented 4 years ago

jwt authentication in version 0.35.2 #9717

working

sedhha commented 4 years ago

Dear mistercrunch, yongjie

Thanks a lot for your valuable input! Indeed helps! I would close this ticket.

I still don't get it how are you going to interface it with superset?

vadivelselvaraj commented 3 years ago

For anyone who ended up here, this PR creates a new chart/{CHART_ID}/data endpoint to fetch a chart's JSON data.