Version v0.42 of Metabase is no longer supported. Check out the docs for the current stable version, Metabase v0.63.
This file was generated from source comments by clojure -M:run api-documentation.
Check out an introduction to the Metabase API.
GET /api/activity/Get recent activity.
GET /api/activity/recent_viewsGet the list of 10 things the current user has been viewing most recently.
/api/alert endpoints.
DELETE /api/alert/:id/subscriptionUnsubscribes a user from the given alert.
idGET /api/alert/Fetch all alerts.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
user_id value may be nil, or if non-nil, value must be an integer greater than zero.
GET /api/alert/:idFetch an alert by ID.
idGET /api/alert/question/:idFetch all questions for the given question (Card) id.
id value may be nil, or if non-nil, value must be an integer greater than zero.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
POST /api/alert/Create a new Alert.
alert_condition value must be one of: goal, rows.
card value must be a map with the keys id, include_csv, include_xls, and dashboard_card_id.
channels value must be an array. Each value must be a map. The array cannot be empty.
alert_first_only value must be a boolean.
alert_above_goal value may be nil, or if non-nil, value must be a boolean.
new-alert-request-body
PUT /api/alert/:idUpdate a Alert with ID.
id
alert_condition value may be nil, or if non-nil, value must be one of: goal, rows.
card value may be nil, or if non-nil, value must be a map with the keys id, include_csv, include_xls, and dashboard_card_id.
channels value may be nil, or if non-nil, value must be an array. Each value must be a map. The array cannot be empty.
alert_first_only value may be nil, or if non-nil, value must be a boolean.
alert_above_goal value may be nil, or if non-nil, value must be a boolean.
archived value may be nil, or if non-nil, value must be a boolean.
alert-updates
GET /api/automagic-dashboards/:entity/:entity-id-or-queryReturn an automagic dashboard for entity entity with id id.
entity Invalid entity type
entity-id-or-query
show invalid show value
GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-queryReturn an automagic dashboard analyzing cell in automagic dashboard for entity entity
defined by
query cell-querry.
entity Invalid entity type
entity-id-or-query
cell-query value couldn’t be parsed as base64 encoded JSON
show invalid show value
GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/compare/:comparison-entity/:comparison-entity-id-or-queryReturn an automagic comparison dashboard for cell in automagic dashboard for entity entity
with id id defined by query cell-querry; compared with entity comparison-entity with id
comparison-entity-id-or-query..
entity Invalid entity type
entity-id-or-query
cell-query value couldn’t be parsed as base64 encoded JSON
show invalid show value
comparison-entity Invalid comparison entity type. Can only be one of “table”, “segment”, or “adhoc”
comparison-entity-id-or-query
GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:ruleReturn an automagic dashboard analyzing cell in question with id id defined by
query cell-querry using rule rule.
entity Invalid entity type
entity-id-or-query
cell-query value couldn’t be parsed as base64 encoded JSON
prefix invalid value for prefix
rule invalid value for rule name
show invalid show value
GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-queryReturn an automagic comparison dashboard for cell in automagic dashboard for entity entity
with id id defined by query cell-querry using rule rule; compared with entity
comparison-entity with id comparison-entity-id-or-query..
entity Invalid entity type
entity-id-or-query
cell-query value couldn’t be parsed as base64 encoded JSON
prefix invalid value for prefix
rule invalid value for rule name
show invalid show value
comparison-entity Invalid comparison entity type. Can only be one of “table”, “segment”, or “adhoc”
comparison-entity-id-or-query
GET /api/automagic-dashboards/:entity/:entity-id-or-query/compare/:comparison-entity/:comparison-entity-id-or-queryReturn an automagic comparison dashboard for entity entity with id id compared with entity
comparison-entity with id comparison-entity-id-or-query..
entity Invalid entity type
entity-id-or-query
show invalid show value
comparison-entity Invalid comparison entity type. Can only be one of “table”, “segment”, or “adhoc”
comparison-entity-id-or-query
GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:ruleReturn an automagic dashboard for entity entity with id id using rule rule.
entity Invalid entity type
entity-id-or-query
prefix invalid value for prefix
rule invalid value for rule name
show invalid show value
GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-queryReturn an automagic comparison dashboard for entity entity with id id using rule rule;
compared with entity comparison-entity with id comparison-entity-id-or-query..
entity Invalid entity type
entity-id-or-query
prefix invalid value for prefix
rule invalid value for rule name
show invalid show value
comparison-entity Invalid comparison entity type. Can only be one of “table”, “segment”, or “adhoc”
comparison-entity-id-or-query
GET /api/automagic-dashboards/database/:id/candidatesReturn a list of candidates for automagic dashboards orderd by interestingness.
id/api/card endpoints.
DELETE /api/card/:card-id/favoriteUnfavorite a Card.
card-idDELETE /api/card/:card-id/public_linkDelete the publicly-accessible link to this Card.
You must be a superuser to do this.
card-idDELETE /api/card/:idDelete a Card. (DEPRECATED – don’t delete a Card anymore – archive it instead.).
idGET /api/card/Get all the Cards. Option filter param f can be used to change the set of Cards that are returned; default is
all, but other options include mine, fav, database, table, recent, popular, and archived. See
corresponding implementation functions above for the specific behavior of each filter option. :card_index:.
f value may be nil, or if non-nil, value must be one of: all, archived, database, fav, mine, popular, recent, table.
model_id value may be nil, or if non-nil, value must be an integer greater than zero.
GET /api/card/:idGet Card with ID.
idGET /api/card/:id/relatedReturn related entities.
idGET /api/card/embeddableFetch a list of Cards where enable_embedding is true. The cards can be embedded using the embedding endpoints
and a signed JWT.
You must be a superuser to do this.
GET /api/card/publicFetch a list of Cards with public UUIDs. These cards are publicly-accessible if public sharing is enabled.
You must be a superuser to do this.
POST /api/card/Create a new Card.
visualization_settings value must be a map.
description value may be nil, or if non-nil, value must be a non-blank string.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
result_metadata value may be nil, or if non-nil, value must be an array of valid results column metadata maps.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
name value must be a non-blank string.
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
dataset_query
display value must be a non-blank string.
POST /api/card/:card-id/favoriteFavorite a Card.
card-idPOST /api/card/:card-id/public_linkGenerate publicly-accessible links for this Card. Returns UUID to be used in public links. (If this Card has already been shared, it will return the existing public link rather than creating a new one.) Public sharing must be enabled.
You must be a superuser to do this.
card-idPOST /api/card/:card-id/queryRun the query associated with a Card.
card-id
parameters
ignore_cache value may be nil, or if non-nil, value must be a boolean.
dashboard_id value may be nil, or if non-nil, value must be an integer greater than zero.
POST /api/card/:card-id/query/:export-formatRun the query associated with a Card, and return its results as a file in the specified format.
parameters should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint
is normally used to power ‘Download Results’ buttons that use HTML form actions).
card-id
export-format value must be one of: api, csv, json, xlsx.
parameters value may be nil, or if non-nil, value must be a valid JSON string.
POST /api/card/:id/copyCopy a Card, with the new name ‘Copy of name’.
id value may be nil, or if non-nil, value must be an integer greater than zero.POST /api/card/collectionsBulk update endpoint for Card Collections. Move a set of Cards with CARD_IDS into a Collection with
COLLECTION_ID, or remove them from any Collections by passing a null COLLECTION_ID.
card_ids value must be an array. Each value must be an integer greater than zero.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
POST /api/card/pivot/:card-id/queryRun the query associated with a Card.
card-id
parameters
ignore_cache value may be nil, or if non-nil, value must be a boolean.
POST /api/card/relatedReturn related entities for an ad-hoc query.
queryPUT /api/card/:idUpdate a Card.
visualization_settings value may be nil, or if non-nil, value must be a map.
dataset value may be nil, or if non-nil, value must be a boolean.
description value may be nil, or if non-nil, value must be a string.
archived value may be nil, or if non-nil, value must be a boolean.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
result_metadata value may be nil, or if non-nil, value must be an array of valid results column metadata maps.
enable_embedding value may be nil, or if non-nil, value must be a boolean.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
card-updates
name value may be nil, or if non-nil, value must be a non-blank string.
embedding_params value may be nil, or if non-nil, value must be a valid embedding params map.
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
dataset_query value may be nil, or if non-nil, value must be a map.
id
display value may be nil, or if non-nil, value must be a non-blank string.
/api/collection endpoints. By default, these endpoints operate on Collections in the ‘default’ namespace, which is
the one that has things like Dashboards and Cards. Other namespaces of Collections exist as well, such as the
:snippet namespace, (called ‘Snippet folders’ in the UI). These namespaces are completely independent hierarchies.
To use these endpoints for other Collections namespaces, you can pass the ?namespace= parameter (e.g.
?namespace=snippet).
GET /api/collection/Fetch a list of all Collections that the current user has read permissions for (:can_write is returned as an
additional property of each Collection so you can tell which of these you have write permissions for.)
By default, this returns non-archived Collections, but instead you can show archived ones by passing
?archived=true.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
namespace value may be nil, or if non-nil, value must be a non-blank string.
GET /api/collection/:idFetch a specific Collection with standard details added.
idGET /api/collection/:id/itemsFetch a specific Collection’s items with the following options:
models - only include objects of a specific set of models. If unspecified, returns objects of all modelsarchived - when true, return archived objects instead of unarchived ones. Defaults to false.pinned_state - when is_pinned, return pinned objects only.
when is_not_pinned, return non pinned objects only.
when all, return everything. By default returns everything.id
models value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be an array. Each value must be one of: card, collection, dashboard, dataset, no_models, pulse, snippet. 2) value must be one of: card, collection, dashboard, dataset, no_models, pulse, snippet.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
pinned_state value may be nil, or if non-nil, value must be one of: all, is_not_pinned, is_pinned.
sort_column value may be nil, or if non-nil, value must be one of: last_edited_at, last_edited_by, model, name.
sort_direction value may be nil, or if non-nil, value must be one of: asc, desc.
GET /api/collection/graphFetch a graph of all Collection Permissions.
You must be a superuser to do this.
namespace value may be nil, or if non-nil, value must be a non-blank string.GET /api/collection/rootReturn the ‘Root’ Collection object with standard details added.
namespace value may be nil, or if non-nil, value must be a non-blank string.GET /api/collection/root/itemsFetch objects that the current user should see at their root level. As mentioned elsewhere, the ‘Root’ Collection
doesn’t actually exist as a row in the application DB: it’s simply a virtual Collection where things with no
collection_id exist. It does, however, have its own set of Permissions.
This endpoint will actually show objects with no collection_id for Users that have Root Collection
permissions, but for people without Root Collection perms, we’ll just show the objects that have an effective
location of /.
This endpoint is intended to power a ‘Root Folder View’ for the Current User, so regardless you’ll see all the top-level objects you’re allowed to access.
By default, this will show the ‘normal’ Collections namespace; to view a different Collections namespace, such as
snippets, you can pass the ?namespace= parameter.
models value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be an array. Each value must be one of: card, collection, dashboard, dataset, no_models, pulse, snippet. 2) value must be one of: card, collection, dashboard, dataset, no_models, pulse, snippet.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
namespace value may be nil, or if non-nil, value must be a non-blank string.
pinned_state value may be nil, or if non-nil, value must be one of: all, is_not_pinned, is_pinned.
sort_column value may be nil, or if non-nil, value must be one of: last_edited_at, last_edited_by, model, name.
sort_direction value may be nil, or if non-nil, value must be one of: asc, desc.
GET /api/collection/treeSimilar to GET /, but returns Collections in a tree structure, e.g.
[{:name "A"
:below #{:card :dataset}
:children [{:name "B"}
{:name "C"
:here #{:dataset :card}
:below #{:dataset :card}
:children [{:name "D"
:here #{:dataset}
:children [{:name "E"}]}
{:name "F"
:here #{:card}
:children [{:name "G"}]}]}]}
{:name "H"}]
The here and below keys indicate the types of items at this particular level of the tree (here) and in its subtree (below).
exclude-archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
namespace value may be nil, or if non-nil, value must be a non-blank string.
POST /api/collection/Create a new Collection.
name value must be a non-blank string.
color value must be a string that matches the regex ^#[0-9A-Fa-f]{6}$.
description value may be nil, or if non-nil, value must be a non-blank string.
parent_id value may be nil, or if non-nil, value must be an integer greater than zero.
namespace value may be nil, or if non-nil, value must be a non-blank string.
authority_level value may be nil, or if non-nil, value must be one of: official.
PUT /api/collection/:idModify an existing Collection, including archiving or unarchiving it, or moving it.
authority_level value may be nil, or if non-nil, value must be one of: official.
description value may be nil, or if non-nil, value must be a non-blank string.
archived value may be nil, or if non-nil, value must be a boolean.
collection-updates
color value may be nil, or if non-nil, value must be a string that matches the regex ^#[0-9A-Fa-f]{6}$.
name value may be nil, or if non-nil, value must be a non-blank string.
parent_id value may be nil, or if non-nil, value must be an integer greater than zero.
id
update_collection_tree_authority_level value may be nil, or if non-nil, value must be a boolean.
PUT /api/collection/graphDo a batch update of Collections Permissions by passing in a modified graph.
You must be a superuser to do this.
namespace value may be nil, or if non-nil, value must be a non-blank string.
body value must be a map.
/api/dashboard endpoints.
DELETE /api/dashboard/:dashboard-id/public_linkDelete the publicly-accessible link to this Dashboard.
You must be a superuser to do this.
dashboard-idDELETE /api/dashboard/:idDelete a Dashboard.
idDELETE /api/dashboard/:id/cardsRemove a DashboardCard from a Dashboard.
id
dashcardId value must be a valid integer greater than zero.
DELETE /api/dashboard/:id/favoriteUnfavorite a Dashboard.
idGET /api/dashboard/Get Dashboards. With filter option f (default all), restrict results as follows:
all - Return all Dashboards.mine - Return Dashboards created by the current user.archived - Return Dashboards that have been archived. (By default, these are excluded.).f value may be nil, or if non-nil, value must be one of: all, archived, mine.GET /api/dashboard/:idGet Dashboard with ID.
idGET /api/dashboard/:id/params/:param-key/search/:queryFetch possible values of the parameter whose ID is :param-key that contain :query. Optionally restrict
these values by passing query parameters like other-parameter=value e.g.
;; fetch values for Dashboard 1 parameter 'abc' that contain 'Cam' and are possible when parameter 'def' is set
;; to 100
GET /api/dashboard/1/params/abc/search/Cam?def=100
Currently limited to first 1000 results.
id
param-key
query
query-params
GET /api/dashboard/:id/params/:param-key/valuesFetch possible values of the parameter whose ID is :param-key. Optionally restrict these values by passing query
parameters like other-parameter=value e.g.
;; fetch values for Dashboard 1 parameter 'abc' that are possible when parameter 'def' is set to 100
GET /api/dashboard/1/params/abc/values?def=100.
id
param-key
query-params
GET /api/dashboard/:id/relatedReturn related entities.
idGET /api/dashboard/:id/revisionsFetch Revisions for Dashboard with ID.
idGET /api/dashboard/embeddableFetch a list of Dashboards where enable_embedding is true. The dashboards can be embedded using the embedding
endpoints and a signed JWT.
You must be a superuser to do this.
GET /api/dashboard/params/valid-filter-fieldsUtility endpoint for powering Dashboard UI. Given some set of filtered Field IDs (presumably Fields used in
parameters) and a set of filtering Field IDs that will be used to restrict values of filtered Fields, for each
filtered Field ID return the subset of filtering Field IDs that would actually be used in a chain filter query
with these Fields.
e.g. in a chain filter query like
GET /api/dashboard/10/params/PARAM_1/values?PARAM_2=100
Assume PARAM_1 maps to Field 1 and PARAM_2 maps to Fields 2 and 3. The underlying MBQL query may or may not
filter against Fields 2 and 3, depending on whether an FK relationship that lets us create a join against Field 1
can be found. You can use this endpoint to determine which of those Fields is actually used:
GET /api/dashboard/params/valid-filter-fields?filtered=1&filtering=2&filtering=3
;; ->
{1 [2 3]}
Results are returned as a map of
`filtered` Field ID -> subset of `filtering` Field IDs that would be used in chain filter query.
filtered value must satisfy one of the following requirements: 1) value must be a valid integer greater than zero. 2) value must be an array. Each value must be a valid integer greater than zero. The array cannot be empty.
filtering value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be a valid integer greater than zero. 2) value must be an array. Each value must be a valid integer greater than zero. The array cannot be empty.
GET /api/dashboard/publicFetch a list of Dashboards with public UUIDs. These dashboards are publicly-accessible if public sharing is enabled.
You must be a superuser to do this.
POST /api/dashboard/Create a new Dashboard.
name value must be a non-blank string.
description value may be nil, or if non-nil, value must be a string.
parameters value must be an array. Each value must be a map.
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
dashboard
POST /api/dashboard/:dashboard-id/dashcard/:dashcard-id/card/:card-id/queryRun the query associated with a Saved Question (Card) in the context of a Dashboard that includes it.
dashboard-id
dashcard-id
card-id
parameters value may be nil, or if non-nil, value must be an array. Each value must be a parameter map with an ‘id’ key
POST /api/dashboard/:dashboard-id/dashcard/:dashcard-id/card/:card-id/query/:export-formatRun the query associated with a Saved Question (Card) in the context of a Dashboard that includes it, and return
its results as a file in the specified format.
parameters should be passed as query parameter encoded as a serialized JSON string (this is because this endpoint
is normally used to power ‘Download Results’ buttons that use HTML form actions).
dashboard-id
dashcard-id
card-id
export-format value must be one of: api, csv, json, xlsx.
parameters value may be nil, or if non-nil, value must be a valid JSON string.
request-parameters
POST /api/dashboard/:dashboard-id/public_linkGenerate publicly-accessible links for this Dashboard. Returns UUID to be used in public links. (If this Dashboard has already been shared, it will return the existing public link rather than creating a new one.) Public sharing must be enabled.
You must be a superuser to do this.
dashboard-idPOST /api/dashboard/:from-dashboard-id/copyCopy a Dashboard.
from-dashboard-id
name value may be nil, or if non-nil, value must be a non-blank string.
description value may be nil, or if non-nil, value must be a string.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
dashboard
POST /api/dashboard/:id/cardsAdd a Card to a Dashboard.
id
cardId value may be nil, or if non-nil, value must be an integer greater than zero.
parameter_mappings value must be an array. Each value must be a map.
series
dashboard-card
POST /api/dashboard/:id/favoriteFavorite a Dashboard.
idPOST /api/dashboard/:id/revertRevert a Dashboard to a prior Revision.
id
revision_id value must be an integer greater than zero.
POST /api/dashboard/pivot/:dashboard-id/dashcard/:dashcard-id/card/:card-id/queryRun a pivot table query for a specific DashCard.
dashboard-id
dashcard-id
card-id
parameters value may be nil, or if non-nil, value must be an array. Each value must be a parameter map with an ‘id’ key
POST /api/dashboard/saveSave a denormalized description of dashboard.
dashboardPOST /api/dashboard/save/collection/:parent-collection-idSave a denormalized description of dashboard into collection with ID :parent-collection-id.
parent-collection-id
dashboard
PUT /api/dashboard/:idUpdate a Dashboard.
Usually, you just need write permissions for this Dashboard to do this (which means you have appropriate
permissions for the Cards belonging to this Dashboard), but to change the value of enable_embedding you must be a
superuser.
parameters value may be nil, or if non-nil, value must be an array. Each value must be a map.
points_of_interest value may be nil, or if non-nil, value must be a string.
description value may be nil, or if non-nil, value must be a string.
archived value may be nil, or if non-nil, value must be a boolean.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
show_in_getting_started value may be nil, or if non-nil, value must be a boolean.
enable_embedding value may be nil, or if non-nil, value must be a boolean.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
dash-updates
name value may be nil, or if non-nil, value must be a non-blank string.
caveats value may be nil, or if non-nil, value must be a string.
embedding_params value may be nil, or if non-nil, value must be a valid embedding params map.
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
id
position value may be nil, or if non-nil, value must be an integer greater than zero.
PUT /api/dashboard/:id/cardsUpdate Cards on a Dashboard. Request body should have the form:
{:cards [{:id ... ; DashboardCard ID
:sizeX ...
:sizeY ...
:row ...
:col ...
:parameter_mappings ...
:series [{:id 123
...}]}
...]}.
id
cards value must be an array. Each value must be a valid DashboardCard map. The array cannot be empty.
/api/database endpoints.
DELETE /api/database/:idDelete a Database.
idGET /api/database/Fetch all Databases.
include=tables means we should hydrate the Tables belonging to each DB. Default: false.
saved means we should include the saved questions virtual database. Default: false.
include_tables is a legacy alias for include=tables, but should be considered deprecated as of 0.35.0, and will
be removed in a future release.
include_cards here means we should also include virtual Table entries for saved Questions, e.g. so we can easily
use them as source Tables in queries. This is a deprecated alias for saved=true + include=tables (for the saved
questions virtual DB). Prefer using include and saved instead. .
include_tables value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
include_cards value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
include include must be either empty or the value tables
saved value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
GET /api/database/:idGet a single Database with id. Optionally pass ?include=tables or ?include=tables.fields to include the Tables
belonging to this database, or the Tables and Fields, respectively.
id
include value may be nil, or if non-nil, value must be one of: tables, tables.fields.
GET /api/database/:id/autocomplete_suggestionsReturn a list of autocomplete suggestions for a given prefix.
This is intened for use with the ACE Editor when the User is typing raw SQL. Suggestions include matching Tables
and Fields in this Database.
Tables are returned in the format [table_name "Table"];
Fields are returned in the format [field_name "table_name base_type semantic_type"].
id
prefix value must be a non-blank string.
GET /api/database/:id/fieldsGet a list of all Fields in Database.
idGET /api/database/:id/idfieldsGet a list of all primary key Fields for Database.
idGET /api/database/:id/metadataGet metadata about a Database, including all of its Tables and Fields.
By default only non-hidden tables and fields are returned. Passing include_hidden=true includes them.
Returns DB, fields, and field values.
id
include_hidden value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
GET /api/database/:id/schema/Return a list of Tables for a Database whose schema is nil or an empty string.
idGET /api/database/:id/schema/:schemaReturns a list of Tables for the given Database id and schema.
id
schema
GET /api/database/:id/schemasReturns a list of all the schemas found for the database id.
idGET /api/database/:virtual-db/datasetsReturns a list of all the datasets found for the saved questions virtual database.
GET /api/database/:virtual-db/datasets/:schemaReturns a list of Tables for the datasets virtual database.
schemaGET /api/database/:virtual-db/metadataEndpoint that provides metadata for the Saved Questions ‘virtual’ database. Used for fooling the frontend and allowing it to treat the Saved Questions virtual DB just like any other database.
GET /api/database/:virtual-db/schema/:schemaReturns a list of Tables for the saved questions virtual database.
schemaGET /api/database/:virtual-db/schemasReturns a list of all the schemas found for the saved questions virtual database.
GET /api/database/db-ids-with-deprecated-driversReturn a list of database IDs using currently deprecated drivers.
POST /api/database/Add a new Database.
You must be a superuser to do this.
name value must be a non-blank string.
engine value must be a valid database engine.
details value must be a map.
is_full_sync value may be nil, or if non-nil, value must be a boolean.
is_on_demand value may be nil, or if non-nil, value must be a boolean.
schedules value may be nil, or if non-nil, value must be a valid map of schedule maps for a DB.
auto_run_queries value may be nil, or if non-nil, value must be a boolean.
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
POST /api/database/:id/discard_valuesDiscards all saved field values for this Database.
You must be a superuser to do this.
idPOST /api/database/:id/rescan_valuesTrigger a manual scan of the field values for this Database.
You must be a superuser to do this.
idPOST /api/database/:id/syncUpdate the metadata for this Database. This happens asynchronously.
idPOST /api/database/:id/sync_schemaTrigger a manual update of the schema metadata for this Database.
You must be a superuser to do this.
idPOST /api/database/sample_databaseAdd the sample database as a new Database.
You must be a superuser to do this.
POST /api/database/validateValidate that we can connect to a database given a set of details.
You must be a superuser to do this.
engine value must be a valid database engine.
details value must be a map.
PUT /api/database/:idUpdate a Database.
You must be a superuser to do this.
engine value may be nil, or if non-nil, value must be a valid database engine.
schedules value may be nil, or if non-nil, value must be a valid map of schedule maps for a DB.
refingerprint value may be nil, or if non-nil, value must be a boolean.
points_of_interest value may be nil, or if non-nil, value must be a string.
description value may be nil, or if non-nil, value must be a string.
auto_run_queries value may be nil, or if non-nil, value must be a boolean.
name value may be nil, or if non-nil, value must be a non-blank string.
caveats value may be nil, or if non-nil, value must be a string.
is_full_sync
cache_ttl value may be nil, or if non-nil, value must be an integer greater than zero.
details value may be nil, or if non-nil, value must be a map.
id
is_on_demand
/api/dataset endpoints.
POST /api/dataset/Execute a query and retrieve the results in the usual format.
database value may be nil, or if non-nil, value must be an integer.
query-type
query
POST /api/dataset/:export-formatExecute a query and download the result data as a file in the specified format.
export-format value must be one of: api, csv, json, xlsx.
query value must be a valid JSON string.
visualization_settings value must be a valid JSON string.
POST /api/dataset/durationGet historical query execution duration.
database
query
POST /api/dataset/nativeFetch a native version of an MBQL query.
queryPOST /api/dataset/pivotGenerate a pivoted dataset for an ad-hoc query.
database value may be nil, or if non-nil, value must be an integer.
query-type
query
/api/email endpoints.
DELETE /api/email/Clear all email related settings. You must be a superuser to ddo this.
You must be a superuser to do this.
POST /api/email/testSend a test email using the SMTP Settings. You must be a superuser to do this. Returns {:ok true} if we were able
to send the message successfully, otherwise a standard 400 error response.
You must be a superuser to do this.
PUT /api/email/Update multiple email Settings. You must be a superuser to do this.
You must be a superuser to do this.
settings value must be a map.Various endpoints that use JSON web tokens to fetch Cards and Dashboards.
The endpoints are the same as the ones in api/public/, and differ only in the way they are authorized.
To use these endpoints:
1. Set the `embedding-secret-key` Setting to a hexadecimal-encoded 32-byte sequence (i.e., a 64-character string).
You can use `/api/util/random_token` to get a cryptographically-secure value for this.
2. Sign/base-64 encode a JSON Web Token using the secret key and pass it as the relevant part of the URL path
to the various endpoints here.
Tokens can have the following fields:
{:resource {:question <card-id>
:dashboard <dashboard-id>}
:params <params>}.
GET /api/embed/card/:tokenFetch a Card via a JSON Web Token signed with the embedding-secret-key.
Token should have the following format:
{:resource {:question <card-id>}}.
tokenGET /api/embed/card/:token/field/:field-id/remapping/:remapped-idFetch remapped Field values. This is the same as GET /api/field/:id/remapping/:remapped-id, but for use with
embedded Cards.
token
field-id
remapped-id
value value must be a non-blank string.
GET /api/embed/card/:token/field/:field-id/search/:search-field-idSearch for values of a Field that is referenced by an embedded Card.
token
field-id
search-field-id
value value must be a non-blank string.
limit value may be nil, or if non-nil, value must be a valid integer greater than zero.
GET /api/embed/card/:token/field/:field-id/valuesFetch FieldValues for a Field that is referenced by an embedded Card.
token
field-id
GET /api/embed/card/:token/queryFetch the results of running a Card using a JSON Web Token signed with the embedding-secret-key.
Token should have the following format:
{:resource {:question <card-id>}
:params <parameters>}.
token
&
query-params
GET /api/embed/card/:token/query/:export-formatLike GET /api/embed/card/query, but returns the results as a file in the specified format.
token
export-format value must be one of: api, csv, json, xlsx.
query-params
GET /api/embed/dashboard/:tokenFetch a Dashboard via a JSON Web Token signed with the embedding-secret-key.
Token should have the following format:
{:resource {:dashboard <dashboard-id>}}.
tokenGET /api/embed/dashboard/:token/dashcard/:dashcard-id/card/:card-idFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the
embedding-secret-key.
token
dashcard-id
card-id
&
query-params
GET /api/embed/dashboard/:token/dashcard/:dashcard-id/card/:card-id/:export-formatFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the
embedding-secret-key return the data in one of the export formats.
token
export-format value must be one of: api, csv, json, xlsx.
dashcard-id
card-id
query-params
GET /api/embed/dashboard/:token/field/:field-id/remapping/:remapped-idFetch remapped Field values. This is the same as GET /api/field/:id/remapping/:remapped-id, but for use with
embedded Dashboards.
token
field-id
remapped-id
value value must be a non-blank string.
GET /api/embed/dashboard/:token/field/:field-id/search/:search-field-idSearch for values of a Field that is referenced by a Card in an embedded Dashboard.
token
field-id
search-field-id
value value must be a non-blank string.
limit value may be nil, or if non-nil, value must be a valid integer greater than zero.
GET /api/embed/dashboard/:token/field/:field-id/valuesFetch FieldValues for a Field that is used as a param in an embedded Dashboard.
token
field-id
GET /api/embed/dashboard/:token/params/:param-key/search/:prefixEmbedded version of chain filter search endpoint.
token
param-key
prefix
query-params
GET /api/embed/dashboard/:token/params/:param-key/valuesEmbedded version of chain filter values endpoint.
token
param-key
query-params
GET /api/embed/pivot/card/:token/queryFetch the results of running a Card using a JSON Web Token signed with the embedding-secret-key.
Token should have the following format:
{:resource {:question <card-id>}
:params <parameters>}.
token
&
query-params
GET /api/embed/pivot/dashboard/:token/dashcard/:dashcard-id/card/:card-idFetch the results of running a Card belonging to a Dashboard using a JSON Web Token signed with the
embedding-secret-key.
token
dashcard-id
card-id
&
query-params
DELETE /api/field/:id/dimensionRemove the dimension associated to field at ID.
idGET /api/field/:idGet Field with ID.
idGET /api/field/:id/relatedReturn related entities.
idGET /api/field/:id/remapping/:remapped-idFetch remapped Field values.
id
remapped-id
value
GET /api/field/:id/search/:search-idSearch for values of a Field with search-id that start with value. See docstring for
metabase.api.field/search-values for a more detailed explanation.
id
search-id
value value must be a non-blank string.
GET /api/field/:id/summaryGet the count and distinct count of Field with ID.
idGET /api/field/:id/valuesIf a Field’s value of has_field_values is list, return a list of all the distinct values of the Field, and (if
defined by a User) a map of human-readable remapped values.
idGET /api/field/field%2C:field-name%2C:options/valuesImplementation of the field values endpoint for fields in the Saved Questions ‘virtual’ DB. This endpoint is just a convenience to simplify the frontend code. It just returns the standard ‘empty’ field values response.
_POST /api/field/:id/dimensionSets the dimension for the given field at ID.
id
type value must be one of: external, internal.
name value must be a non-blank string.
human_readable_field_id value may be nil, or if non-nil, value must be an integer greater than zero.
POST /api/field/:id/discard_valuesDiscard the FieldValues belonging to this Field. Only applies to fields that have FieldValues. If this Field’s Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.
You must be a superuser to do this.
idPOST /api/field/:id/rescan_valuesManually trigger an update for the FieldValues for this Field. Only applies to Fields that are eligible for FieldValues.
You must be a superuser to do this.
idPOST /api/field/:id/valuesUpdate the fields values and human-readable values for a Field whose semantic type is
category/city/state/country or whose base type is type/Boolean. The human-readable values are optional.
id
value-pairs value must be an array. Each value must be an array.
PUT /api/field/:idUpdate Field with ID.
visibility_type value may be nil, or if non-nil, value must be one of: details-only, hidden, normal, retired, sensitive.
display_name value may be nil, or if non-nil, value must be a non-blank string.
points_of_interest value may be nil, or if non-nil, value must be a non-blank string.
description value may be nil, or if non-nil, value must be a non-blank string.
semantic_type value may be nil, or if non-nil, value must be a valid field semantic or relation type (keyword or string).
coercion_strategy value may be nil, or if non-nil, value must be a valid coercion strategy (keyword or string).
has_field_values value may be nil, or if non-nil, value must be one of: auto-list, list, none, search.
settings value may be nil, or if non-nil, value must be a map.
caveats value may be nil, or if non-nil, value must be a non-blank string.
fk_target_field_id value may be nil, or if non-nil, value must be an integer greater than zero.
id
GET /api/geojson/Load a custom GeoJSON file based on a URL or file path provided as a query parameter. This behaves similarly to /api/geojson/:key but doesn’t require the custom map to be saved to the DB first.
You must be a superuser to do this.
url value must be a non-blank string.
respond
raise
GET /api/geojson/:keyFetch a custom GeoJSON file as defined in the custom-geojson setting. (This just acts as a simple proxy for the
file specified for key).
key value must be a non-blank string.
respond
raise
/api/ldap endpoints.
PUT /api/ldap/settingsUpdate LDAP related settings. You must be a superuser to do this.
You must be a superuser to do this.
settings value must be a map.GET /api/login-history/currentFetch recent logins for the current user.
/api/metric endpoints.
DELETE /api/metric/:idArchive a Metric. (DEPRECATED – Just pass updated value of :archived to the PUT endpoint instead.).
id
revision_message value must be a non-blank string.
GET /api/metric/Fetch all Metrics.
idGET /api/metric/:idFetch Metric with ID.
idGET /api/metric/:id/relatedReturn related entities.
idGET /api/metric/:id/revisionsFetch Revisions for Metric with ID.
idPOST /api/metric/Create a new Metric.
name value must be a non-blank string.
description value may be nil, or if non-nil, value must be a string.
table_id value must be an integer greater than zero.
definition value must be a map.
POST /api/metric/:id/revertRevert a Metric to a prior Revision.
id
revision_id value must be an integer greater than zero.
PUT /api/metric/:idUpdate a Metric with ID.
points_of_interest value may be nil, or if non-nil, value must be a string.
description value may be nil, or if non-nil, value must be a string.
archived value may be nil, or if non-nil, value must be a boolean.
definition value may be nil, or if non-nil, value must be a map.
revision_message value must be a non-blank string.
show_in_getting_started value may be nil, or if non-nil, value must be a boolean.
name value may be nil, or if non-nil, value must be a non-blank string.
caveats value may be nil, or if non-nil, value must be a string.
id
how_is_this_calculated value may be nil, or if non-nil, value must be a string.
PUT /api/metric/:id/important_fieldsUpdate the important Fields for a Metric with ID.
(This is used for the Getting Started guide).
You must be a superuser to do this.
id
important_field_ids value must be an array. Each value must be an integer greater than zero.
Native query snippet (/api/native-query-snippet) endpoints.
GET /api/native-query-snippet/Fetch all snippets.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).GET /api/native-query-snippet/:idFetch native query snippet with ID.
idPOST /api/native-query-snippet/Create a new NativeQuerySnippet.
content value must be a string.
description value may be nil, or if non-nil, value must be a string.
name snippet names cannot include } or start with spaces
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
PUT /api/native-query-snippet/:idUpdate an existing NativeQuerySnippet.
id
archived value may be nil, or if non-nil, value must be a boolean.
content value may be nil, or if non-nil, value must be a string.
description value may be nil, or if non-nil, value must be a string.
name value may be nil, or if non-nil, snippet names cannot include } or start with spaces
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
/api/notify/* endpoints which receive inbound etl server notifications.
POST /api/notify/db/:idNotification about a potential schema change to one of our Databases.
Caller can optionally specify a :table_id or :table_name in the body to limit updates to a single
Table. Optional Parameter :scan can be "full" or "schema" for a full sync or a schema sync, available
regardless if a :table_id or :table_name is passed.
This endpoint is secured by an API key that needs to be passed as a X-METABASE-APIKEY header which needs to be defined in
the MB_API_KEY environment variable.
id
table_id value may be nil, or if non-nil, value must be an integer greater than zero.
table_name value may be nil, or if non-nil, value must be a non-blank string.
scan value may be nil, or if non-nil, value must be one of: full, schema.
/api/permissions endpoints.
DELETE /api/permissions/group/:group-idDelete a specific PermissionsGroup.
You must be a superuser to do this.
group-idDELETE /api/permissions/membership/:idRemove a User from a PermissionsGroup (delete their membership).
You must be a superuser to do this.
idGET /api/permissions/graphFetch a graph of all Permissions.
You must be a superuser to do this.
GET /api/permissions/groupFetch all PermissionsGroups, including a count of the number of :members in that group.
You must be a superuser to do this.
GET /api/permissions/group/:idFetch the details for a certain permissions group.
You must be a superuser to do this.
idGET /api/permissions/membershipFetch a map describing the group memberships of various users. This map’s format is:
{<user-id> [{:membership_id <id>
:group_id <id>}]}.
You must be a superuser to do this.
POST /api/permissions/groupCreate a new PermissionsGroup.
You must be a superuser to do this.
name value must be a non-blank string.POST /api/permissions/membershipAdd a User to a PermissionsGroup. Returns updated list of members belonging to the group.
You must be a superuser to do this.
group_id value must be an integer greater than zero.
user_id value must be an integer greater than zero.
PUT /api/permissions/graphDo a batch update of Permissions by passing in a modified graph. This should return the same graph, in the same
format, that you got from GET /api/permissions/graph, with any changes made in the wherever necessary. This
modified graph must correspond to the PermissionsGraph schema. If successful, this endpoint returns the updated
permissions graph; use this as a base for any further modifications.
Revisions to the permissions graph are tracked. If you fetch the permissions graph and some other third-party modifies it before you can submit you revisions, the endpoint will instead make no changes and return a 409 (Conflict) response. In this case, you should fetch the updated graph and make desired changes to that.
You must be a superuser to do this.
body value must be a map.PUT /api/permissions/group/:group-idUpdate the name of a PermissionsGroup.
You must be a superuser to do this.
group-id
name value must be a non-blank string.
GET /api/premium-features/token/statusFetch info about the current Premium-Features premium features token including whether it is valid, a trial token, its
features, and when it is valid_thru.
Endpoints for previewing how Cards and Dashboards will look when embedding them.
These endpoints are basically identical in functionality to the ones in /api/embed, but:
:enabled_embedding for Cards/Dashboards:embed_params whitelist for Card/Dashboards, instead using a field called :_embedding_params in
the JWT token itself.Refer to the documentation for those endpoints for further details.
GET /api/preview-embed/card/:tokenFetch a Card you’re considering embedding by passing a JWT token.
tokenGET /api/preview-embed/card/:token/queryFetch the query results for a Card you’re considering embedding by passing a JWT token.
token
&
query-params
GET /api/preview-embed/dashboard/:tokenFetch a Dashboard you’re considering embedding by passing a JWT token. .
tokenGET /api/preview-embed/dashboard/:token/dashcard/:dashcard-id/card/:card-idFetch the results of running a Card belonging to a Dashboard you’re considering embedding with JWT token.
token
dashcard-id
card-id
&
query-params
GET /api/preview-embed/pivot/card/:token/queryFetch the query results for a Card you’re considering embedding by passing a JWT token.
token
&
query-params
GET /api/preview-embed/pivot/dashboard/:token/dashcard/:dashcard-id/card/:card-idFetch the results of running a Card belonging to a Dashboard you’re considering embedding with JWT token.
token
dashcard-id
card-id
&
query-params
Metabase API endpoints for viewing publicly-accessible Cards and Dashboards.
GET /api/public/card/:uuidFetch a publicly-accessible Card an return query results as well as :card information. Does not require auth
credentials. Public sharing must be enabled.
uuidGET /api/public/card/:uuid/field/:field-id/remapping/:remapped-idFetch remapped Field values. This is the same as GET /api/field/:id/remapping/:remapped-id, but for use with public
Cards.
uuid
field-id
remapped-id
value value must be a non-blank string.
GET /api/public/card/:uuid/field/:field-id/search/:search-field-idSearch for values of a Field that is referenced by a public Card.
uuid
field-id
search-field-id
value value must be a non-blank string.
limit value may be nil, or if non-nil, value must be a valid integer greater than zero.
GET /api/public/card/:uuid/field/:field-id/valuesFetch FieldValues for a Field that is referenced by a public Card.
uuid
field-id
GET /api/public/card/:uuid/queryFetch a publicly-accessible Card an return query results as well as :card information. Does not require auth
credentials. Public sharing must be enabled.
uuid
parameters value may be nil, or if non-nil, value must be a valid JSON string.
GET /api/public/card/:uuid/query/:export-formatFetch a publicly-accessible Card and return query results in the specified format. Does not require auth credentials. Public sharing must be enabled.
uuid
export-format value must be one of: api, csv, json, xlsx.
parameters value may be nil, or if non-nil, value must be a valid JSON string.
GET /api/public/dashboard/:uuidFetch a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled.
uuidGET /api/public/dashboard/:uuid/dashcard/:dashcard-id/card/:card-idFetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled.
uuid
card-id
dashcard-id
parameters value may be nil, or if non-nil, value must be a valid JSON string.
GET /api/public/dashboard/:uuid/field/:field-id/remapping/:remapped-idFetch remapped Field values. This is the same as GET /api/field/:id/remapping/:remapped-id, but for use with public
Dashboards.
uuid
field-id
remapped-id
value value must be a non-blank string.
GET /api/public/dashboard/:uuid/field/:field-id/search/:search-field-idSearch for values of a Field that is referenced by a Card in a public Dashboard.
uuid
field-id
search-field-id
value value must be a non-blank string.
limit value may be nil, or if non-nil, value must be a valid integer greater than zero.
GET /api/public/dashboard/:uuid/field/:field-id/valuesFetch FieldValues for a Field that is referenced by a Card in a public Dashboard.
uuid
field-id
GET /api/public/dashboard/:uuid/params/:param-key/search/:queryFetch filter values for dashboard parameter param-key, containing specified query.
uuid
param-key
query
query-params
GET /api/public/dashboard/:uuid/params/:param-key/valuesFetch filter values for dashboard parameter param-key.
uuid
param-key
query-params
GET /api/public/oembedoEmbed endpoint used to retreive embed code and metadata for a (public) Metabase URL.
url value must be a non-blank string.
format value may be nil, or if non-nil, value must be one of: json.
maxheight value may be nil, or if non-nil, value must be a valid integer.
maxwidth value may be nil, or if non-nil, value must be a valid integer.
GET /api/public/pivot/card/:uuid/queryFetch a publicly-accessible Card an return query results as well as :card information. Does not require auth
credentials. Public sharing must be enabled.
uuid
parameters value may be nil, or if non-nil, value must be a valid JSON string.
GET /api/public/pivot/dashboard/:uuid/dashcard/:dashcard-id/card/:card-idFetch the results for a Card in a publicly-accessible Dashboard. Does not require auth credentials. Public sharing must be enabled.
uuid
card-id
dashcard-id
parameters value may be nil, or if non-nil, value must be a valid JSON string.
/api/pulse endpoints.
DELETE /api/pulse/:id/subscriptionFor users to unsubscribe themselves from a pulse subscription.
idGET /api/pulse/Fetch all Pulses. If dashboard_id is specified, restricts results to dashboard subscriptions
associated with that dashboard. If user_id is specified, restricts results to pulses or subscriptions
created by the user, or for which the user is a known recipient.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
dashboard_id value may be nil, or if non-nil, value must be an integer greater than zero.
user_id value may be nil, or if non-nil, value must be an integer greater than zero.
GET /api/pulse/:idFetch Pulse with ID.
idGET /api/pulse/form_inputProvides relevant configuration information and user choices for creating/updating Pulses.
GET /api/pulse/preview_card/:idGet HTML rendering of a Card with id.
idGET /api/pulse/preview_card_info/:idGet JSON object containing HTML rendering of a Card with id and other information.
idGET /api/pulse/preview_card_png/:idGet PNG rendering of a Card with id.
idPOST /api/pulse/Create a new Pulse.
name value must be a non-blank string.
cards value must be an array. Each value must satisfy one of the following requirements: 1) value must be a map with the following keys (collection_id, description, display, id, include_csv, include_xls, name, dashboard_id, parameter_mappings) 2) value must be a map with the keys id, include_csv, include_xls, and dashboard_card_id. The array cannot be empty.
channels value must be an array. Each value must be a map. The array cannot be empty.
skip_if_empty value may be nil, or if non-nil, value must be a boolean.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
dashboard_id value may be nil, or if non-nil, value must be an integer greater than zero.
parameters value must be an array. Each value must be a map.
POST /api/pulse/testTest send an unsaved pulse.
name value must be a non-blank string.
cards value must be an array. Each value must satisfy one of the following requirements: 1) value must be a map with the following keys (collection_id, description, display, id, include_csv, include_xls, name, dashboard_id, parameter_mappings) 2) value must be a map with the keys id, include_csv, include_xls, and dashboard_card_id. The array cannot be empty.
channels value must be an array. Each value must be a map. The array cannot be empty.
skip_if_empty value may be nil, or if non-nil, value must be a boolean.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
collection_position value may be nil, or if non-nil, value must be an integer greater than zero.
dashboard_id value may be nil, or if non-nil, value must be an integer greater than zero.
PUT /api/pulse/:idUpdate a Pulse with id.
skip_if_empty value may be nil, or if non-nil, value must be a boolean.
parameters value must be an array. Each value must be a map.
archived value may be nil, or if non-nil, value must be a boolean.
channels value may be nil, or if non-nil, value must be an array. Each value must be a map. The array cannot be empty.
collection_id value may be nil, or if non-nil, value must be an integer greater than zero.
name value may be nil, or if non-nil, value must be a non-blank string.
id
cards value may be nil, or if non-nil, value must be an array. Each value must satisfy one of the following requirements: 1) value must be a map with the following keys (collection_id, description, display, id, include_csv, include_xls, name, dashboard_id, parameter_mappings) 2) value must be a map with the keys id, include_csv, include_xls, and dashboard_card_id. The array cannot be empty.
pulse-updates
GET /api/revision/Get revisions of an object.
entity value must be one of: card, dashboard.
id value must be an integer.
POST /api/revision/revertRevert an object to a prior revision.
entity value must be one of: card, dashboard.
id value must be an integer.
revision_id value must be an integer.
GET /api/search/Search within a bunch of models for the substring q.
For the list of models, check `metabase.search.config/all-models.
To search in archived portions of models, pass in archived=true.
If you want, while searching tables, only tables of a certain DB id,
pass in a DB id value to table_db_id.
To specify a list of models, pass in an array to models.
.
q value may be nil, or if non-nil, value must be a non-blank string.
archived value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
table_db_id value may be nil, or if non-nil, value must be an integer greater than zero.
models value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be an array. Each value must be a non-blank string. 2) value must be a non-blank string.
GET /api/search/modelsGet the set of models that a search query will return.
q
archived-string
table-db-id
/api/segment endpoints.
DELETE /api/segment/:idArchive a Segment. (DEPRECATED – Just pass updated value of :archived to the PUT endpoint instead.).
id
revision_message value must be a non-blank string.
GET /api/segment/Fetch all Segments.
GET /api/segment/:idFetch Segment with ID.
idGET /api/segment/:id/relatedReturn related entities.
idGET /api/segment/:id/revisionsFetch Revisions for Segment with ID.
idPOST /api/segment/Create a new Segment.
name value must be a non-blank string.
description value may be nil, or if non-nil, value must be a string.
table_id value must be an integer greater than zero.
definition value must be a map.
POST /api/segment/:id/revertRevert a Segement to a prior Revision.
id
revision_id value must be an integer greater than zero.
PUT /api/segment/:idUpdate a Segment with ID.
points_of_interest value may be nil, or if non-nil, value must be a string.
description value may be nil, or if non-nil, value must be a string.
archived value may be nil, or if non-nil, value must be a boolean.
definition value may be nil, or if non-nil, value must be a map.
revision_message value must be a non-blank string.
show_in_getting_started value may be nil, or if non-nil, value must be a boolean.
name value may be nil, or if non-nil, value must be a non-blank string.
caveats value may be nil, or if non-nil, value must be a string.
id
/api/session endpoints.
DELETE /api/session/Logout.
metabase-session-idGET /api/session/password_reset_token_validCheck is a password reset token is valid and isn’t expired.
token value must be a string.GET /api/session/propertiesGet all global properties and their values. These are the specific Settings which are meant to be public.
POST /api/session/Login.
username value must be a non-blank string.
password value must be a non-blank string.
request
POST /api/session/forgot_passwordSend a reset email when user has forgotten their password.
email value must be a valid email address.
request
POST /api/session/google_authLogin with Google Auth.
token value must be a non-blank string.
request
POST /api/session/reset_passwordReset password with a reset token.
token value must be a non-blank string.
password password is too common.
request
/api/setting endpoints.
GET /api/setting/Get all Settings and their values. You must be a superuser to do this.
You must be a superuser to do this.
GET /api/setting/:keyFetch a single Setting. You must be a superuser to do this.
You must be a superuser to do this.
key value must be a non-blank string.PUT /api/setting/Update multiple Settings values. You must be a superuser to do this.
You must be a superuser to do this.
settingsPUT /api/setting/:keyCreate/update a Setting. You must be a superuser to do this.
This endpoint can also be used to delete Settings by passing nil for :value.
You must be a superuser to do this.
key value must be a non-blank string.
value
GET /api/setup/admin_checklistReturn various “admin checklist” steps and whether they’ve been completed. You must be a superuser to see this!
You must be a superuser to do this.
GET /api/setup/user_defaultsReturns object containing default user details for initial setup, if configured, and if the provided token value matches the token in the configuration value.
tokenPOST /api/setup/Special endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and returns a session ID. This endpoint also can also be used to add a database, create and invite a second admin, and/or set specific settings from the setup flow.
engine
schedules value may be nil, or if non-nil, value must be a valid map of schedule maps for a DB.
allow_tracking value may be nil, or if non-nil, value must satisfy one of the following requirements: 1) value must be a boolean. 2) value must be a valid boolean string (‘true’ or ‘false’).
invited_last_name value may be nil, or if non-nil, value must be a non-blank string.
site_locale value may be nil, or if non-nil, String must be a valid two-letter ISO language or language-country code e.g. en or en_US.
email value must be a valid email address.
first_name value must be a non-blank string.
request
auto_run_queries value may be nil, or if non-nil, value must be a boolean.
password password is too common.
name
invited_email value may be nil, or if non-nil, value must be a valid email address.
invited_first_name value may be nil, or if non-nil, value must be a non-blank string.
is_full_sync
site_name value must be a non-blank string.
token Token does not match the setup token.
details
is_on_demand
database
last_name value must be a non-blank string.
POST /api/setup/validateValidate that we can connect to a database given a set of details.
engine value must be a valid database engine.
details
token Token does not match the setup token.
/api/slack endpoints.
GET /api/slack/manifestReturns the YAML manifest file that should be used to bootstrap new Slack apps.
You must be a superuser to do this.
PUT /api/slack/settingsUpdate Slack related settings. You must be a superuser to do this.
You must be a superuser to do this.
slack-app-token value may be nil, or if non-nil, value must be a non-blank string.
slack-files-channel value may be nil, or if non-nil, value must be a non-blank string.
/api/table endpoints.
GET /api/table/Get all Tables.
GET /api/table/:idGet Table with ID.
idGET /api/table/:id/fksGet all foreign keys whose destination is a Field that belongs to this Table.
idGET /api/table/:id/query_metadataGet metadata about a Table useful for running queries.
Returns DB, fields, field FKs, and field values.
Passing include_hidden_fields=true will include any hidden Fields in the response. Defaults to false
Passing include_sensitive_fields=true will include any sensitive Fields in the response. Defaults to false.
These options are provided for use in the Admin Edit Metadata page.
id
include_sensitive_fields value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
include_hidden_fields value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
GET /api/table/:id/relatedReturn related entities.
idGET /api/table/card__:id/fksReturn FK info for the ‘virtual’ table for a Card. This is always empty, so this endpoint serves mainly as a placeholder to avoid having to change anything on the frontend.
GET /api/table/card__:id/query_metadataReturn metadata for the ‘virtual’ table for a Card.
idPOST /api/table/:id/discard_valuesDiscard the FieldValues belonging to the Fields in this Table. Only applies to fields that have FieldValues. If this Table’s Database is set up to automatically sync FieldValues, they will be recreated during the next cycle.
You must be a superuser to do this.
idPOST /api/table/:id/rescan_valuesManually trigger an update for the FieldValues for the Fields belonging to this Table. Only applies to Fields that are eligible for FieldValues.
You must be a superuser to do this.
idPUT /api/table/Update all Table in ids.
ids value must be an array. Each value must be an integer greater than zero. The array cannot be empty.
display_name value may be nil, or if non-nil, value must be a non-blank string.
entity_type value may be nil, or if non-nil, value must be a valid entity type (keyword or string).
visibility_type value may be nil, or if non-nil, value must be one of: cruft, hidden, technical.
description value may be nil, or if non-nil, value must be a non-blank string.
caveats value may be nil, or if non-nil, value must be a non-blank string.
points_of_interest value may be nil, or if non-nil, value must be a non-blank string.
show_in_getting_started value may be nil, or if non-nil, value must be a boolean.
PUT /api/table/:idUpdate Table with ID.
visibility_type value may be nil, or if non-nil, value must be one of: cruft, hidden, technical.
field_order value may be nil, or if non-nil, value must be one of: alphabetical, custom, database, smart.
display_name value may be nil, or if non-nil, value must be a non-blank string.
points_of_interest value may be nil, or if non-nil, value must be a non-blank string.
entity_type value may be nil, or if non-nil, value must be a valid entity type (keyword or string).
description value may be nil, or if non-nil, value must be a non-blank string.
show_in_getting_started value may be nil, or if non-nil, value must be a boolean.
caveats value may be nil, or if non-nil, value must be a non-blank string.
id
PUT /api/table/:id/fields/orderReorder fields.
You must be a superuser to do this.
id
field_order value must be an array. Each value must be an integer greater than zero.
/api/task endpoints.
GET /api/task/Fetch a list of recent tasks stored as Task History.
You must be a superuser to do this.
GET /api/task/:idGet TaskHistory entry with ID.
idGET /api/task/infoReturn raw data about all scheduled tasks (i.e., Quartz Jobs and Triggers).
You must be a superuser to do this.
/api/tiles endpoints.
GET /api/tiles/:zoom/:x/:y/:lat-field/:lon-fieldThis endpoints provides an image with the appropriate pins rendered given a MBQL query (passed as a GET query
string param). We evaluate the query and find the set of lat/lon pairs which are relevant and then render the
appropriate ones. It’s expected that to render a full map view several calls will be made to this endpoint in
parallel.
zoom value must be a valid integer.
x value must be a valid integer.
y value must be a valid integer.
lat-field value must be a string.
lon-field value must be a string.
query value must be a valid JSON string.
GET /api/transform/:db-id/:schema/:transform-nameLook up a database schema transform.
db-id
schema
transform-name
/api/user endpoints.
DELETE /api/user/:idDisable a User. This does not remove the User from the DB, but instead disables their account.
You must be a superuser to do this.
idGET /api/user/Fetch a list of Users. By default returns every active user but only active users.
If status is deactivated, include deactivated users only.
If status is all, include all users (active and inactive).
Also supports include_deactivated, which if true, is equivalent to status=all.
status and included_deactivated requires superuser permissions.
For users with segmented permissions, return only themselves.
Takes limit, offset for pagination.
Takes query for filtering on first name, last name, email.
Also takes group_id, which filters on group id.
status value may be nil, or if non-nil, value must be a string.
query value may be nil, or if non-nil, value must be a string.
group_id value may be nil, or if non-nil, value must be an integer greater than zero.
include_deactivated value may be nil, or if non-nil, value must be a valid boolean string (‘true’ or ‘false’).
GET /api/user/:idFetch a User. You must be fetching yourself or be a superuser.
idGET /api/user/currentFetch the current User.
POST /api/user/Create a new User, return a 400 if the email address is already taken.
You must be a superuser to do this.
first_name value must be a non-blank string.
last_name value must be a non-blank string.
email value must be a valid email address.
password
group_ids value may be nil, or if non-nil, value must be an array. Each value must be an integer greater than zero.
login_attributes value may be nil, or if non-nil, login attribute keys must be a keyword or string
POST /api/user/:id/send_inviteResend the user invite email for a given user.
You must be a superuser to do this.
idPUT /api/user/:idUpdate an existing, active User.
id
email value may be nil, or if non-nil, value must be a valid email address.
first_name value may be nil, or if non-nil, value must be a non-blank string.
last_name value may be nil, or if non-nil, value must be a non-blank string.
group_ids value may be nil, or if non-nil, value must be an array. Each value must be an integer greater than zero.
is_superuser value may be nil, or if non-nil, value must be a boolean.
login_attributes value may be nil, or if non-nil, login attribute keys must be a keyword or string
locale value may be nil, or if non-nil, String must be a valid two-letter ISO language or language-country code e.g. en or en_US.
PUT /api/user/:id/modal/:modalIndicate that a user has been informed about the vast intricacies of ‘the’ Query Builder.
id
modal
PUT /api/user/:id/passwordUpdate a user’s password.
id
password password is too common.
old_password
PUT /api/user/:id/reactivateReactivate user at :id.
You must be a superuser to do this.
idRandom utilty endpoints for things that don’t belong anywhere else in particular, e.g. endpoints for certain admin page tasks.
GET /api/util/bug_report_detailsReturns version and system information relevant to filing a bug report against Metabase.
You must be a superuser to do this.
GET /api/util/diagnostic_info/connection_pool_infoReturns database connection pool info for the current Metabase instance.
You must be a superuser to do this.
GET /api/util/logsLogs.
You must be a superuser to do this.
GET /api/util/random_tokenReturn a cryptographically secure random 32-byte token, encoded as a hexadecimal string.
Intended for use when creating a value for embedding-secret-key.
GET /api/util/statsAnonymous usage stats. Endpoint for testing, and eventually exposing this to instance admins to let them see what is being phoned home.
You must be a superuser to do this.
POST /api/util/password_checkEndpoint that checks if the supplied password meets the currently configured password complexity rules.
password password is too common.