# List migrations

Launch stage: Beta

`GET /api/2.0/postgres/migrations`

Lists migrations in the workspace.

API scopes: postgres

## Query parameters

- `page_size` (int32, optional)
  The maximum number of migrations to return. The server default is 100; values above 1000 are
   capped to 1000.
- `page_token` (string, optional)
  A page token from a previous call.
- `show_deleted` (boolean, optional)
  Whether to include soft-deleted migrations in the response. Hard-deleted and already-purged
   migrations are never returned.

## Returns

Returns a list of Migration objects.

## Response

```json
{
  "migrations": [
    {
      "name": "string",
      "source_connection": "string",
      "database_mappings": [
        {}
      ],
      "target_branch": "string",
      "state": "MIGRATION_STATE_DRAFT",
      "create_time": "string",
      "update_time": "string",
      "delete_time": "string",
      "purge_time": "string",
      "error": {},
      "migration_type": "MIGRATION_TYPE_ONE_TIME_COPY"
    }
  ],
  "next_page_token": "string"
}
```

