The Metabase (https://metabase.com/) Data Explorer web UI has the ability to create queries they call questions with various filters. The query results can be visualized in a variety of ways including a table and charts. The table results can also be downloaded as JSON. Is there a way to retrieve the JSON via the Metabase REST API?
I've tried a few of the endpoints in the Metabase API Reference with the ID in the URL of the Data Explorer without success.
API Reference: https://github.com/metabase/.../api-documentation.md
This can be done using the following endpoint where :card-id
is the numeric "questionId
" in the Data Explorer URL after /question/
.
POST /api/card/:card-id/query/:export-format
As an example:
https://metabase.example.com/question/1
https://metabase.example.com/api/card/1/query/json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With