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

[Question] Is there a REST API to pull Dashboard and Slice Views #5581

Closed sashank closed 6 years ago

sashank commented 6 years ago

We are looking for ways to integrate superset into our web application . IFrame is not an option for us (for reasons like security and user experience friction with re-authenticating inside iframe etc. ) and i read from other threads that JS API is still on roadmap but no definitive timelines.

After some analysis , figured out that SuperSet is based on Flask App Builder , and FAB has a REST API to pull the views .

So can anyone help us by answering whether it is trivial to use those API's and pull the Dashboard and Slice Views from Apache Superset ?

sashank commented 6 years ago

We figured out it s trivial to pull dashboards via REST API

bipinsoniguavus commented 5 years ago

@sashank can you please help me telling your findings why you concluded it to be trivial to pull the dashboards via REST API. Thanks

sashank commented 5 years ago

@bipinsoniguavus , each dashboard and slice is accessible via unique URL , check the link embedded in above answer , you need to flex a bit for authentication layer though

iamcoolkranthi commented 5 years ago

HI , any documentation is there how to do . i am new to python

holgerbrandl commented 4 years ago

Same here, to enable automatic builds that preconfigure some dashboards, it would be great to have an example about how to to so.

onlyphantom commented 4 years ago

Copying from @mistercrunch's answer on #4708 for anyone stumbled upon this thread. Answer is his:

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

kalimuthu123 commented 4 years ago

@onlyphantom Actually my requirement is pass the query through an api for fetching the data is there any api available in superset

veerappans commented 3 years ago

@kalimuthu123 , did you find a solution for this problem. I am trying to do something similar.

nytai commented 3 years ago

The closest we have now is the chart/data api (used by charts for fetching data). It accepts json and returns data, docs available here: https://superset.apache.org/docs/rest-api

veerappans commented 3 years ago

thanks @nytai. I found these documents too. But I am not aware of how to construct a superset query for request body. Is there a way to use slice id?