Metabase Go SDK
Go SDK built using OpenAPI 3.0 spec and OpenAPI Generator.
Installation
$ go get github.com/grokify/go-metabase/...
Usage
See the examples in the examples folder:
https://github.com/grokify/go-metabase/tree/master/examples
Documentation
Auto-generated documentation is available here:
Coverage
-
Database
- DELETE /api/database/:id
- GET /api/database/
- GET /api/database/:id
- GET /api/database/:id/autocomplete_suggestions
- GET /api/database/:id/fields
- GET /api/database/:id/idfields
- GET /api/database/:id/metadata
- POST /api/database/
- POST /api/database/:id/sync
- POST /api/database/sample_dataset
- PUT /api/database/:id
-
Dataset
- POST /api/dataset/
- POST /api/dataset/csv
- POST /api/dataset/duration
- POST /api/dataset/json
References
- Using the REST API
- Metabase API Documentation:
- Metabase OpenAPI 3.0 Spec:
- Query Language '98
Example Queries
-
Current User:
curl -XGET 'http://server/api/user/current' -H 'X-Metabase-Session: 38f4939c-ad7f-4cbe-ae54-30946daf8593' -
Table:
curl -XGET 'https://base_url/api/table/1' -H 'X-Metabase-Session: 11112222-3333-4444-5555-666677778888'
Describe columns and column types:
describe mydatabase.mytable;