---
title: "Migrate a wide report extract"
method: POST
path: "/api/v3/extracts/migrate-wide"
tags: ["Extracts"]
---

# Migrate a wide report extract

`POST /api/v3/extracts/migrate-wide`

## Request

- Base URL: `https://embedded.improvado.io`
- URL: `https://embedded.improvado.io/api/v3/extracts/migrate-wide`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `dts_session_id`
- TypeScript: <https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/docs/api/v3/extracts/migrate-wide/post.ts> (a function with typed inputs; its response is checked against the schema)

Migrates a wide report extract with changed dimensions to a new extract with a new data table. The new extract is linked to the source extract and the source extract is paused; its data and data table remain queryable. Every omitted `template_settings` field is pre-filled from the source extract, so only the settings being changed need to be passed. `template_id` and `account` are resolved from the source extract when omitted; a data table title is generated when `data_table_title` is empty.

## Request body

- MigrateWideExtractRequest: Request payload for migrating a wide report extract.
  - `migrated_from_extraction_id` integer, required: ID of the source wide report extract being migrated.
  - `template_id` integer: Template ID. Resolved from the source extract when omitted.
  - `account` integer: Account ID. Resolved from the source extract when omitted.
  - `data_table_title` string: Title of the new data table. Generated automatically when empty.
  - `template_settings` object, required: Template settings for the new extract. May be an empty object — every omitted field is pre-filled from the source extract.
    - `fields` string[]: List of fields including the changed dimensions.
    - `additional_params` object: Additional extraction parameters.
    - `scheduling` Scheduling[]
      - `days` integer: Day offset within the interval, starting from 0. The valid range depends on `interval`: - `hour`, `day` — must be 0 - `week` — 0–6 (day of week) - `month` — 0–30 (day of month)
      - `hours` integer: Hour at which the run will start (0–23)
      - `minutes` integer: Minute of hour at which the run will start (0–59)
      - `interval` 'hour' | 'day' | 'week' | 'month': Frequency at which the run will be performed: - `hour` — every hour - `day` — once per day - `week` — once per week - `month` — once per month
      - `timezone` string: IANA timezone name (e.g. `UTC`, `America/New_York`) the schedule is interpreted in.
      - `recurrence` integer: How often the schedule repeats within the interval. Defaults to 1.
      - `lookback_window` object: Defines the period data will be extracted for. Applies to extract schedules only — ignored for load schedules.
        - `name` 'default' | 'live' | 'max': Lookback window preset: - `default` — past 30 days from the day of extract - `live` — past 1 day from the day of extract - `max` — past 60 days from the day of extract
    - `sync_historical_data` string, nullable: Start date for historical data backfill (date in ISO format like "2025-01-01").
    - `dynamic_fields` string[]: List of dynamic fields.
    - `hashed_fields` string[], nullable: List of hashed fields.
    - `custom_filters` object, nullable: Custom filters to apply. Null if no filters.

## Response `200`

The newly created extract detail

- Extract: Extract object
  - `id` integer: Extract ID
  - `title` string: Extract title
  - `connection_id` integer: Connection ID
  - `account_id` integer: Account ID
  - `account_name` string: Account name
  - `account_entity_id` integer: Internal Improvado account entity ID.
  - `account_embedded_id` integer, nullable: Embedded account ID. Null if the account is not linked to an embedded account.
  - `template` object
    - `id` integer: Extract Template ID
    - `title` string: Extract Template title
    - `datasource_name` string: Data source name
    - `data_class` string: Data class
    - `is_wide_template` boolean: Whether the template is a wide report template
  - `data_table` object
    - `id` integer: Data Table ID
    - `name` string: Data Table name
    - `title` string: Data Table title
  - `fields` Field[]
    - `title` string: Field title
    - `name` string: Field name
    - `user_kind` string: Field kind
    - `user_type` string: Field type
    - `selected` boolean: Is the field selected
    - `can_edit` boolean: Can the field be edited
    - `sql_name` string: Sql Name of a Field
    - `format` 'string' | 'float' | 'integer' | 'iso_8601_date' | 'currency' | 'percent' | 'duration' | 'url' | 'image_url': Hint on how the value is meant to be rendered — not a storage contract. Metrics fall back to `float` whenever a data source does not declare a format explicitly, so `float` does not imply the value is fractional, and no decimal precision is guaranteed: values are passed through exactly as the data source returns them, without rounding. New formats may be added over time, so treat an unrecognised value as an unformatted string rather than failing.
    - `is_dynamic` boolean: Is the field dynamic
  - `custom_fields` object[]: Discovered dynamic-field objects, including their name and is_selected state. This response representation is distinct from the list of names accepted in updates.
    - `name` string
    - `title` string
    - `sql_name` string
    - `kind` string
    - `is_selected` boolean
  - `created_at` string: Extract creation date
  - `last_sync` string: Last sync date
  - `status` string: Extract status
  - `error_text` string: Error text
  - `schedules_limit` integer: Schedules limit
  - `scheduling` Scheduling[]
    - `days` integer: Day offset within the interval, starting from 0. The valid range depends on `interval`: - `hour`, `day` — must be 0 - `week` — 0–6 (day of week) - `month` — 0–30 (day of month)
    - `hours` integer: Hour at which the run will start (0–23)
    - `minutes` integer: Minute of hour at which the run will start (0–59)
    - `interval` 'hour' | 'day' | 'week' | 'month': Frequency at which the run will be performed: - `hour` — every hour - `day` — once per day - `week` — once per week - `month` — once per month
    - `timezone` string: IANA timezone name (e.g. `UTC`, `America/New_York`) the schedule is interpreted in.
    - `recurrence` integer: How often the schedule repeats within the interval. Defaults to 1.
    - `lookback_window` object: Defines the period data will be extracted for. Applies to extract schedules only — ignored for load schedules.
      - `name` 'default' | 'live' | 'max': Lookback window preset: - `default` — past 30 days from the day of extract - `live` — past 1 day from the day of extract - `max` — past 60 days from the day of extract
  - `additional_params` AdditionalParams[]
    - `type` string: Additional Params type
    - `name` string: Additional Params name
    - `required` boolean: Is the Additional Params required
    - `title` string: Additional Params title
    - `description` string: Additional Params description
    - `params` object: Additional Params params
    - `initial_value` string: Additional Params initial value
  - `sync_historical_data` string, nullable: Start date for historical data backfill (ISO date format, e.g. "2025-02-25"). Null if not set.

## Other responses

- `400`: Bad Request - Invalid request parameters, the source extract is not a wide report or dimensions were not changed.
- `401`: Forbidden
- `404`: Not Found

---

[API](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3.md) - [All operations](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/llms.txt) - [OpenAPI document](https://skmtc.dev/improvado/apis/improvado-embedded-api-v3/revisions/a881099bd6c4?raw)
