List Databases

GET /api/database

Fetch all Databases. include_tables means we should hydrate the Tables belonging to each DB. include_cards here means we should also include virtual Table entries for saved Questions, e.g. so we can easily use them as source Tables in queries. Default for both is false.

Query parameters

  • value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').

  • value may be nil, or if non-nil, value must be a valid boolean string ('true' or 'false').

Responses

GET /api/database
curl \
 -X GET http://metabase.example.com/api/database
Response examples (200)
[
  {
    "description": "description",
    "created_at": "2000-01-23 04:56:07 +0000",
    "caveats": "caveats",
    "is_sample": true,
    "features": [
      "features",
      "features"
    ],
    "metadata_sync_schedule": "metadata_sync_schedule",
    "tables": [
      {
        "schema": "schema",
        "entity_name": "entity_name",
        "description": "description",
        "active": true,
        "created_at": "2000-01-23 04:56:07 +0000",
        "rows": 5,
        "display_name": "display_name",
        "raw_table_id": "raw_table_id",
        "caveats": "caveats",
        "entity_type": "entity_type",
        "show_in_getting_started": true,
        "db_id": 2,
        "updated_at": "2000-01-23 04:56:07 +0000",
        "name": "name",
        "points_of_interest": "points_of_interest",
        "id": 5,
        "visibility_type": "visibility_type"
      },
      {
        "schema": "schema",
        "entity_name": "entity_name",
        "description": "description",
        "active": true,
        "created_at": "2000-01-23 04:56:07 +0000",
        "rows": 5,
        "display_name": "display_name",
        "raw_table_id": "raw_table_id",
        "caveats": "caveats",
        "entity_type": "entity_type",
        "show_in_getting_started": true,
        "db_id": 2,
        "updated_at": "2000-01-23 04:56:07 +0000",
        "name": "name",
        "points_of_interest": "points_of_interest",
        "id": 5,
        "visibility_type": "visibility_type"
      }
    ],
    "is_full_sync": true,
    "native_permissions": "native_permissions",
    "updated_at": "2000-01-23 04:56:07 +0000",
    "engine": "engine",
    "name": "name",
    "points_of_interest": "points_of_interest",
    "details": {
      "connProperties": "connProperties",
      "let-user-control-scheduling": true,
      "password": "password",
      "dbname": "dbname",
      "port": 6,
      "host": "host",
      "user": "user",
      "authMech": 1
    },
    "id": 0,
    "cache_field_values_schedule": "cache_field_values_schedule"
  }
]
Response examples (200)
[
  {
    "id": 0,
    "name": "name",
    "engine": "engine",
    "tables": [
      {
        "id": 5,
        "name": "name",
        "rows": 5,
        "db_id": 2,
        "active": true,
        "schema": "schema",
        "caveats": "caveats",
        "created_at": "2000-01-23T04:56:07+00:00",
        "updated_at": "2000-01-23T04:56:07+00:00",
        "description": "description",
        "entity_name": "entity_name",
        "entity_type": "entity_type",
        "display_name": "display_name",
        "raw_table_id": "raw_table_id",
        "visibility_type": "visibility_type",
        "points_of_interest": "points_of_interest",
        "show_in_getting_started": true
      },
      {
        "id": 5,
        "name": "name",
        "rows": 5,
        "db_id": 2,
        "active": true,
        "schema": "schema",
        "caveats": "caveats",
        "created_at": "2000-01-23T04:56:07+00:00",
        "updated_at": "2000-01-23T04:56:07+00:00",
        "description": "description",
        "entity_name": "entity_name",
        "entity_type": "entity_type",
        "display_name": "display_name",
        "raw_table_id": "raw_table_id",
        "visibility_type": "visibility_type",
        "points_of_interest": "points_of_interest",
        "show_in_getting_started": true
      }
    ],
    "caveats": "caveats",
    "details": {
      "host": "host",
      "port": 6,
      "user": "user",
      "dbname": "dbname",
      "authMech": 1,
      "password": "password",
      "connProperties": "connProperties",
      "let-user-control-scheduling": true
    },
    "features": [
      "features",
      "features"
    ],
    "is_sample": true,
    "created_at": "2000-01-23T04:56:07+00:00",
    "updated_at": "2000-01-23T04:56:07+00:00",
    "description": "description",
    "is_full_sync": true,
    "native_permissions": "native_permissions",
    "points_of_interest": "points_of_interest",
    "metadata_sync_schedule": "metadata_sync_schedule",
    "cache_field_values_schedule": "cache_field_values_schedule"
  }
]