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

  • include_tables boolean

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

  • include_cards boolean

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

Responses

  • 200

    successful operation

    Hide response attributes Show response attributes array[object]
    • id integer(int64) Required
    • name string
    • description string
    • features array[string]
    • is_full_sync boolean
    • is_sample boolean
    • cache_field_values_schedule string(cron-schedule)
    • metadata_sync_schedule string(cron-schedule)
    • caveats string

      type unknown

    • engine string
    • created_at string(date-time)
    • updated_at string(date-time)
    • native_permissions string
    • points_of_interest string

      type unknown

    • details object
      Hide details attributes Show details attributes object
      • host string
      • port integer(int32)
      • dbname string
      • authMech integer(int32)
      • user string
      • password string
      • connProperties string
      • let-user-control-scheduling boolean
    • tables array[object]
      Hide tables attributes Show tables attributes array[object]
      • description string
      • entity_type string

        unknown type

      • schema string
      • raw_table_id string

        unknown type

      • show_in_getting_started boolean
      • name string
      • caveats string

        unknown type

      • rows integer(int64)
      • updated_at string(date-time)
      • entity_name string

        unknown type

      • active boolean
      • id integer(int64)
      • db_id integer(int64)
      • visibility_type string

        unknown type

      • display_name string
      • created_at string(date-time)
      • points_of_interest string

        unknown type

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"
  }
]