Metabase integration
In short
Run saved questions and SQL, and read dashboards. Connect it on the Integrations page; your app then calls Metabase through Sapilon without ever holding a Metabase credential.
Lets your app run saved questions and SQL queries in a Metabase Cloud instance, and read its databases, collections and dashboards.
Connecting
On the Integrations page choose Connect on Metabase and fill in:
- Instance name — The part before .metabaseapp.com in your Metabase address.
- API key — Metabase → Admin settings → Authentication → API keys → Create API key. Pick a group that can only see what the app needs.
Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.
- Only Metabase Cloud (….metabaseapp.com) is supported, not self-hosted Metabase.
What your app can do
Only these requests are available; anything else is refused.
GET /user/currentGET /databaseGET /searchGET /collection/*/itemsGET /cardGET /card/*POST /card/*/queryGET /dashboard/*POST /dataset
How the agent uses it
Use integrations.request('metabase', …); paths are relative to https://<instance>.metabaseapp.com/api.
GET /search(query: { q: 'revenue' }),GET /collection/{id}/items(rootfor the top).GET /card,GET /card/{id}— saved questions.POST /card/{id}/query— run one; rows aredata.rows, columnsdata.cols.GET /dashboard/{id}— its cards.GET /database— ids for native queries.GET /user/current— who the key acts as.POST /dataset— SQL. Example:{ method: 'POST', path: '/dataset', body: { database: 2, type: 'native', native: { query: 'select count(*) from orders' } } }.
Read-only: editing questions or dashboards is not allowed.
More from Metabase: https://www.metabase.com/docs/latest/api