---
title: "POST /api/ee/serialization/metadata/export"
method: POST
path: "/api/ee/serialization/metadata/export"
tags: ["/api/ee/serialization"]
---

# POST /api/ee/serialization/metadata/export

`POST /api/ee/serialization/metadata/export`

Get warehouse metadata (databases, tables, and fields) for all databases visible to the
  current user. References between rows are emitted as raw numeric ids (`db_id`,
  `table_id`, `parent_id`, `fk_target_field_id`).

  Sections must be opted into with the `with-databases`, `with-tables`, and `with-fields`
  query parameters — they all default to `false`. The response is streamed for efficiency
  with large schemas.

  Requires `View data` → `Can view` and `Create queries` → `Query builder only` (or
  `Query builder and native`) permissions on each database and table.

## Query parameters

- `with-databases` boolean, nullable, required
- `with-tables` boolean, nullable, required
- `with-fields` boolean, nullable, required

## Response `2XX`

Successful response

- MetabaseEnterpriseSerializationSchemaExportMetadataResponse
  - `databases` MetabaseEnterpriseSerializationSchemaExportedDatabase[]
    - `engine` string, required
    - `id` integer, required — Valid Database ID
    - `name` string, required
  - `fields` MetabaseEnterpriseSerializationSchemaExportedField[]
    - `base_type` string, required
    - `coercion_strategy` string
    - `database_type` string
    - `description` string
    - `effective_type` string
    - `fk_target_field_id` integer — Valid Field ID
    - `id` integer, required — Valid Field ID
    - `name` string, required
    - `nfc_path` string[]
    - `parent_id` integer — Valid Field ID
    - `semantic_type` string
    - `table_id` integer, required — Valid Table ID
  - `tables` MetabaseEnterpriseSerializationSchemaExportedTable[]
    - `db_id` integer, required — Valid Database ID
    - `description` string
    - `id` integer, required — Valid Table ID
    - `name` string, required
    - `schema` string

## 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)
