Skip to main content
POST
/
v0
/
server-groups
Create a new server group
curl --request POST \
  --url https://controller.platform.simplecloud.app/v0/server-groups \
  --header 'Content-Type: application/json' \
  --header 'X-Network-ID: <x-network-id>' \
  --header 'X-Network-Secret: <x-network-secret>' \
  --data '
{
  "active": true,
  "deployment": {
    "hosts": [
      {
        "name": "main-host-1",
        "priority": 1
      }
    ],
    "strategy": "whitelist"
  },
  "max_memory": 2048,
  "max_players": 50,
  "min_memory": 1024,
  "name": "lobby",
  "plugin_collection_ids": [
    "<string>"
  ],
  "plugins": [
    {
      "plugin_id": "<string>",
      "plugin_name": "<string>",
      "required": true,
      "source_type": "<string>",
      "source_value": "<string>",
      "version": "<string>"
    }
  ],
  "priority": 10,
  "properties": {},
  "scaling": {
    "available_slots": 10,
    "max_servers": 3,
    "min_servers": 0,
    "player_threshold": 0.8,
    "scale_down": {
      "idle_time": "3m",
      "ignore_players": true
    },
    "scaling_mode": "SERVERS"
  },
  "source": {
    "blueprint": "123e4567-e89b-12d3-a456-426614174000",
    "image": "ghcr.io/user/custom-image:latest",
    "type": "blueprint"
  },
  "tags": [
    "<string>"
  ],
  "type": "SERVER",
  "workflows": {
    "manual": [
      "<string>"
    ],
    "when": {
      "start": [
        "<string>"
      ],
      "stop": [
        "<string>"
      ]
    }
  }
}
'
import requests

url = "https://controller.platform.simplecloud.app/v0/server-groups"

payload = {
"active": True,
"deployment": {
"hosts": [
{
"name": "main-host-1",
"priority": 1
}
],
"strategy": "whitelist"
},
"max_memory": 2048,
"max_players": 50,
"min_memory": 1024,
"name": "lobby",
"plugin_collection_ids": ["<string>"],
"plugins": [
{
"plugin_id": "<string>",
"plugin_name": "<string>",
"required": True,
"source_type": "<string>",
"source_value": "<string>",
"version": "<string>"
}
],
"priority": 10,
"properties": {},
"scaling": {
"available_slots": 10,
"max_servers": 3,
"min_servers": 0,
"player_threshold": 0.8,
"scale_down": {
"idle_time": "3m",
"ignore_players": True
},
"scaling_mode": "SERVERS"
},
"source": {
"blueprint": "123e4567-e89b-12d3-a456-426614174000",
"image": "ghcr.io/user/custom-image:latest",
"type": "blueprint"
},
"tags": ["<string>"],
"type": "SERVER",
"workflows": {
"manual": ["<string>"],
"when": {
"start": ["<string>"],
"stop": ["<string>"]
}
}
}
headers = {
"X-Network-ID": "<x-network-id>",
"X-Network-Secret": "<x-network-secret>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {
'X-Network-ID': '<x-network-id>',
'X-Network-Secret': '<x-network-secret>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
active: true,
deployment: {hosts: [{name: 'main-host-1', priority: 1}], strategy: 'whitelist'},
max_memory: 2048,
max_players: 50,
min_memory: 1024,
name: 'lobby',
plugin_collection_ids: ['<string>'],
plugins: [
{
plugin_id: '<string>',
plugin_name: '<string>',
required: true,
source_type: '<string>',
source_value: '<string>',
version: '<string>'
}
],
priority: 10,
properties: {},
scaling: {
available_slots: 10,
max_servers: 3,
min_servers: 0,
player_threshold: 0.8,
scale_down: {idle_time: '3m', ignore_players: true},
scaling_mode: 'SERVERS'
},
source: {
blueprint: '123e4567-e89b-12d3-a456-426614174000',
image: 'ghcr.io/user/custom-image:latest',
type: 'blueprint'
},
tags: ['<string>'],
type: 'SERVER',
workflows: {manual: ['<string>'], when: {start: ['<string>'], stop: ['<string>']}}
})
};

