/api/card

POST /api/card

Create a new Card. Card type can be question, metric, or model.

post/api/card

Request body

cache_ttlinteger nullable

value must be an integer greater than zero.

collection_positioninteger nullable

value must be an integer greater than zero.

dashboard_idinteger nullable

value must be an integer greater than zero.

dashboard_tab_idinteger nullable

value must be an integer greater than zero.

dataset_queryobject required

Value must be a map.

descriptionstring nullable
displaystring required
entity_idstring nullable
namestring required
result_metadataMetabaseQueryProcessorSchemaResultMetadataColumn[] nullable— unresolved $ref

value must be an array of valid results column metadata maps.

type'question' | 'metric' | 'model'

All acceptable card types.

Previously (< 49), we only had 2 card types: question and model, which were differentiated using the boolean dataset column. Soon we'll have more card types (e.g: metric) and we will longer be able to use a boolean column to differentiate between all types. So we've added a new type column for this purpose.

Migrating all the code to use report_card.type will be quite an effort, we decided that we'll migrate it gradually.

visualization_settingsobject required

Value must be a map.

Response

Successful response

Changes