Version v0.43 of Metabase is no longer supported. Check out the docs for the current stable version, Metabase v0.63.
Card
/api/card endpoints.
- DELETE /api/card/:card-id/public_link
- DELETE /api/card/:id
- GET /api/card/
- GET /api/card/:id
- GET /api/card/:id/related
- GET /api/card/:id/timelines
- GET /api/card/embeddable
- GET /api/card/public
- POST /api/card/
- POST /api/card/:card-id/public_link
- POST /api/card/:card-id/query
- POST /api/card/:card-id/query/:export-format
- POST /api/card/:id/copy
- POST /api/card/collections
- POST /api/card/pivot/:card-id/query
- POST /api/card/related
- PUT /api/card/:id
DELETE /api/card/:card-id/public_link
Delete the publicly-accessible link to this Card.
PARAMS:
card-id
DELETE /api/card/:id
Delete a Card. (DEPRECATED – don’t delete a Card anymore – archive it instead.).
PARAMS:
id
GET /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, bookmarked, database, table, recent, popular, and archived. See
corresponding implementation functions above for the specific behavior of each filter option. :card_index:.
PARAMS:
-
fvalue may be nil, or if non-nil, value must be one of:all,archived,bookmarked,database,mine,popular,recent,table. -
model_idvalue may be nil, or if non-nil, value must be an integer greater than zero.
GET /api/card/:id
Get Card with ID.
PARAMS:
id
GET /api/card/:id/related
Return related entities.
PARAMS:
id
GET /api/card/:id/timelines
Get the timelines for card with ID. Looks up the collection the card is in and uses that.
PARAMS:
-
id -
includevalue may be nil, or if non-nil, value must be one of:events. -
startvalue may be nil, or if non-nil, value must be a valid date string -
endvalue may be nil, or if non-nil, value must be a valid date string
GET /api/card/embeddable
Fetch a list of Cards where enable_embedding is true. The cards can be embedded using the embedding endpoints
and a signed JWT.
GET /api/card/public
Fetch a list of Cards with public UUIDs. These cards are publicly-accessible if public sharing is enabled.
POST /api/card/
Create a new Card.
PARAMS:
-
visualization_settingsvalue must be a map. -
descriptionvalue may be nil, or if non-nil, value must be a non-blank string. -
collection_positionvalue may be nil, or if non-nil, value must be an integer greater than zero. -
result_metadatavalue may be nil, or if non-nil, value must be an array of valid results column metadata maps. -
collection_idvalue may be nil, or if non-nil, value must be an integer greater than zero. -
namevalue must be a non-blank string. -
cache_ttlvalue may be nil, or if non-nil, value must be an integer greater than zero. -
dataset_query -
displayvalue must be a non-blank string.
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.
PARAMS:
card-id
POST /api/card/:card-id/query
Run the query associated with a Card.
PARAMS:
-
card-id -
parameters -
ignore_cachevalue may be nil, or if non-nil, value must be a boolean. -
dashboard_idvalue may be nil, or if non-nil, value must be an integer greater than zero. -
collection_previewvalue may be nil, or if non-nil, value must be a boolean.
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).
PARAMS:
-
card-id -
export-formatvalue must be one of:api,csv,json,xlsx. -
parametersvalue may be nil, or if non-nil, value must be a valid JSON string.
POST /api/card/:id/copy
Copy a Card, with the new name ‘Copy of name’.
PARAMS:
idvalue may be nil, or if non-nil, value must be an integer greater than zero.
POST /api/card/collections
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_idsvalue must be an array. Each value must be an integer greater than zero. -
collection_idvalue 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_cachevalue may be nil, or if non-nil, value must be a boolean.
POST /api/card/related
Return related entities for an ad-hoc query.
PARAMS:
query
PUT /api/card/:id
Update a Card.
PARAMS:
-
visualization_settingsvalue may be nil, or if non-nil, value must be a map. -
datasetvalue may be nil, or if non-nil, value must be a boolean. -
descriptionvalue may be nil, or if non-nil, value must be a string. -
archivedvalue may be nil, or if non-nil, value must be a boolean. -
collection_positionvalue may be nil, or if non-nil, value must be an integer greater than zero. -
result_metadatavalue may be nil, or if non-nil, value must be an array of valid results column metadata maps. -
enable_embeddingvalue may be nil, or if non-nil, value must be a boolean. -
collection_idvalue may be nil, or if non-nil, value must be an integer greater than zero. -
card-updates -
namevalue may be nil, or if non-nil, value must be a non-blank string. -
embedding_paramsvalue may be nil, or if non-nil, value must be a valid embedding params map. -
cache_ttlvalue may be nil, or if non-nil, value must be an integer greater than zero. -
dataset_queryvalue may be nil, or if non-nil, value must be a map. -
id -
displayvalue may be nil, or if non-nil, value must be a non-blank string.
Read docs for other versions of Metabase.