v12

latestOpenAPI 3.1.0AGPL-3.0raw.githubusercontent.com2026-05-286377631.6 MB
/api/database

GET /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_editable_data_model will only include DBs for which the current user has data model editing permissions. (If include=tables, this also applies to the list of tables in each DB). Should only be used if Enterprise Edition code is available the advanced-permissions feature is enabled.

  • exclude_uneditable_details will only include DBs for which the current user can edit the DB details. Has no effect unless Enterprise Edition code is available and the advanced-permissions feature is enabled.

  • include_only_uploadable will only include DBs into which Metabase can insert new data.

  • can-query will only include DBs for which the current user has query permissions. Default: false.

  • can-write-metadata will only include DBs for which the current user has data model editing permissions for at least one table in the database. Default: false.

Independently of these flags, the implementation of [[metabase.models.interface/to-json]] for :model/Database in [[metabase.warehouses.models.database]] uses the implementation of [[metabase.models.interface/can-write?]] for :model/Database in [[metabase.warehouses.models.database]] to exclude the details field, if the requesting user lacks permission to change the database details.

get/api/database

Query parameters

include'tables' nullable

include must be either empty or the value 'tables'

include_analyticsboolean nullable required
savedboolean nullable required
include_editable_data_modelboolean nullable required
exclude_uneditable_detailsboolean nullable required
include_only_uploadableboolean nullable required
router_database_idinteger nullable

value must be an integer greater than zero.

can-queryboolean nullable
can-write-metadataboolean nullable

Response

Successful response