Skip to content

Move a server to another Node

POST
/servers/{serverId}/migrate
curl --request POST \
--url https://example.com/api/v1/servers/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/migrate \
--header 'Content-Type: application/json' \
--cookie __Host-shardkeep_session=<__Host-shardkeep_session> \
--data '{ "nodeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'

Needs servers.update and global nodes.read; audited. The server goes into MIGRATING: it stops, its data moves to the Node (relayed by the Controller) and it starts there if it should run. Its game port stays the same when it is free there. A failure moves it back to its old Node.

serverId
required
string format: uuid
Media typeapplication/json
object
nodeId
required
string format: uuid
Examplegenerated
{
"nodeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

The migration, under way.

Media typeapplication/json
object
id
required
string format: uuid
kind
required
string
Allowed values: RESTORE RESTORE_AS_NEW MIGRATE CLONE
serverId
required
string format: uuid
backupId
string format: uuid
sourceServerId
string format: uuid
fromNodeId
string format: uuid
toNodeId
string format: uuid
state
required
string
Allowed values: RUNNING SUCCEEDED FAILED
error
string
createdAt
required
string format: date-time
Example
{
"kind": "RESTORE",
"state": "RUNNING"
}

The request is invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Not signed in, or the credentials are invalid.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Signed in, but not allowed.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Not found, or not visible to you.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}

Clashes with existing data or state.

Media typeapplication/problem+json

An RFC 9457 problem with a machine-readable code.

object
type
required
string
title
required
string
status
required
integer
detail
string
code
required

Stable machine-readable error code.

string
Example
{
"type": "about:blank",
"title": "Conflict",
"status": 409,
"code": "conflict"
}