Newer
Older
_This file was generated from source comments by `clojure -M:run api-documentation`_.
Check out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).
## Activity
- [GET /api/activity/](#get-apiactivity)
- [GET /api/activity/recent_views](#get-apiactivityrecent_views)
Get recent activity.
### `GET /api/activity/recent_views`
Get the list of 10 things the current user has been viewing most recently.
## Alert
/api/alert endpoints.
- [DELETE /api/alert/:id/subscription](#delete-apialertidsubscription)
- [GET /api/alert/](#get-apialert)
- [GET /api/alert/:id](#get-apialertid)
- [GET /api/alert/question/:id](#get-apialertquestionid)
- [POST /api/alert/](#post-apialert)
- [PUT /api/alert/:id](#put-apialertid)
### `DELETE /api/alert/:id/subscription`
Unsubscribes a user from the given alert.
##### PARAMS:
* **`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/question/:id`
Fetch all questions for the given question (`Card`) id.
##### PARAMS:
* **`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').
##### PARAMS:
* **`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.
* **`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.
## Automagic dashboards
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-query)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-query)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-querycomparecomparison-entitycomparison-entity-id-or-query)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-queryruleprefixrule)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycellcell-queryruleprefixrulecomparecomparison-entitycomparison-entity-id-or-query)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-querycomparecomparison-entitycomparison-entity-id-or-query)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule](#get-apiautomagic-dashboardsentityentity-id-or-queryruleprefixrule)
- [GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule/compare/:comparison-entity/:comparison-entity-id-or-query](#get-apiautomagic-dashboardsentityentity-id-or-queryruleprefixrulecomparecomparison-entitycomparison-entity-id-or-query)
- [GET /api/automagic-dashboards/database/:id/candidates](#get-apiautomagic-dashboardsdatabaseidcandidates)
### `GET /api/automagic-dashboards/:entity/:entity-id-or-query`
Return an automagic dashboard for entity `entity` with id `ìd`.
### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query`
Return an automagic dashboard analyzing cell in automagic dashboard for entity `entity`
defined by
query `cell-querry`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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-query`
Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`
with id `ìd` defined by query `cell-querry`; compared with entity `comparison-entity` with id
`comparison-entity-id-or-query.`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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"
### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:rule`
Return an automagic dashboard analyzing cell in question with id `id` defined by
query `cell-querry` using rule `rule`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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-query`
Return an automagic comparison dashboard for cell in automagic dashboard for entity `entity`
with id `ìd` defined by query `cell-querry` using rule `rule`; compared with entity
`comparison-entity` with id `comparison-entity-id-or-query.`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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"
### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/compare/:comparison-entity/:comparison-entity-id-or-query`
Return an automagic comparison dashboard for entity `entity` with id `ìd` compared with entity
`comparison-entity` with id `comparison-entity-id-or-query.`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`comparison-entity`** Invalid comparison entity type. Can only be one of "table", "segment", or "adhoc"
### `GET /api/automagic-dashboards/:entity/:entity-id-or-query/rule/:prefix/:rule`
Return an automagic dashboard for entity `entity` with id `ìd` using rule `rule`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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-query`
Return an automagic comparison dashboard for entity `entity` with id `ìd` using rule `rule`;
compared with entity `comparison-entity` with id `comparison-entity-id-or-query.`.
##### PARAMS:
* **`entity`** Invalid entity type
* **`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"
### `GET /api/automagic-dashboards/database/:id/candidates`
Return a list of candidates for automagic dashboards orderd by interestingness.
##### PARAMS:
## Card
/api/card endpoints.
- [DELETE /api/card/:card-id/favorite](#delete-apicardcard-idfavorite)
- [DELETE /api/card/:card-id/public_link](#delete-apicardcard-idpublic_link)
- [DELETE /api/card/:id](#delete-apicardid)
- [GET /api/card/](#get-apicard)
- [GET /api/card/:id](#get-apicardid)
- [GET /api/card/:id/related](#get-apicardidrelated)
- [GET /api/card/embeddable](#get-apicardembeddable)
- [GET /api/card/public](#get-apicardpublic)
- [POST /api/card/](#post-apicard)
- [POST /api/card/:card-id/favorite](#post-apicardcard-idfavorite)
- [POST /api/card/:card-id/public_link](#post-apicardcard-idpublic_link)
- [POST /api/card/:card-id/query](#post-apicardcard-idquery)
- [POST /api/card/:card-id/query/:export-format](#post-apicardcard-idqueryexport-format)
- [POST /api/card/collections](#post-apicardcollections)
- [POST /api/card/pivot/:card-id/query](#post-apicardpivotcard-idquery)
- [POST /api/card/related](#post-apicardrelated)
- [PUT /api/card/:id](#put-apicardid)
### `DELETE /api/card/:card-id/favorite`
Unfavorite a Card.
##### PARAMS:
### `DELETE /api/card/:card-id/public_link`
You must be a superuser to do this.
##### PARAMS:
Delete a Card. (DEPRECATED -- don't delete a Card anymore -- archive it instead.).
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 `Card` with ID.
##### PARAMS:
Return related entities.
##### PARAMS:
Fetch 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.
Fetch 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.
Create a new `Card`.
##### PARAMS:
* **`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.
* **`cache_ttl`** value may be nil, or if non-nil, value must be an integer greater than zero.
### `POST /api/card/:card-id/favorite`
### `POST /api/card/:card-id/public_link`
Generate 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.
##### PARAMS:
### `POST /api/card/:card-id/query`
Run the query associated with a Card.
##### PARAMS:
* **`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-format`
Run 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).
* **`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.
Bulk 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.
##### PARAMS:
* **`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/query`
Run the query associated with a Card.
##### PARAMS:
* **`card-id`**
* **`parameters`**
* **`ignore_cache`** value may be nil, or if non-nil, value must be a boolean.
Return related entities for an ad-hoc query.
##### PARAMS:
Update a `Card`.
##### PARAMS:
* **`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.
* **`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.
* **`display`** value may be nil, or if non-nil, value must be a non-blank string.
## Collection
`/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/](#get-apicollection)
- [GET /api/collection/:id](#get-apicollectionid)
- [GET /api/collection/:id/items](#get-apicollectioniditems)
- [GET /api/collection/graph](#get-apicollectiongraph)
- [GET /api/collection/root](#get-apicollectionroot)
- [GET /api/collection/root/items](#get-apicollectionrootitems)
- [GET /api/collection/tree](#get-apicollectiontree)
- [POST /api/collection/](#post-apicollection)
- [PUT /api/collection/:id](#put-apicollectionid)
- [PUT /api/collection/graph](#put-apicollectiongraph)
### `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`.
##### PARAMS:
* **`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.
Fetch a specific Collection with standard details added.
### `GET /api/collection/:id/items`
Fetch 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 models
* `archived` - 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.
* **`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`.
Fetch a graph of all Collection Permissions.
##### PARAMS:
* **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
Return the 'Root' Collection object with standard details added.
##### PARAMS:
* **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
### `GET /api/collection/root/items`
Fetch 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`.
Similar to `GET /`, but returns Collections in a tree structure, e.g.
[{:name "A"
:here #{:dataset :card}
:below #{:dataset :card}
:children [{:name "E"}]}
{:name "F"
{: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.
Create a new Collection.
##### PARAMS:
* **`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`.
Modify 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.
Do a batch update of Collections Permissions by passing in a modified graph.
* **`namespace`** value may be nil, or if non-nil, value must be a non-blank string.
## Dashboard
/api/dashboard endpoints.
- [DELETE /api/dashboard/:dashboard-id/public_link](#delete-apidashboarddashboard-idpublic_link)
- [DELETE /api/dashboard/:id](#delete-apidashboardid)
- [DELETE /api/dashboard/:id/cards](#delete-apidashboardidcards)
- [DELETE /api/dashboard/:id/favorite](#delete-apidashboardidfavorite)
- [GET /api/dashboard/](#get-apidashboard)
- [GET /api/dashboard/:id](#get-apidashboardid)
- [GET /api/dashboard/:id/params/:param-key/search/:query](#get-apidashboardidparamsparam-keysearchquery)
- [GET /api/dashboard/:id/params/:param-key/values](#get-apidashboardidparamsparam-keyvalues)
- [GET /api/dashboard/:id/related](#get-apidashboardidrelated)
- [GET /api/dashboard/:id/revisions](#get-apidashboardidrevisions)
- [GET /api/dashboard/embeddable](#get-apidashboardembeddable)
- [GET /api/dashboard/params/valid-filter-fields](#get-apidashboardparamsvalid-filter-fields)
- [GET /api/dashboard/public](#get-apidashboardpublic)
- [POST /api/dashboard/](#post-apidashboard)
- [POST /api/dashboard/:dashboard-id/card/:card-id/query](#post-apidashboarddashboard-idcardcard-idquery)
- [POST /api/dashboard/:dashboard-id/card/:card-id/query/:export-format](#post-apidashboarddashboard-idcardcard-idqueryexport-format)
- [POST /api/dashboard/:dashboard-id/card/pivot/:card-id/query](#post-apidashboarddashboard-idcardpivotcard-idquery)
- [POST /api/dashboard/:dashboard-id/public_link](#post-apidashboarddashboard-idpublic_link)
- [POST /api/dashboard/:from-dashboard-id/copy](#post-apidashboardfrom-dashboard-idcopy)
- [POST /api/dashboard/:id/cards](#post-apidashboardidcards)
- [POST /api/dashboard/:id/favorite](#post-apidashboardidfavorite)
- [POST /api/dashboard/:id/revert](#post-apidashboardidrevert)
- [POST /api/dashboard/save](#post-apidashboardsave)
- [POST /api/dashboard/save/collection/:parent-collection-id](#post-apidashboardsavecollectionparent-collection-id)
- [PUT /api/dashboard/:id](#put-apidashboardid)
- [PUT /api/dashboard/:id/cards](#put-apidashboardidcards)
### `DELETE /api/dashboard/:dashboard-id/public_link`
Delete the publicly-accessible link to this Dashboard.
You must be a superuser to do this.
##### PARAMS:
### `DELETE /api/dashboard/:id/cards`
* **`dashcardId`** value must be a valid integer greater than zero.
### `DELETE /api/dashboard/:id/favorite`
Unfavorite a Dashboard.
##### PARAMS:
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/:id/params/:param-key/search/:query`
Fetch 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.
##### PARAMS:
* **`id`**
* **`param-key`**
* **`query`**
### `GET /api/dashboard/:id/params/:param-key/values`
Fetch 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.
##### PARAMS:
* **`id`**
* **`param-key`**
* **`query-params`**
### `GET /api/dashboard/:id/related`
Return related entities.
##### PARAMS:
### `GET /api/dashboard/:id/revisions`
### `GET /api/dashboard/embeddable`
Fetch 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-fields`
Utility 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.
##### PARAMS:
* **`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.
Fetch 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.
##### PARAMS:
* **`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.
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
### `POST /api/dashboard/:dashboard-id/card/:card-id/query`
Run the query associated with a Saved Question (`Card`) in the context of a `Dashboard` that includes it.
##### PARAMS:
* **`dashboard-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/card/:card-id/query/:export-format`
Run 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).
##### PARAMS:
* **`dashboard-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/card/pivot/:card-id/query`
Pivot table version of `POST /api/dashboard/:dashboard-id/card/:card-id`.
##### PARAMS:
* **`dashboard-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/public_link`
Generate 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.
##### PARAMS:
### `POST /api/dashboard/:from-dashboard-id/copy`
Copy a Dashboard.
##### PARAMS:
* **`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/cards`
* **`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.
### `POST /api/dashboard/:id/favorite`
Favorite a Dashboard.
##### PARAMS: