Skip to main content
PATCH
/
v0
/
servers
Partially update a server
curl --request PATCH \
  --url https://controller.platform.simplecloud.app/v0/servers \
  --header 'Content-Type: application/json' \
  --header 'X-Network-ID: <x-network-id>' \
  --header 'X-Network-Secret: <x-network-secret>' \
  --data '
{
  "max_memory": 2048,
  "max_players": 50,
  "min_memory": 1024,
  "player_count": 10,
  "properties": {},
  "state": "AVAILABLE"
}
'
import requests

url = "https://controller.platform.simplecloud.app/v0/servers"

payload = {
"max_memory": 2048,
"max_players": 50,
"min_memory": 1024,
"player_count": 10,
"properties": {},
"state": "AVAILABLE"
}
headers = {
"X-Network-ID": "<x-network-id>",
"X-Network-Secret": "<x-network-secret>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
'X-Network-ID': '<x-network-id>',
'X-Network-Secret': '<x-network-secret>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
max_memory: 2048,
max_players: 50,
min_memory: 1024,
player_count: 10,
properties: {},
state: 'AVAILABLE'
})
};

fetch('https://controller.platform.simplecloud.app/v0/servers', 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://controller.platform.simplecloud.app/v0/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'max_memory' => 2048,
'max_players' => 50,
'min_memory' => 1024,
'player_count' => 10,
'properties' => [

],
'state' => 'AVAILABLE'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Network-ID: <x-network-id>",
"X-Network-Secret: <x-network-secret>"
],
]);

$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://controller.platform.simplecloud.app/v0/servers"

payload := strings.NewReader("{\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"player_count\": 10,\n \"properties\": {},\n \"state\": \"AVAILABLE\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("X-Network-ID", "<x-network-id>")
req.Header.Add("X-Network-Secret", "<x-network-secret>")
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.patch("https://controller.platform.simplecloud.app/v0/servers")
.header("X-Network-ID", "<x-network-id>")
.header("X-Network-Secret", "<x-network-secret>")
.header("Content-Type", "application/json")
.body("{\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"player_count\": 10,\n \"properties\": {},\n \"state\": \"AVAILABLE\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://controller.platform.simplecloud.app/v0/servers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-Network-ID"] = '<x-network-id>'
request["X-Network-Secret"] = '<x-network-secret>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"player_count\": 10,\n \"properties\": {},\n \"state\": \"AVAILABLE\"\n}"

response = http.request(request)
puts response.read_body
{
  "server": {
    "cpu_usage": 25.5,
    "created_at": "2023-01-01T12:00:00Z",
    "ip": "127.0.0.1",
    "last_activity": "2023-01-01T12:00:00Z",
    "max_memory": 2048,
    "max_players": 20,
    "memory_usage": 512,
    "min_memory": 1024,
    "network_id": "123e4567-e89b-12d3-a456-426614174000",
    "numerical_id": 1,
    "persistent_server": {
      "active": true,
      "created_at": "<string>",
      "id": "<string>",
      "max_memory": 123,
      "max_players": 123,
      "min_memory": 123,
      "name": "<string>",
      "properties": {},
      "serverhost_id": "<string>",
      "source": {
        "blueprint": "123e4567-e89b-12d3-a456-426614174000",
        "image": "ghcr.io/user/custom-image:latest",
        "type": "blueprint"
      },
      "tags": [
        "<string>"
      ],
      "type": "<string>",
      "updated_at": "<string>",
      "workflows": {
        "manual": [
          "<string>"
        ],
        "when": {
          "start": [
            "<string>"
          ],
          "stop": [
            "<string>"
          ]
        }
      }
    },
    "persistent_server_id": "123e4567-e89b-12d3-a456-426614174000",
    "player_count": 5,
    "port": 25565,
    "properties": {},
    "server_group": {
      "created_at": "<string>",
      "deployment_config": {},
      "deployment_strategy": "<string>",
      "id": "<string>",
      "name": "<string>",
      "properties": {},
      "scaling_config": {},
      "source": {
        "blueprint": {
          "configurator": "<string>",
          "created_at": "<string>",
          "id": "<string>",
          "minecraft_version": "<string>",
          "name": "<string>",
          "runtime_config": {},
          "server_software": "<string>",
          "server_url": "<string>",
          "software_version": "<string>",
          "updated_at": "<string>",
          "workflow_steps": [
            "<string>"
          ]
        },
        "image": "<string>",
        "type": "<string>"
      },
      "tags": [
        "<string>"
      ],
      "type": "<string>",
      "updated_at": "<string>",
      "workflows_config": {}
    },
    "server_group_id": "123e4567-e89b-12d3-a456-426614174000",
    "server_id": "123e4567-e89b-12d3-a456-426614174000",
    "serverhost_id": "123e4567-e89b-12d3-a456-426614174000",
    "state": "AVAILABLE",
    "updated_at": "2023-01-01T12:00:00Z"
  }
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Headers

X-Network-ID
string
required

Network ID

X-Network-Secret
string
required

Network Secret

Query Parameters

server_id
string
required

Server ID

Body

application/json

Server fields to update

Request to partially update an existing server

max_memory
integer
Example:

2048

max_players
integer
Example:

50

min_memory
integer
Example:

1024

player_count
integer
Example:

10

properties
object
state
enum<string>
Available options:
QUEUED,
PREPARING,
STARTING,
AVAILABLE,
INGAME,
STOPPING,
CLEANUP,
STOPPED
Example:

"AVAILABLE"

Response

OK

Response for patching a server

server
object

Summary of a server for listing