---
title: "Migrate a Date dataset to the custom date dimension"
method: POST
path: "/gdc/md/{project_id}/datedimension/upgrade"
tags: ["date-dimension"]
---

# Migrate a Date dataset to the custom date dimension

`POST /gdc/md/{project_id}/datedimension/upgrade`

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/md/{project_id}/datedimension/upgrade`
- Auth: none declared

Migrate the Date datasets in your project from the `urn:gooddata:date` and `urn:custom:date` date dimension to the `urn:custom_v2:date` date dimension.
For more information about the date dimensions, see [Custom Calendars - Self Service](https://help.gooddata.com/display/doc/Custom+Calendars+-+Self+Service).

You can migrate all datasets in the project at once or only a specific dataset.

**NOTE:** When migrating the datasets, do not perform other tasks (especially data loading) at the same time because it may cause data inconsistency.

## Path parameters

- `project_id` string, required

## Request body

- Upgrade
  - `upgrade` object, required
    - `dateDatasets` union, required
      - DateDatasetsAll
        - `upgrade` 'all', required
      - DateDatasetsExact
        - `upgrade` 'exact', required
        - `datasets` Identifier[]

## Response `200`

The datasets have not been migrated. Possible reasons:

* The datasets are not set to the `urn:gooddata:date` and `urn:custom:date` date dimension and cannot be migrated.

* The datasets are already set to the `urn:custom_v2:date` date dimension.

- WTaskStatus
  - `wTaskStatus` object, required
    - `poll` string: where to poll for next status (uri to self)
    - `status` 'OK' | 'CANCELED' | 'ERROR' | 'RUNNING', required
    - `messages` ErrorStructure[]
      - `error` object
        - `errorClass` string
        - `trace` string
        - `message` string
        - `component` string
        - `errorId` string
        - `errorCode` string
        - `parameters` string[]
    - `links` object
      - `poll` string, uri, required: dtto - for backward compatibility

## Other responses

- `201`: Click the returned URL to poll for the results of the migration.

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
