Migrate An Instance

Migrate an instance from one server to another server in the same cluster.

Requires the containers-instances-migrate permission.

Arguments
  • destination_server_id
    string

    The ID of the server this instance should be migrated to.

  • stateful
    object
    optional

    Additional instance information intended only for stateful instance migrations.

    Show child fields

Returns

Returns a Task Descriptor Object, otherwise returns an Error.

GET /v1/containers/{ID}/instances/{ID}/tasks

Example Request
$ curl https://api.cycle.io/v1/containers/id/instances/id/tasks \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-HUB-ID: HUB_ID"
\
-H 'Content-Type: application/json' \
-d '{"action":"migrate","value":{"destination_server_id":"5d01b9b3db2ab00001508cd8","stateful":{"copy_volumes":true}}}' \
-X POST
Example Response
{
"data": {
"action": "migrate",
"job_id": "5d01b9b3db2ab00001508cd8"
}
}