> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a Migration



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/storage-data.yml get /storage/migrations/{id}
openapi: 3.1.0
info:
  title: Telnyx Storage & Data API
  version: 2.0.0
  description: API for Storage & Data.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /storage/migrations/{id}:
    get:
      tags:
        - Data Migration
      summary: Get a Migration
      operationId: GetMigration
      parameters:
        - name: id
          in: path
          description: Unique identifier for the data migration.
          required: true
          example: ''
          schema:
            type: string
      responses:
        '200':
          description: Create Migration Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/MigrationParams'
          headers: {}
        '401':
          description: Unauthorized
        '404':
          description: Migration not found
        '422':
          description: Unprocessable Entity
      deprecated: false
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Telnyx from 'telnyx';

            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });

            const migration = await client.storage.migrations.retrieve('');

            console.log(migration.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            migration = client.storage.migrations.retrieve(
                "",
            )
            print(migration.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tmigration, err := client.Storage.Migrations.Get(context.TODO(), \"\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", migration.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.storage.migrations.MigrationRetrieveParams;

            import
            com.telnyx.sdk.models.storage.migrations.MigrationRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    MigrationRetrieveResponse migration = client.storage().migrations().retrieve("");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            migration = telnyx.storage.migrations.retrieve("")

            puts(migration)
        - lang: CLI
          source: |-
            telnyx storage:migrations retrieve \
              --api-key 'My API Key' \
              --id ''
components:
  schemas:
    MigrationParams:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the data migration.
          readOnly: true
        source_id:
          type: string
          description: ID of the Migration Source from which to migrate data.
        target_bucket_name:
          type: string
          description: >-
            Bucket name to migrate the data into. Will default to the same name
            as the `source_bucket_name`.
        target_region:
          type: string
          description: Telnyx Cloud Storage region to migrate the data to.
        refresh:
          type: boolean
          description: >-
            If true, will continue to poll the source bucket to ensure new data
            is continually migrated over.
        last_copy:
          type: string
          format: date-time
          description: Time when data migration was last copied from the source.
          readOnly: true
          example: '2020-01-01T00:00:00Z'
        status:
          type: string
          enum:
            - pending
            - checking
            - migrating
            - complete
            - error
            - stopped
          readOnly: true
          description: Status of the migration.
        bytes_to_migrate:
          type: integer
          readOnly: true
          description: Total amount of data found in source bucket to migrate.
        bytes_migrated:
          type: integer
          readOnly: true
          description: Total amount of data that has been succesfully migrated.
        speed:
          type: integer
          readOnly: true
          description: Current speed of the migration.
        eta:
          type: string
          format: date-time
          readOnly: true
          description: Estimated time the migration will complete.
          example: '2020-01-01T00:00:00Z'
        created_at:
          type: string
          format: date-time
          description: Time when data migration was created
          readOnly: true
          example: '2020-01-01T00:00:00Z'
      required:
        - source_id
        - target_bucket_name
        - target_region
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````