# Migrate to data tiers routing **POST /_ilm/migrate_to_data_tiers** Switch the indices, ILM policies, and legacy, composable, and component templates from using custom node attributes and attribute-based allocation filters to using data tiers. Optionally, delete one legacy index template. Using node roles enables ILM to automatically move the indices between data tiers. Migrating away from custom node attributes routing can be manually performed. This API provides an automated way of performing three out of the four manual steps listed in the migration guide: 1. Stop setting the custom hot attribute on new indices. 1. Remove custom allocation settings from existing ILM policies. 1. Replace custom allocation settings from existing indices with the corresponding tier preference. ILM must be stopped before performing the migration. Use the stop ILM and get ILM status APIs to wait until the reported operation mode is `STOPPED`. [About migrating index allocation](https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management/migrate-index-allocation-filters-to-node-roles) ## Servers - http://api.example.com: http://api.example.com () ## Authentication methods - Api key auth - Basic auth - Bearer auth ## Parameters ### Query parameters - **dry_run** (boolean) If true, simulates the migration from node attributes based allocation filters to data tiers, but does not perform the migration. This provides a way to retrieve the indices and ILM policies that need to be migrated. - **master_timeout** (string) The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. It can also be set to `-1` to indicate that the request should never timeout. ### Body: application/json (object) - **legacy_template_to_delete** (string) - **node_attribute** (string) ## Responses ### 200 #### Body: application/json (object) - **dry_run** (boolean) - **removed_legacy_template** (string) The name of the legacy index template that was deleted. This information is missing if no legacy index templates were deleted. - **migrated_ilm_policies** (array[string]) The ILM policies that were updated. - **migrated_indices** (string | array[string]) The indices that were migrated to tier preference routing. - **migrated_legacy_templates** (array[string]) The legacy index templates that were updated to not contain custom routing settings for the provided data attribute. - **migrated_composable_templates** (array[string]) The composable index templates that were updated to not contain custom routing settings for the provided data attribute. - **migrated_component_templates** (array[string]) The component templates that were updated to not contain custom routing settings for the provided data attribute. [Powered by Bump.sh](https://bump.sh)