fetch('https://controller.platform.simplecloud.app/v0/server-groups', 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/server-groups",
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([
'active' => true,
'deployment' => [
'hosts' => [
[
'name' => 'main-host-1',
'priority' => 1
]
],
'strategy' => 'whitelist'
],
'max_memory' => 2048,
'max_players' => 50,
'min_memory' => 1024,
'name' => 'lobby',
'plugin_collection_ids' => [
'<string>'
],
'plugins' => [
[
'plugin_id' => '<string>',
'plugin_name' => '<string>',
'required' => true,
'source_type' => '<string>',
'source_value' => '<string>',
'version' => '<string>'
]
],
'priority' => 10,
'properties' => [

],
'scaling' => [
'available_slots' => 10,
'max_servers' => 3,
'min_servers' => 0,
'player_threshold' => 0.8,
'scale_down' => [
'idle_time' => '3m',
'ignore_players' => true
],
'scaling_mode' => 'SERVERS'
],
'source' => [
'blueprint' => '123e4567-e89b-12d3-a456-426614174000',
'image' => 'ghcr.io/user/custom-image:latest',
'type' => 'blueprint'
],
'tags' => [
'<string>'
],
'type' => 'SERVER',
'workflows' => [
'manual' => [
'<string>'
],
'when' => [
'start' => [
'<string>'
],
'stop' => [
'<string>'
]
]
]
]),
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/server-groups"

payload := strings.NewReader("{\n \"active\": true,\n \"deployment\": {\n \"hosts\": [\n {\n \"name\": \"main-host-1\",\n \"priority\": 1\n }\n ],\n \"strategy\": \"whitelist\"\n },\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"name\": \"lobby\",\n \"plugin_collection_ids\": [\n \"<string>\"\n ],\n \"plugins\": [\n {\n \"plugin_id\": \"<string>\",\n \"plugin_name\": \"<string>\",\n \"required\": true,\n \"source_type\": \"<string>\",\n \"source_value\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"priority\": 10,\n \"properties\": {},\n \"scaling\": {\n \"available_slots\": 10,\n \"max_servers\": 3,\n \"min_servers\": 0,\n \"player_threshold\": 0.8,\n \"scale_down\": {\n \"idle_time\": \"3m\",\n \"ignore_players\": true\n },\n \"scaling_mode\": \"SERVERS\"\n },\n \"source\": {\n \"blueprint\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"image\": \"ghcr.io/user/custom-image:latest\",\n \"type\": \"blueprint\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"type\": \"SERVER\",\n \"workflows\": {\n \"manual\": [\n \"<string>\"\n ],\n \"when\": {\n \"start\": [\n \"<string>\"\n ],\n \"stop\": [\n \"<string>\"\n ]\n }\n }\n}")

req, _ := http.NewRequest("POST", 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.post("https://controller.platform.simplecloud.app/v0/server-groups")
.header("X-Network-ID", "<x-network-id>")
.header("X-Network-Secret", "<x-network-secret>")
.header("Content-Type", "application/json")
.body("{\n \"active\": true,\n \"deployment\": {\n \"hosts\": [\n {\n \"name\": \"main-host-1\",\n \"priority\": 1\n }\n ],\n \"strategy\": \"whitelist\"\n },\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"name\": \"lobby\",\n \"plugin_collection_ids\": [\n \"<string>\"\n ],\n \"plugins\": [\n {\n \"plugin_id\": \"<string>\",\n \"plugin_name\": \"<string>\",\n \"required\": true,\n \"source_type\": \"<string>\",\n \"source_value\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"priority\": 10,\n \"properties\": {},\n \"scaling\": {\n \"available_slots\": 10,\n \"max_servers\": 3,\n \"min_servers\": 0,\n \"player_threshold\": 0.8,\n \"scale_down\": {\n \"idle_time\": \"3m\",\n \"ignore_players\": true\n },\n \"scaling_mode\": \"SERVERS\"\n },\n \"source\": {\n \"blueprint\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"image\": \"ghcr.io/user/custom-image:latest\",\n \"type\": \"blueprint\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"type\": \"SERVER\",\n \"workflows\": {\n \"manual\": [\n \"<string>\"\n ],\n \"when\": {\n \"start\": [\n \"<string>\"\n ],\n \"stop\": [\n \"<string>\"\n ]\n }\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://controller.platform.simplecloud.app/v0/server-groups")

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

request = Net::HTTP::Post.new(url)
request["X-Network-ID"] = '<x-network-id>'
request["X-Network-Secret"] = '<x-network-secret>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"active\": true,\n \"deployment\": {\n \"hosts\": [\n {\n \"name\": \"main-host-1\",\n \"priority\": 1\n }\n ],\n \"strategy\": \"whitelist\"\n },\n \"max_memory\": 2048,\n \"max_players\": 50,\n \"min_memory\": 1024,\n \"name\": \"lobby\",\n \"plugin_collection_ids\": [\n \"<string>\"\n ],\n \"plugins\": [\n {\n \"plugin_id\": \"<string>\",\n \"plugin_name\": \"<string>\",\n \"required\": true,\n \"source_type\": \"<string>\",\n \"source_value\": \"<string>\",\n \"version\": \"<string>\"\n }\n ],\n \"priority\": 10,\n \"properties\": {},\n \"scaling\": {\n \"available_slots\": 10,\n \"max_servers\": 3,\n \"min_servers\": 0,\n \"player_threshold\": 0.8,\n \"scale_down\": {\n \"idle_time\": \"3m\",\n \"ignore_players\": true\n },\n \"scaling_mode\": \"SERVERS\"\n },\n \"source\": {\n \"blueprint\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"image\": \"ghcr.io/user/custom-image:latest\",\n \"type\": \"blueprint\"\n },\n \"tags\": [\n \"<string>\"\n ],\n \"type\": \"SERVER\",\n \"workflows\": {\n \"manual\": [\n \"<string>\"\n ],\n \"when\": {\n \"start\": [\n \"<string>\"\n ],\n \"stop\": [\n \"<string>\"\n ]\n }\n }\n}"

response = http.request(request)
puts response.read_body
{
  "active": true,
  "created_at": "2023-01-01T12:00:00Z",
  "deployment": {
    "hosts": [
      {
        "name": "main-host-1",
        "priority": 1
      }
    ],
    "strategy": "whitelist"
  },
  "max_memory": 2048,
  "max_players": 50,
  "min_memory": 1024,
  "name": "lobby",
  "priority": 10,
  "properties": {},
  "scaling": {
    "available_slots": 10,
    "max_servers": 3,
    "min_servers": 0,
    "player_threshold": 0.8,
    "scale_down": {
      "idle_time": "3m",
      "ignore_players": true
    },
    "scaling_mode": "SERVERS"
  },
  "server_group_id": "123e4567-e89b-12d3-a456-426614174000",
  "source": {
    "blueprint": "123e4567-e89b-12d3-a456-426614174000",
    "image": "ghcr.io/user/custom-image:latest",
    "type": "blueprint"
  },
  "tags": [
    "<string>"
  ],
  "type": "SERVER",
  "updated_at": "2023-01-01T12:00:00Z",
  "workflows": {
    "manual": [
      "<string>"
    ],
    "when": {
      "start": [
        "<string>"
      ],
      "stop": [
        "<string>"
      ]
    }
  }
}
{
"error": "<string>"
}
{
"error": "<string>"
}
{
"error": "<string>"
}

Headers

X-Network-ID
string
required

Network ID

X-Network-Secret
string
required

Network Secret

Body

application/json

Server group details

Request to create a new server group

active
boolean
Example:

true

deployment
object

Deployment configuration for a server group

max_memory
integer
Example:

2048

max_players
integer
Example:

50

min_memory
integer
Example:

1024

name
string
Example:

"lobby"

plugin_collection_ids
string[]
plugins
object[]
priority
integer
Example:

10

properties
object
scaling
object

Scaling configuration for server groups

source
object

Source configuration for server groups

tags
string[]
type
string
Example:

"SERVER"

workflows
object

Workflows configuration for server groups

Response

Created

Response for creating a new server group

active
boolean
Example:

true

created_at
string
Example:

"2023-01-01T12:00:00Z"

deployment
object

Deployment configuration for a server group

max_memory
integer
Example:

2048

max_players
integer
Example:

50

min_memory
integer
Example:

1024

name
string
Example:

"lobby"

priority
integer
Example:

10

properties
object
scaling
object

Scaling configuration for server groups

server_group_id
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

source
object

Source configuration for server groups

tags
string[]
type
string
Example:

"SERVER"

updated_at
string
Example:

"2023-01-01T12:00:00Z"

workflows
object

Workflows configuration for server groups