Incubator-superset: Does Superset have an API to expose a Chart's JSON data?

Created on 29 Mar 2018  Â·  9Comments  Â·  Source: apache/incubator-superset

Hello, Superset authors,

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

  • [x] I have checked the superset logs for python stacktraces and included it here as text if any
  • [x] I have reproduced the issue with at least the latest released version of superset
  • [x] I have checked the issue tracker for the same issue and I haven't found one similar

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
刘佳旭

Most helpful comment

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

All 9 comments

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

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

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

Dear mistercrunch, yongjie

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

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.

{message | "Access is Denied"

severity | "danger"
}

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

jwt authentication in version 0.35.2 #9717

working

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?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

XiaodiKong picture XiaodiKong  Â·  3Comments

deity-bram picture deity-bram  Â·  3Comments

josephtyler picture josephtyler  Â·  3Comments

dinhhuydh picture dinhhuydh  Â·  3Comments

ylkjick532428 picture ylkjick532428  Â·  3Comments