Migrations - List By Target Server
Lists all migrations of a target flexible server.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations?api-version=2025-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/migrations?api-version=2025-08-01&migrationListFilter={migrationListFilter}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
server
|
path | True |
string minLength: 3maxLength: 63 pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)* |
The name of the server. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
migration
|
query |
Migration list filter. Indicates if the request should retrieve only active migrations or all migrations. Defaults to Active. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK. |
|
| Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Microsoft Entra OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
List all migrations of a target flexible server.
Sample request
GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver/migrations?api-version=2025-08-01&migrationListFilter=All
Sample response
{
"value": [
{
"properties": {
"migrationId": "d3ceacbb-a5fd-43dc-a9db-6022b5154856",
"currentStatus": {
"state": "InProgress",
"error": "",
"currentSubStateDetails": {
"currentSubState": "PerformingPreRequisiteSteps"
}
},
"sourceDbServerMetadata": {
"location": "eastus",
"version": "10",
"storageMb": 1024,
"sku": {
"name": "B_Gen5_2",
"tier": "Basic"
}
},
"targetDbServerMetadata": {
"location": "eastus",
"version": "17",
"storageMb": 2048,
"sku": {
"tier": "GeneralPurpose",
"name": "Standard_D4ds_v5"
}
},
"sourceDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/servers/examplesource",
"targetDbServerResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget",
"dbsToMigrate": [
"exampledatabase1",
"exampledatabase2",
"exampledatabase3",
"exampledatabase4"
],
"setupLogicalReplicationOnSourceDbIfNeeded": "False",
"overwriteDbsInTarget": "False",
"migrationWindowStartTimeInUtc": "2025-06-01T20:30:22.123456Z",
"startDataMigration": "False",
"triggerCutover": "False",
"migrateRoles": "False"
},
"location": "eastus",
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBForPostgreSql/flexibleServers/exampletarget/migrations/examplemigration",
"name": "examplemigration",
"type": "Microsoft.DBForPostgreSql/flexibleServers/migrations"
}
]
}
Definitions
| Name | Description |
|---|---|
|
Admin |
Credentials of administrator users for source and target servers. |
| Cancel |
Indicates if cancel must be triggered for the entire migration. |
|
created |
The type of identity that created the resource. |
|
Database |
Migration state of a database. |
|
Db |
Validation status summary for a database. |
|
Db |
Database server metadata. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Logical |
Indicates whether to setup logical replication on source server, if needed. |
|
Migrate |
Indicates if roles and permissions must be migrated. |
| Migration |
Properties of a migration. |
|
Migration |
Migration state of a database. |
|
Migration |
List of migrations. |
|
Migration |
Migration list filter. Indicates if the request should retrieve only active migrations or all migrations. Defaults to Active. |
|
Migration |
Mode used to perform the migration: Online or Offline. |
|
Migration |
Supported option for a migration |
|
Migration |
Migration secret parameters. |
|
Migration |
State of migration. |
|
Migration |
State of migration. |
|
Migration |
Substate of migration. |
|
Migration |
Details of migration substate. |
|
Overwrite |
Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. |
|
Server |
Compute information of a server. |
|
Sku |
This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. |
|
Source |
Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL |
|
Ssl |
SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. |
|
Start |
Indicates if data migration must start right away. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Trigger |
Indicates if cutover must be triggered for the entire migration. |
|
Validation |
Details for the validation for migration. |
|
Validation |
Validation message object. |
|
Validation |
Validation status for migration. |
|
Validation |
Validation summary object. |
AdminCredentials
Credentials of administrator users for source and target servers.
| Name | Type | Description |
|---|---|---|
| sourceServerPassword |
string |
Password for the user of the source server. |
| targetServerPassword |
string |
Password for the user of the target server. |
Cancel
Indicates if cancel must be triggered for the entire migration.
| Value | Description |
|---|---|
| True |
Cancel must be triggered for the entire migration. |
| False |
Cancel must not be triggered for the entire migration. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DatabaseMigrationState
Migration state of a database.
| Name | Type | Description |
|---|---|---|
| appliedChanges |
integer (int32) |
Change Data Capture applied changes counter. |
| cdcDeleteCounter |
integer (int32) |
Change Data Capture delete counter. |
| cdcInsertCounter |
integer (int32) |
Change Data Capture insert counter. |
| cdcUpdateCounter |
integer (int32) |
Change Data Capture update counter. |
| databaseName |
string |
Name of database. |
| endedOn |
string (date-time) |
End time of a migration state. |
| fullLoadCompletedTables |
integer (int32) |
Number of tables loaded during the migration of a database. |
| fullLoadErroredTables |
integer (int32) |
Number of tables encountering errors during the migration of a database. |
| fullLoadLoadingTables |
integer (int32) |
Number of tables loading during the migration of a database. |
| fullLoadQueuedTables |
integer (int32) |
Number of tables queued for the migration of a database. |
| incomingChanges |
integer (int32) |
Change Data Capture incoming changes counter. |
| latency |
integer (int32) |
Lag in seconds between source and target during online phase. |
| message |
string |
Error message, if any, for the migration state. |
| migrationOperation |
string |
Migration operation of a database. |
| migrationState |
Migration state of a database. |
|
| startedOn |
string (date-time) |
Start time of a migration state. |
DbLevelValidationStatus
Validation status summary for a database.
| Name | Type | Description |
|---|---|---|
| databaseName |
string |
Name of database. |
| endedOn |
string (date-time) |
End time of a database level validation. |
| startedOn |
string (date-time) |
Start time of a database level validation. |
| summary |
Summary of database level validations. |
DbServerMetadata
Database server metadata.
| Name | Type | Description |
|---|---|---|
| location |
string |
Location of database server. |
| sku |
Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server. |
|
| storageMb |
integer (int32) |
Storage size (in MB) for database server. |
| version |
string |
Major version of PostgreSQL database engine. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
LogicalReplicationOnSourceServer
Indicates whether to setup logical replication on source server, if needed.
| Value | Description |
|---|---|
| True |
Logical replication will be set up on the source server. |
| False |
Logical replication will not be set up on the source server. |
MigrateRolesAndPermissions
Indicates if roles and permissions must be migrated.
| Value | Description |
|---|---|
| True |
Roles and permissions will be migrated. |
| False |
Roles and permissions will not be migrated. |
Migration
Properties of a migration.
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties.cancel |
Indicates if cancel must be triggered for the entire migration. |
|
| properties.currentStatus |
Current status of a migration. |
|
| properties.dbsToCancelMigrationOn |
string[] |
When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. |
| properties.dbsToMigrate |
string[] |
Names of databases to migrate. |
| properties.dbsToTriggerCutoverOn |
string[] |
When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array. |
| properties.migrateRoles |
Indicates if roles and permissions must be migrated. |
|
| properties.migrationId |
string |
Identifier of a migration. |
| properties.migrationInstanceResourceId |
string (arm-id) |
Identifier of the private endpoint migration instance. |
| properties.migrationMode |
Mode used to perform the migration: Online or Offline. |
|
| properties.migrationOption |
Supported option for a migration. |
|
| properties.migrationWindowEndTimeInUtc |
string (date-time) |
End time (UTC) for migration window. |
| properties.migrationWindowStartTimeInUtc |
string (date-time) |
Start time (UTC) for migration window. |
| properties.overwriteDbsInTarget |
Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation. |
|
| properties.secretParameters |
Migration secret parameters. |
|
| properties.setupLogicalReplicationOnSourceDbIfNeeded |
Indicates whether to setup logical replication on source server, if needed. |
|
| properties.sourceDbServerFullyQualifiedDomainName |
string |
Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server. |
| properties.sourceDbServerMetadata |
Metadata of source database server. |
|
| properties.sourceDbServerResourceId |
string |
Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username. |
| properties.sourceType |
Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL |
|
| properties.sslMode |
SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'. |
|
| properties.startDataMigration |
Indicates if data migration must start right away. |
|
| properties.targetDbServerFullyQualifiedDomainName |
string |
Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server. |
| properties.targetDbServerMetadata |
Metadata of target database server. |
|
| properties.targetDbServerResourceId |
string |
Identifier of the target database server resource. |
| properties.triggerCutover |
Indicates if cutover must be triggered for the entire migration. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
MigrationDatabaseState
Migration state of a database.
| Value | Description |
|---|---|
| InProgress |
Migration is in progress for the database. |
| WaitingForCutoverTrigger |
Migration is waiting for cutover trigger for the database. |
| Failed |
Migration has failed for the database. |
| Canceled |
Migration has been canceled for the database. |
| Succeeded |
Migration has succeeded for the database. |
| Canceling |
Migration is canceling for the database. |
MigrationList
List of migrations.
| Name | Type | Description |
|---|---|---|
| nextLink |
string (uri) |
Link used to get the next page of results. |
| value |
List of migrations. |
MigrationListFilter
Migration list filter. Indicates if the request should retrieve only active migrations or all migrations. Defaults to Active.
| Value | Description |
|---|---|
| Active |
Only active (in-progress) migrations. |
| All |
All migrations. |
MigrationMode
Mode used to perform the migration: Online or Offline.
| Value | Description |
|---|---|
| Offline |
Offline migration mode. |
| Online |
Online migration mode. |
MigrationOption
Supported option for a migration
| Value | Description |
|---|---|
| Validate |
Validate the migration without performing it. |
| Migrate |
Perform the migration. |
| ValidateAndMigrate |
Validate and perform the migration. |
MigrationSecretParameters
Migration secret parameters.
| Name | Type | Description |
|---|---|---|
| adminCredentials |
Credentials of administrator users for source and target servers. |
|
| sourceServerUsername |
string |
Gets or sets the name of the user for the source server. This user doesn't need to be an administrator. |
| targetServerUsername |
string |
Gets or sets the name of the user for the target server. This user doesn't need to be an administrator. |
MigrationState
State of migration.
| Value | Description |
|---|---|
| InProgress |
Migration is in progress. |
| WaitingForUserAction |
Migration is waiting for user action. |
| Canceled |
Migration has been canceled. |
| Failed |
Migration has failed. |
| Succeeded |
Migration has succeeded. |
| ValidationFailed |
Validation for migration has failed. |
| CleaningUp |
Migration is cleaning up resources. |
MigrationStatus
State of migration.
| Name | Type | Description |
|---|---|---|
| currentSubStateDetails |
Current migration sub state details. |
|
| error |
string |
Error message, if any, for the migration state. |
| state |
State of migration. |
MigrationSubstate
Substate of migration.
| Value | Description |
|---|---|
| PerformingPreRequisiteSteps |
Performing pre-requisite steps for migration. |
| WaitingForLogicalReplicationSetupRequestOnSourceDB |
Waiting for logical replication setup request on source database. |
| WaitingForDBsToMigrateSpecification |
Waiting for databases to migrate specification. |
| WaitingForTargetDBOverwriteConfirmation |
Waiting for target database overwrite confirmation. |
| WaitingForDataMigrationScheduling |
Waiting for data migration scheduling. |
| WaitingForDataMigrationWindow |
Waiting for data migration window. |
| MigratingData |
Migrating data. |
| WaitingForCutoverTrigger |
Waiting for cutover trigger. |
| CompletingMigration |
Completing migration. |
| Completed |
Migration completed. |
| CancelingRequestedDBMigrations |
Canceling requested database migrations. |
| ValidationInProgress |
Validation in progress. |
MigrationSubstateDetails
Details of migration substate.
| Name | Type | Description |
|---|---|---|
| currentSubState |
Substate of migration. |
|
| dbDetails |
<string,
Database |
|
| validationDetails |
Details for the validation for migration. |
OverwriteDatabasesOnTargetServer
Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation.
| Value | Description |
|---|---|
| True |
Databases on the target server can be overwritten when already present. |
| False |
Databases on the target server cannot be overwritten when already present. |
ServerSku
Compute information of a server.
| Name | Type | Description |
|---|---|---|
| name |
string |
Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server. |
| tier |
Tier of the compute assigned to a server. |
SkuTier
This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.
| Value | Description |
|---|---|
| Free | |
| Basic | |
| Standard | |
| Premium |
SourceType
Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL
| Value | Description |
|---|---|
| OnPremises |
On-premises PostgreSQL server. |
| AWS |
Amazon Web Services PostgreSQL server. |
| GCP |
Google Cloud Platform PostgreSQL server. |
| AzureVM |
Azure Virtual Machine PostgreSQL server. |
| PostgreSQLSingleServer |
Azure Database for PostgreSQL single server. |
| AWS_RDS |
Amazon RDS for PostgreSQL. |
| AWS_AURORA |
Amazon Aurora for PostgreSQL. |
| AWS_EC2 |
Amazon EC2 for PostgreSQL. |
| GCP_CloudSQL |
Google Cloud SQL for PostgreSQL. |
| GCP_AlloyDB |
Google Cloud AlloyDB for PostgreSQL. |
| GCP_Compute |
Google Compute Engine for PostgreSQL. |
| EDB |
EnterpriseDB PostgreSQL server. |
| EDB_Oracle_Server |
EnterpriseDB Oracle Server. |
| EDB_PostgreSQL |
EnterpriseDB PostgreSQL server. |
| PostgreSQLFlexibleServer |
Azure Database for PostgreSQL flexible server. |
| PostgreSQLCosmosDB |
.NET Cosmos DB for PostgreSQL |
| Huawei_RDS |
Huawei RDS for PostgreSQL |
| Huawei_Compute |
Huawei Compute for PostgreSQL |
| Heroku_PostgreSQL |
Heroku PostgreSQL |
| Crunchy_PostgreSQL |
Crunchy PostgreSQL |
| ApsaraDB_RDS |
ApsaraDB RDS for PostgreSQL |
| Digital_Ocean_Droplets |
Digital Ocean Droplets for PostgreSQL |
| Digital_Ocean_PostgreSQL |
Digital Ocean PostgreSQL |
| Supabase_PostgreSQL |
Supabase PostgreSQL |
SslMode
SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.
| Value | Description |
|---|---|
| Prefer |
Prefer SSL connection. If the server does not support SSL, the connection will be established without SSL. |
| Require |
Require SSL connection. If the server does not support SSL, the connection will fail. |
| VerifyCA |
Require SSL connection and verify the server certificate against the CA certificate. |
| VerifyFull |
Require SSL connection, verify the server certificate against the CA certificate, and verify that the server hostname matches the certificate. |
StartDataMigration
Indicates if data migration must start right away.
| Value | Description |
|---|---|
| True |
Data migration must start right away. |
| False |
Data migration must not start right away. |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
TriggerCutover
Indicates if cutover must be triggered for the entire migration.
| Value | Description |
|---|---|
| True |
Cutover must be triggered for the entire migration. |
| False |
Cutover must not be triggered for the entire migration. |
ValidationDetails
Details for the validation for migration.
| Name | Type | Description |
|---|---|---|
| dbLevelValidationDetails |
Details of server level validations. |
|
| serverLevelValidationDetails |
Details of server level validations. |
|
| status |
Validation status for migration. |
|
| validationEndTimeInUtc |
string (date-time) |
End time (UTC) for validation. |
| validationStartTimeInUtc |
string (date-time) |
Start time (UTC) for validation. |
ValidationMessage
Validation message object.
| Name | Type | Description |
|---|---|---|
| message |
string |
Validation message string. |
| state |
Severity of validation message. |
ValidationState
Validation status for migration.
| Value | Description |
|---|---|
| Failed |
Validation has failed. |
| Succeeded |
Validation has succeeded. |
| Warning |
Validation has succeeded with warnings. |
ValidationSummaryItem
Validation summary object.
| Name | Type | Description |
|---|---|---|
| messages |
Validation messages. |
|
| state |
Validation status for migration. |
|
| type |
string |
Validation type. |