Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Created November 19, 2022 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/315935502b6dbfda0962dd5b1b2c2daf to your computer and use it in GitHub Desktop.
Save miguelmota/315935502b6dbfda0962dd5b1b2c2daf to your computer and use it in GitHub Desktop.
Metabase api queries examples
curl -X POST \
-H "Content-Type: application/json" \
-d '{"username": "alice@example.com", "password": "mysecretpassword"}' \
https://metabase.example.com/api/session
# {"id":"123..."}
TOKEN="123"
ID=1
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Metabase-Session: $TOKEN" \
https://metabase.example.com/api/dashboard/$ID
TOKEN="123..."
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Metabase-Session: $TOKEN" \
https://metabase.example.com/api/dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment