GET /api/database/{id}
Get a single Database with id. Optionally pass ?include=tables or ?include=tables.fields to include the Tables belonging to this database, or the Tables and Fields, respectively. If the requestor has write permissions for the DB (i.e. is an admin or has data model permissions), then certain inferred secret values will also be included in the returned details (see [[metabase.secrets.models.secret/expand-db-details-inferred-secret-values]] for full details).
Passing include_editable_data_model will only return tables for which the current user has data model editing permissions, if Enterprise Edition code is available and a token with the advanced-permissions feature is present. In addition, if the user has no data access for the DB (aka block permissions), it will return only the DB name, ID and tables, with no additional metadata.
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.
Path parameters
value must be an integer greater than zero.
Query parameters
Response
Successful response