![]() Querying via raw SQL and MBQL are both available via the POST /api/dataset/ API. Is there a way to do this directly by sending the MBQL/SQL query in the API request in a single step without a pre-existing Question/Card? More information on the API is available in the API Documentation: :export-format can be json or another format.:card-id is the :question-id from the Web UI URL.API endpoint: POST /api/card/:card-id/query/:export-format.The API uses the term "card" for the Web UI "question" object, so make an API call to the following Card API: Reasons to avoid cards for me include needing to perform extra work to verify the card query definitions haven't changed but still having the SQL in the code to create the cards, and generate a lot of unneeded question cards in the UI. This can be useful in some scenarios were UI questions/cards are desirable, but I'm also trying to avoid creating creating cards / questions in the first place, since I'm not planning on using the Metabase UI to consume them. Note: an alternative for creating the card is to use the POST /api/card API endpoint per YakovL. Note this value and use it in the API in the next step. Web UI endpoint: GET /question/:question-id.Once your question has been created you will be directed to a URL like the following where :question-id is an integer. Log into the web app and click the "New Question" button in the top menu. Use REST API to query existing Question created in web app using the Card API. ![]() Use web app to create a MBQL/SQL Metabase Question.Here's some info on how to perform the 2-step process. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |