|
| 1 | +--- |
| 2 | +Title: Migrations requests |
| 3 | +alwaysopen: false |
| 4 | +categories: |
| 5 | +- docs |
| 6 | +- operate |
| 7 | +- rs |
| 8 | +description: REST API request to get the migration status of a database in the cluster. |
| 9 | +headerRange: '[1-2]' |
| 10 | +hideListLinks: true |
| 11 | +linkTitle: migrations |
| 12 | +weight: $weight |
| 13 | +--- |
| 14 | + |
| 15 | +| Method | Path | Description | |
| 16 | +|--------|------|-------------| |
| 17 | +| [GET](#get-migrations) | `/v1/migrations/<uid>` | Get database migration status | |
| 18 | + |
| 19 | +## Get migration status {#get-migrations} |
| 20 | + |
| 21 | +```sh |
| 22 | +GET /v1/migrations/<uid> |
| 23 | +``` |
| 24 | + |
| 25 | +Gets the migration status of a database in the cluster. |
| 26 | + |
| 27 | +#### Required permissions |
| 28 | + |
| 29 | +| Permission name | |
| 30 | +|-----------------| |
| 31 | +| [view_bdb_info]({{< relref "/operate/rs/references/rest-api/permissions#view_bdb_info" >}}) | |
| 32 | + |
| 33 | +### Request {#get-request} |
| 34 | + |
| 35 | +#### Example HTTP request |
| 36 | + |
| 37 | +```sh |
| 38 | +GET /v1/migrations/1 |
| 39 | +``` |
| 40 | + |
| 41 | +#### Headers |
| 42 | + |
| 43 | +| Key | Value | Description | |
| 44 | +|-----|-------|-------------| |
| 45 | +| Host | cnm.cluster.fqdn | Domain name | |
| 46 | +| Accept | application/json | Accepted media type | |
| 47 | + |
| 48 | +#### URL parameters |
| 49 | + |
| 50 | +| Field | Type | Description | |
| 51 | +|-------|------|-------------| |
| 52 | +| uid | integer | The database's unique ID | |
| 53 | + |
| 54 | +### Response {#get-response} |
| 55 | + |
| 56 | +Returns a JSON array with all data required by the Azure migration orchestrator. |
| 57 | + |
| 58 | +#### Example response body |
| 59 | + |
| 60 | +```json |
| 61 | +"migration": { |
| 62 | + "status": "foo", |
| 63 | + "lag": 123, |
| 64 | + "run_id": "5", |
| 65 | + "flush_counter": 2, |
| 66 | + "source_shards": [{"replication_id": "1", "replication_offset": 2}] |
| 67 | +} |
| 68 | +``` |
| 69 | + |
| 70 | +#### Status codes {#get-status-codes} |
| 71 | + |
| 72 | +| Code | Description | |
| 73 | +|------|-------------| |
| 74 | +| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error | |
| 75 | +| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | Database does not exist | |
0 commit comments