# Get a migration

Launch stage: Beta

`GET /api/2.0/postgres/{name=migrations/*}`

Gets a migration.

API scopes: postgres

## Path parameters

- `name` (string, required)
  Required. The migration resource name, in the format `migrations/{migration}`.

## Returns

Returns the Migration object.

## Response

```json
{
  "name": "string",
  "source_connection": "string",
  "database_mappings": [
    {
      "source_database": "string",
      "target_database": "string",
      "effective_target_database": "string"
    }
  ],
  "target_branch": "string",
  "state": "MIGRATION_STATE_DRAFT",
  "create_time": "string",
  "update_time": "string",
  "delete_time": "string",
  "purge_time": "string",
  "error": {
    "code": "string",
    "message": "string"
  },
  "migration_type": "MIGRATION_TYPE_ONE_TIME_COPY"
}
```

