...
@expose('/slice_json/<slice_id>')
def slice_json(self, slice_id):
form_data, slc = self.get_form_data(slice_id, use_slice_data=True)
datasource_type = slc.datasource.type
datasource_id = slc.datasource.id
return self.generate_json(datasource_type=datasource_type, datasource_id=datasource_id,
form_data=form_data)
which takes in a sliceID as an argument and returns a json object for the given chart. The json returned contains a lot of information such as the data in the slice, the query used to create it, the filters available in the slice and the datasource.
...