POST
/
v2
/
servers
/
{instance_id}
/
restart
Restart or Update a Game Server
curl --request POST \
  --url https://api.computeflow.cloud/v2/servers/{instance_id}/restart \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "startup_args": "<string>",
  "version_tag": "<string>",
  "version": 123,
  "ttl": 43230,
  "auto_restart": true,
  "custom_data": {}
}'
{
  "instance_id": "<string>",
  "name": "<string>",
  "network_ports": [
    {
      "name": "<string>",
      "internal_port": 123,
      "external_port": 123,
      "protocol": "udp",
      "host": "<string>",
      "tls_enabled": false
    }
  ],
  "status": "launching",
  "startup_args": "<string>",
  "service_type": "match_based",
  "compute_size": "",
  "region": "",
  "version_tag": "",
  "version": 123,
  "started_at": "2023-11-07T05:31:56Z",
  "stopped_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "auto_restart": true,
  "custom_data": {},
  "ttl": 123,
  "is_pool_server": false,
  "pool_claimed_at": "2023-11-07T05:31:56Z"
}

Headers

api-key
string
required

PlayFlow API Key

Path Parameters

instance_id
string
required

Unique identifier (UUID) of the server instance to restart.

Examples:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

Body

application/json

Optional update configuration. If not provided, performs simple restart. Request schema for restarting/updating a server. All fields are optional.

name
string | null

New name for the server (rarely used)

startup_args
string | null

New startup arguments. If not provided, keeps existing.

version_tag
string | null

New build to use. If not provided, keeps current build.

version
integer | null

Specific version of the new build. Only used if version_tag is provided.

ttl
integer | null

New TTL in seconds (60-86400)

Required range: 60 <= x <= 86400
auto_restart
boolean | null

Update auto-restart setting

custom_data
object | null

New custom data (replaces existing)

Response

Successful Response

name
string
required
instance_id
string
network_ports
PortMapping · object[]
status
enum<string>
Available options:
launching,
running,
stopped
startup_args
string | null
default:""
service_type
enum<string>
Available options:
match_based,
persistent_world
compute_size
string
default:""
region
string
default:""
version_tag
string
default:""
version
integer | null
started_at
string<date-time> | null
stopped_at
string<date-time> | null
updated_at
string<date-time> | null

Last time the server was restarted/updated. Used for TTL calculation after restarts.

auto_restart
boolean | null
default:false

If True, the server will automatically restart on failure and is treated as persistent.

custom_data
object | null
ttl
integer | null
is_pool_server
boolean
default:false

If True, this is a pre-warmed pool server

pool_claimed_at
string<date-time> | null

Timestamp when claimed from pool (for billing split)