---
title: "GET /api/database"
method: GET
path: "/api/database"
tags: ["/api/database"]
---

# GET /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.

## Query parameters

- `include` 'tables', nullable
- `include_analytics` boolean, nullable, required
- `saved` boolean, nullable, required
- `include_editable_data_model` boolean, nullable, required
- `exclude_uneditable_details` boolean, nullable, required
- `include_only_uploadable` boolean, nullable, required
- `router_database_id` integer, nullable — value must be an integer greater than zero.
- `can-query` boolean, nullable
- `can-write-metadata` boolean, nullable

## Response `2XX`

Successful response

## Other responses

- `4XX` — Client error response
- `5XX` — Server error response

---

[API](https://skmtc.net/metabase/apis/metabase-api.md) · [All operations](https://skmtc.net/metabase/apis/metabase-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metabase/metabase-api/revisions/08b5a2bafb4f/schema)
