Restart a server
curl --request POST \
--url https://api.computeflow.cloud/api/v3/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": {},
"match_id": "<string>",
"environment_variables": {},
"port_configs": [
{
"name": "<string>",
"internal_port": 32768,
"tls_enabled": false
}
]
}
'import requests
url = "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart"
payload = {
"name": "<string>",
"startup_args": "<string>",
"version_tag": "<string>",
"version": 123,
"ttl": 43230,
"auto_restart": True,
"custom_data": {},
"match_id": "<string>",
"environment_variables": {},
"port_configs": [
{
"name": "<string>",
"internal_port": 32768,
"tls_enabled": False
}
]
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startup_args: '<string>',
version_tag: '<string>',
version: 123,
ttl: 43230,
auto_restart: true,
custom_data: {},
match_id: '<string>',
environment_variables: {},
port_configs: [{name: '<string>', internal_port: 32768, tls_enabled: false}]
})
};
fetch('https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'startup_args' => '<string>',
'version_tag' => '<string>',
'version' => 123,
'ttl' => 43230,
'auto_restart' => true,
'custom_data' => [
],
'match_id' => '<string>',
'environment_variables' => [
],
'port_configs' => [
[
'name' => '<string>',
'internal_port' => 32768,
'tls_enabled' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"instance_id": "<string>",
"name": "<string>",
"status": "launching",
"network_ports": [
{
"name": "<string>",
"internal_port": 123,
"external_port": 123,
"protocol": "udp",
"host": "<string>",
"tls_enabled": true
}
],
"startup_args": "<string>",
"service_type": "match_based",
"compute_size": "<string>",
"region": "<string>",
"version_tag": "<string>",
"version": 123,
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z",
"auto_restart": true,
"custom_data": {},
"ttl": 123,
"is_pool_server": true,
"pool_claimed_at": "2023-11-07T05:31:56Z",
"match_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}Servers
Restart a server
Restarts a server with a fresh instance. The old machine is replaced and new network ports are allocated. You can optionally change the build version, compute size, TTL, startup args, and other settings during restart.
All fields in the request body are optional — omitted fields keep their current values. The server returns to launching status.
Note: Pool servers cannot be restarted.
POST
/
api
/
v3
/
servers
/
{instance_id}
/
restart
Restart a server
curl --request POST \
--url https://api.computeflow.cloud/api/v3/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": {},
"match_id": "<string>",
"environment_variables": {},
"port_configs": [
{
"name": "<string>",
"internal_port": 32768,
"tls_enabled": false
}
]
}
'import requests
url = "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart"
payload = {
"name": "<string>",
"startup_args": "<string>",
"version_tag": "<string>",
"version": 123,
"ttl": 43230,
"auto_restart": True,
"custom_data": {},
"match_id": "<string>",
"environment_variables": {},
"port_configs": [
{
"name": "<string>",
"internal_port": 32768,
"tls_enabled": False
}
]
}
headers = {
"api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startup_args: '<string>',
version_tag: '<string>',
version: 123,
ttl: 43230,
auto_restart: true,
custom_data: {},
match_id: '<string>',
environment_variables: {},
port_configs: [{name: '<string>', internal_port: 32768, tls_enabled: false}]
})
};
fetch('https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'startup_args' => '<string>',
'version_tag' => '<string>',
'version' => 123,
'ttl' => 43230,
'auto_restart' => true,
'custom_data' => [
],
'match_id' => '<string>',
'environment_variables' => [
],
'port_configs' => [
[
'name' => '<string>',
'internal_port' => 32768,
'tls_enabled' => false
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart")
.header("api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/servers/{instance_id}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"startup_args\": \"<string>\",\n \"version_tag\": \"<string>\",\n \"version\": 123,\n \"ttl\": 43230,\n \"auto_restart\": true,\n \"custom_data\": {},\n \"match_id\": \"<string>\",\n \"environment_variables\": {},\n \"port_configs\": [\n {\n \"name\": \"<string>\",\n \"internal_port\": 32768,\n \"tls_enabled\": false\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"instance_id": "<string>",
"name": "<string>",
"status": "launching",
"network_ports": [
{
"name": "<string>",
"internal_port": 123,
"external_port": 123,
"protocol": "udp",
"host": "<string>",
"tls_enabled": true
}
],
"startup_args": "<string>",
"service_type": "match_based",
"compute_size": "<string>",
"region": "<string>",
"version_tag": "<string>",
"version": 123,
"started_at": "2023-11-07T05:31:56Z",
"stopped_at": "2023-11-07T05:31:56Z",
"auto_restart": true,
"custom_data": {},
"ttl": 123,
"is_pool_server": true,
"pool_claimed_at": "2023-11-07T05:31:56Z",
"match_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}Body
application/json
Configuration overrides applied during a server restart. All fields are optional — omitted fields keep their current values. The server gets a new machine with the same instance_id.
Response
Server restarting with launching status. New network_ports are allocated.
Complete details of a game server instance, including connection info, status, and configuration.