Back to Documentation

GamePanel.io API

Integrate with your control panel

This documentation may change!

This documentation may change throughout the beta programme

Authentication

All API authentication uses oAuth v2. Please ensure you’re familiar with the oAuth standard.

Users can (when enabled) generate personal access tokens from within the control panel for use with the API.

Client credentials and personal access tokens can be generated from within the control panel.

Authorize

Example

GET http://demo.mypanel.io/api/v1/oauth/authorize

Request Authorization
GET/oauth/authorize

Example Request

Headers
Content-Type: application/json
Body
{
  "client_id": "my_app_id",
  "redirect_uri": "http://my.domain/registered_redirect_uri",
  "scope": "Hello, world!",
  "state": "Hello, world!"
}

Example Request

Attributes
HideShow
client_id
required
string 
redirect_uri
optional
string 
scope
optional
string 
state
optional
string 

Response 200

This response has no content.

Response 200


Token

Example

POST http://demo.mypanel.io/api/v1/oauth/token

Request Token
POST/oauth/token

Example Request

Headers
Content-Type: application/json
Body
{
  "client_id": "my_app_id",
  "client_secret": "my_app_secret",
  "redirect_uri": "http://my.domain/registered_redirect_uri",
  "scope": "Hello, world!",
  "response_type": "Hello, world!",
  "code": "Hello, world!",
  "refresh_token": "Hello, world!"
}

Example Request

Attributes
HideShow
client_id
optional
string 
client_secret
optional
string 
redirect_uri
optional
string 
scope
optional
string 
response_type
optional
string 
code
optional
string 
refresh_token
optional
string 

Response 200

Headers
Content-Type: application/json
Body
{
  "access_token": "Hello, world!",
  "refresh_token": "Hello, world!",
  "token_type": "Hello, world!",
  "expires_in": "Hello, world!",
  "scope": "Hello, world!",
  "state": "Hello, world!"
}

Response 200

Attributes
HideShow
access_token
string 
refresh_token
string 
token_type
string 
expires_in
string 
scope
string 
state
string 

Users

Users

Example

GET http://demo.mypanel.io/api/v1/users?limit=25&offset=0

List All Users
GET/users{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 12,
    "username": "Bob",
    "locked": true,
    "powerUser": true,
    "fullName": "Bob Bobbington",
    "minecraftUsername": "Bob",
    "email": "bob@email.bob",
    "owner": 0
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/users

Add New User
POST/users

Example Request

Headers
Content-Type: application/json
Body
{
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "password": "Hello, world!"
}

Example Request

Attributes
HideShow
username
required
string 
locked
optional
boolean 
powerUser
optional
boolean 
fullName
optional
string 
minecraftUsername
optional
string,null 
email
optional
string 
password
required
string 

Response 201

Headers
Content-Type: application/json
Location: /api/v1/users/2
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 201

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

User

Example

GET http://demo.mypanel.io/api/v1/users/12

Get User
GET/users/{user}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Example

PUT http://demo.mypanel.io/api/v1/users/12

Update User
PUT/users/{user}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Example Request

Headers
Content-Type: application/json
Body
{
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "password": "Hello, world!"
}

Example Request

Attributes
HideShow
username
required
string 
locked
optional
boolean 
powerUser
optional
boolean 
fullName
optional
string 
minecraftUsername
optional
string,null 
email
optional
string 
password
optional
string 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Example

PATCH http://demo.mypanel.io/api/v1/users/12

Partial Update User
PATCH/users/{user}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Example Request

Headers
Content-Type: application/json
Body
{
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "password": "Hello, world!"
}

Example Request

Attributes
HideShow
username
required
string 
locked
optional
boolean 
powerUser
optional
boolean 
fullName
optional
string 
minecraftUsername
optional
string,null 
email
optional
string 
password
optional
string 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Example

DELETE http://demo.mypanel.io/api/v1/users/12

Delete User
DELETE/users/{user}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Response 204

This response has no content.

Response 204


User Servers

Example

GET http://demo.mypanel.io/api/v1/users/12/servers?limit=25&offset=0

List User Server
GET/users/{user}/servers{?limit,offset}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 19,
    "friendlyId": "x473hf34jkns5jvn8df44",
    "name": "My awesome server",
    "user": 8,
    "game": "minecraft",
    "plan": 2,
    "suspended": true,
    "ip": "10.0.0.1",
    "port": 25565,
    "binary": 8,
    "binaryLocation": "custom-binary.jar",
    "world": "world",
    "status": "online",
    "visible": false,
    "tasks": true,
    "slots": 10
  }
]

Response 200

Attributes
HideShow

User Roles

Example

GET http://demo.mypanel.io/api/v1/users/12/roles

List User Roles
GET/users/{user}/roles

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Response 200

Headers
Content-Type: application/json
Body
{
  "roles": [
    1
  ]
}

Response 200

Attributes
HideShow
roles
array 

Example

POST http://demo.mypanel.io/api/v1/users/12/roles

Add User Role
POST/users/{user}/roles

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Example Request

Headers
Content-Type: application/json
Body
{
  "roles": [
    1
  ]
}

Example Request

Attributes
HideShow
roles
optional
array 

Response 201

Headers
Content-Type: application/json
Body
{
  "roles": [
    1
  ]
}

Response 201

Attributes
HideShow
roles
array 

Example

PUT http://demo.mypanel.io/api/v1/users/12/roles

Set User Roles
PUT/users/{user}/roles

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

Example Request

Headers
Content-Type: application/json
Body
{
  "roles": [
    1
  ]
}

Example Request

Attributes
HideShow
roles
optional
array 

Response 200

Headers
Content-Type: application/json
Body
{
  "roles": [
    1
  ]
}

Response 200

Attributes
HideShow
roles
array 

Manage User Roles

Example

GET http://demo.mypanel.io/api/v1/users/12/roles/3

Get Assigned Role
GET/users/{user}/roles/{role}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

role
required
number Example: 3

The ID of the role

Response 200

Headers
Content-Type: application/json
Body
true

Response 200

Descriptions

Attributes
HideShow

Values: true

Response 404

Headers
Content-Type: application/json
Body
false

Response 404

Attributes
HideShow

Values: false


Example

DELETE http://demo.mypanel.io/api/v1/users/12/roles/3

Remove Assigned Role
DELETE/users/{user}/roles/{role}

URI Parameters
HideShow
user
required
number Example: 12

The ID of the user

role
required
number Example: 3

The ID of the role

Response 204

This response has no content.

Response 204


Roles

Roles

Example

GET http://demo.mypanel.io/api/v1/roles?limit=25&offset=0

List All Roles
GET/roles{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 3,
    "name": "Network Manager",
    "permissions": [
      "settings.view"
    ]
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/roles

Add New Role
POST/roles

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Example Request

Attributes
HideShow
name
required
string 
permissions
optional
array 

Response 201

Headers
Content-Type: application/json
Body
{
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Response 201

Attributes
HideShow
name
string 
permissions
array 

Role

Example

GET http://demo.mypanel.io/api/v1/roles/3

Get Role
GET/roles/{role}

URI Parameters
HideShow
role
required
number Example: 3

The ID of the role

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Response 200

Attributes
HideShow
id
number 
name
string 
permissions
array 

Example

PUT http://demo.mypanel.io/api/v1/roles/3

Update Role
PUT/roles/{role}

URI Parameters
HideShow
role
required
number Example: 3

The ID of the role

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Example Request

Attributes
HideShow
name
required
string 
permissions
optional
array 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Response 200

Attributes
HideShow
id
number 
name
string 
permissions
array 

Example

PATCH http://demo.mypanel.io/api/v1/roles/3

Partial Update Role
PATCH/roles/{role}

URI Parameters
HideShow
role
required
number Example: 3

The ID of the role

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Example Request

Attributes
HideShow
name
required
string 
permissions
optional
array 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 3,
  "name": "Network Manager",
  "permissions": [
    "settings.view"
  ]
}

Response 200

Attributes
HideShow
id
number 
name
string 
permissions
array 

Example

DELETE http://demo.mypanel.io/api/v1/roles/3

Delete Role
DELETE/roles/{role}

URI Parameters
HideShow
role
required
number Example: 3

The ID of the role

Response 204

This response has no content.

Response 204


Servers

Servers

Example

GET http://demo.mypanel.io/api/v1/servers?limit=25&offset=0

List All Servers
GET/servers{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 19,
    "friendlyId": "x473hf34jkns5jvn8df44",
    "name": "My awesome server",
    "user": 8,
    "game": "minecraft",
    "plan": 2,
    "suspended": true,
    "ip": "10.0.0.1",
    "port": 25565,
    "binary": 8,
    "binaryLocation": "custom-binary.jar",
    "world": "world",
    "status": "online",
    "visible": false,
    "tasks": true,
    "slots": 10
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/servers

Add New Server
POST/servers

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565
}

Example Request

Attributes
HideShow
name
required
string 
user
required
number 

The ID of the user who owns this server

game
required
string 

The game that this server is running

plan
required
number 

The ID of the plan assigned to this server

suspended
optional
boolean Default: false 
ip
required
string 
port
required
number 

Valid port number between 1 and 65535

Response 201

Headers
Content-Type: application/json
Body
{
  "id": 19,
  "friendlyId": "x473hf34jkns5jvn8df44",
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565,
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "world": "world",
  "status": "online",
  "visible": false,
  "tasks": true,
  "slots": 10
}

Response 201

Attributes
HideShow
id
number 
friendlyId
string 
name
string 
user
number 

The ID of the user who owns this server

game
string 

The game that this server is running

plan
number 

The ID of the plan assigned to this server

suspended
boolean Default: false 
ip
string 
port
number 

Valid port number between 1 and 65535

binary
number 
binaryLocation
string 
world
string 
status
string 

Values: onlineoffline

visible
boolean 
tasks
boolean 

Scheduled tasks are enabled on this server

slots
number 

Current slot count


Server

Example

GET http://demo.mypanel.io/api/v1/servers/17

Get Server
GET/servers/{server}

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 19,
  "friendlyId": "x473hf34jkns5jvn8df44",
  "name": "My awesome server",
  "user": 8,
  "game": {
    "name": "minecraft",
    "systemManagedBinary": true
  },
  "plan": {
    "id": 5,
    "name": "Basic Plan",
    "slotsLimit": 100,
    "memoryLimit": 1024,
    "backupsEnabled": true,
    "backupsLimit": 0,
    "allowedCustomBinary": true
  },
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565,
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "world": "world",
  "status": "online",
  "visible": false,
  "tasks": true,
  "slots": 10,
  "powerState": "running",
  "process": {
    "cpu": 124.28,
    "memory": 66691072
  }
}

Response 200

Attributes
HideShow
id
number 
friendlyId
string 
name
string 
user
number 

The ID of the user who owns this server

suspended
boolean Default: false 
ip
string 
port
number 

Valid port number between 1 and 65535

binary
number 
binaryLocation
string 
world
string 
status
string 

Values: onlineoffline

visible
boolean 
tasks
boolean 

Scheduled tasks are enabled on this server

slots
number 

Current slot count

powerState
string 

Values: runningstoppedterminatedrestart

plan
object 
game
object 
process
object
cpu
number 
memory
number 

Memory consumption in bytes

boolean

Values: false


Example

PUT http://demo.mypanel.io/api/v1/servers/17

Update Server
PUT/servers/{server}

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565
}

Example Request

Attributes
HideShow
name
required
string 
user
required
number 

The ID of the user who owns this server

game
required
string 

The game that this server is running

plan
required
number 

The ID of the plan assigned to this server

suspended
optional
boolean Default: false 
ip
required
string 
port
required
number 

Valid port number between 1 and 65535

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 19,
  "friendlyId": "x473hf34jkns5jvn8df44",
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565,
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "world": "world",
  "status": "online",
  "visible": false,
  "tasks": true,
  "slots": 10
}

Response 200

Attributes
HideShow
id
number 
friendlyId
string 
name
string 
user
number 

The ID of the user who owns this server

game
string 

The game that this server is running

plan
number 

The ID of the plan assigned to this server

suspended
boolean Default: false 
ip
string 
port
number 

Valid port number between 1 and 65535

binary
number 
binaryLocation
string 
world
string 
status
string 

Values: onlineoffline

visible
boolean 
tasks
boolean 

Scheduled tasks are enabled on this server

slots
number 

Current slot count


Example

PATCH http://demo.mypanel.io/api/v1/servers/17

Partial Update Server
PATCH/servers/{server}

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565
}

Example Request

Attributes
HideShow
name
required
string 
user
required
number 

The ID of the user who owns this server

game
required
string 

The game that this server is running

plan
required
number 

The ID of the plan assigned to this server

suspended
optional
boolean Default: false 
ip
required
string 
port
required
number 

Valid port number between 1 and 65535

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 19,
  "friendlyId": "x473hf34jkns5jvn8df44",
  "name": "My awesome server",
  "user": 8,
  "game": "minecraft",
  "plan": 2,
  "suspended": true,
  "ip": "10.0.0.1",
  "port": 25565,
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "world": "world",
  "status": "online",
  "visible": false,
  "tasks": true,
  "slots": 10
}

Response 200

Attributes
HideShow
id
number 
friendlyId
string 
name
string 
user
number 

The ID of the user who owns this server

game
string 

The game that this server is running

plan
number 

The ID of the plan assigned to this server

suspended
boolean Default: false 
ip
string 
port
number 

Valid port number between 1 and 65535

binary
number 
binaryLocation
string 
world
string 
status
string 

Values: onlineoffline

visible
boolean 
tasks
boolean 

Scheduled tasks are enabled on this server

slots
number 

Current slot count


Example

DELETE http://demo.mypanel.io/api/v1/servers/17

Delete Server
DELETE/servers/{server}

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Response 204

This response has no content.

Response 204


Server Configuration

Example

GET http://demo.mypanel.io/api/v1/servers/17/config

Get Server Config
GET/servers/{server}/config

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "My Amazing Server 2.0",
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "slots": 5,
  "game": {
    "name": "minecraft",
    "systemManagedBinary": true
  }
}

Response 200

Attributes
HideShow
name
string 
binary
number 
binaryLocation
string 
slots
number 
game
object 

Example

PUT http://demo.mypanel.io/api/v1/servers/17/config

Update Server Config
PUT/servers/{server}/config

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "My Amazing Server 2.0",
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "slots": 5
}

Example Request

Attributes
HideShow
name
required
string 
binary
required
number 
binaryLocation
optional
string 
slots
required
number 

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "My Amazing Server 2.0",
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "slots": 5,
  "game": {
    "name": "minecraft",
    "systemManagedBinary": true
  }
}

Response 200

Attributes
HideShow
name
string 
binary
number 
binaryLocation
string 
slots
number 
game
object 

Example

PATCH http://demo.mypanel.io/api/v1/servers/17/config

Partial Update Server Config
PATCH/servers/{server}/config

URI Parameters
HideShow
server
required
number Example: 17

The ID of the server

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "My Amazing Server 2.0",
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "slots": 5
}

Example Request

Attributes
HideShow
name
required
string 
binary
required
number 
binaryLocation
optional
string 
slots
required
number 

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "My Amazing Server 2.0",
  "binary": 8,
  "binaryLocation": "custom-binary.jar",
  "slots": 5,
  "game": {
    "name": "minecraft",
    "systemManagedBinary": true
  }
}

Response 200

Attributes
HideShow
name
string 
binary
number 
binaryLocation
string 
slots
number 
game
object 

Server Install/Update

Example

POST http://demo.mypanel.io/api/v1/servers/9/install

Install/Update Game Files
POST/servers/{server}/install

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

Response 202

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Response 202

Attributes
HideShow
state
string 

Values: runningstoppedterminatedrestart


Server Power

Example

GET http://demo.mypanel.io/api/v1/servers/9/power

Get Power Status
GET/servers/{server}/power

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

Response 202

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Response 202

Attributes
HideShow
state
string 

Values: runningstoppedterminatedrestart


Example

POST http://demo.mypanel.io/api/v1/servers/9/power

Start Server
POST/servers/{server}/power

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

Response 202

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Response 202

Attributes
HideShow
state
string 

Values: runningstoppedterminatedrestart


Example

PUT http://demo.mypanel.io/api/v1/servers/9/power

Stop/Restart Server
PUT/servers/{server}/power

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

Server restart functionality is currently not implemented

Example Request

Headers
Content-Type: application/json
Body
{
  "state": "stopped"
}

Example Request

Attributes
HideShow
state
required
string 

Values: stoppedrestart

Response 202

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Response 202

Attributes
HideShow
state
string 

Values: runningstoppedterminatedrestart


Example

DELETE http://demo.mypanel.io/api/v1/servers/9/power

Kill Server
DELETE/servers/{server}/power

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

Example Request

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Example Request

Attributes
HideShow
state
required
string 

Values: runningstoppedterminatedrestart

Response 202

Headers
Content-Type: application/json
Body
{
  "state": "running"
}

Response 202

Attributes
HideShow
state
string 

Values: runningstoppedterminatedrestart


Server Console

Example

GET http://demo.mypanel.io/api/v1/servers/9/console?output=html

Read Console
GET/servers/{server}/console{?output}

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

output
optional
enum Default: html Example: html

Choices: html raw

Response 200

Headers
Content-Type: application/json
Body
[
  "Hello, world!",
  "Starting Server...",
  "Loading Libraries..."
]

Response 200

Attributes
HideShow

Response 404

This response has no content.

Response 404

Returned when the server process is not available.


Example

PUT http://demo.mypanel.io/api/v1/servers/9/console

Write Console
PUT/servers/{server}/console

URI Parameters
HideShow
server
required
number Example: 9

The ID of the server

This action works with POST, PUT, and PATCH.

Example Request

Headers
Content-Type: application/json
Body
[
  "Hello, world!",
  "some command"
]

Example Request

Attributes
HideShow

Response 200

Headers
Content-Type: application/json
Body
[
  "Hello, world!",
  "Starting Server...",
  "Loading Libraries..."
]

Response 200

Attributes
HideShow

Response 404

This response has no content.

Response 404

Returned when the server process is not available.


Server FTP Details

Example

GET http://demo.mypanel.io/api/v1/servers/3/ftp

Get FTP Details
GET/servers/{server}/ftp

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

Response 200

Headers
Content-Type: application/json
Body
{
  "username": "Hello, world!",
  "password": "Hello, world!",
  "host": "node.myhost.com",
  "port": 22,
  "enabled": true
}

Response 200

Attributes
HideShow
username
string 
password
string 
host
string 
port
number 
enabled
boolean 

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Example

POST http://demo.mypanel.io/api/v1/servers/3/ftp

Generate New FTP Password
POST/servers/{server}/ftp

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

Response 200

Headers
Content-Type: application/json
Body
{
  "username": "Hello, world!",
  "password": "Hello, world!",
  "host": "node.myhost.com",
  "port": 22,
  "enabled": true
}

Response 200

Attributes
HideShow
username
string 
password
string 
host
string 
port
number 
enabled
boolean 

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Example

DELETE http://demo.mypanel.io/api/v1/servers/3/ftp

Lock FTP Account
DELETE/servers/{server}/ftp

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

Response 204

This response has no content.

Response 204

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Server Data Management

Please Note

These actions only work when FTP is enabled on the server’s node.

Server Files

Example

GET http://demo.mypanel.io/api/v1/servers/3/data/files/my/server/file.txt?download=true

Download File
GET/servers/{server}/data/files/{+file}{?download}

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

file
required
string Example: my/server/file.txt
download
optional
boolean Default: true Example: true

Specify if the response should force the browser to download the file by setting a Content-Disposition header in the response

Example Request

Headers
If-Modified-Since: Wed, 21 Oct 2015 12:49:00 GMT

Example Request

You can specify an If-Modified-Since header, for a 304 response if the file hasn’t been modified since a set date.

Response 200

Headers
Content-Type: text/plain
Content-Length: 22
Last-Modified: Fri, 23 Oct 2015 15:04:00 GMT
Content-Disposition: attachment;filename="file.txt";filename*=utf-8\'\'file.txt
Body
The file's contents...

Response 200

Response 304

Headers
Content-Type: text/plain
Content-Length: 22
Last-Modified: Mon, 19 Oct 2015 08:12:00 GMT
Content-Disposition: attachment;filename="file.txt";filename*=utf-8\'\'file.txt

Response 304

The response will have no body with a 304 response.

Response 404

This response has no content.

Response 404

The file doesn’t exist

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Example

POST http://demo.mypanel.io/api/v1/servers/3/data/files/my/server/file.txt

Create an Empty File
POST/servers/{server}/data/files/{+file}

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

file
required
string Example: my/server/file.txt

Response 201

Headers
Content-Type: application/json
Body
{
  "success": true
}

Response 201

Attributes
HideShow
success
boolean 

Response 409

This response has no content.

Response 409

A file or directory with this name already exists


Example

PUT http://demo.mypanel.io/api/v1/servers/3/data/files/my/server/file.txt?overwrite=false

Upload File
PUT/servers/{server}/data/files/{+file}{?overwrite}

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

file
required
string Example: my/server/file.txt
overwrite
optional
boolean Default: false Example: false

Example Request

Headers
Content-Type: text/plain
Body
The contents of a file...

Example Request

Response 200

Headers
Content-Type: application/json
Body
{
  "success": true
}

Response 200

Attributes
HideShow
success
boolean 

Response 409

This response has no content.

Response 409

A file or directory with this name already exists

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Example

DELETE http://demo.mypanel.io/api/v1/servers/3/data/files/my/server/file.txt

Delete File
DELETE/servers/{server}/data/files/{+file}

URI Parameters
HideShow
server
required
number Example: 3

The ID of the server

file
required
string Example: my/server/file.txt

Response 200

Headers
Content-Type: application/json
Body
{
  "success": true
}

Response 200

Attributes
HideShow
success
boolean 

Response 503

This response has no content.

Response 503

The server is not on a node which has FTP enabled


Server Directories

Example

GET http://demo.mypanel.io/api/v1/servers/data/directories/world/data/

Get Directory Listing
GET/servers/data/directories{+directory}

URI Parameters
HideShow
directory
optional
string Default: blank Example: /world/data/

Response 200

Headers
Content-Type: application/json
Body
[
  {
    "name": "Hello, world!",
    "path": "Hello, world!",
    "type": "directory",
    "lastModifiedTime": "Hello, world!",
    "size": 1,
    "owner": "Hello, world!",
    "group": "Hello, world!",
    "permissions": {
      "owner": 7,
      "group": 5,
      "guest": 5
    }
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/servers/data/directories/world/data/

Create Directory
POST/servers/data/directories{+directory}

URI Parameters
HideShow
directory
optional
string Default: blank Example: /world/data/

Response 201

This response has no content.

Response 201

Response 400

This response has no content.

Response 400

Returned when performing the action on the root directory

Response 409

This response has no content.

Response 409

A file or directory with this name already exists


Example

DELETE http://demo.mypanel.io/api/v1/servers/data/directories/world/data/

Delete Directory
DELETE/servers/data/directories{+directory}

URI Parameters
HideShow
directory
optional
string Default: blank Example: /world/data/

Response 204

This response has no content.

Response 204

Response 400

This response has no content.

Response 400

Returned when performing the action on the root directory


Plans

Plans

Example

GET http://demo.mypanel.io/api/v1/plans?limit=25&offset=0

List All Plans
GET/plans{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 5,
    "name": "Basic Plan",
    "slotsLimit": 100,
    "memoryLimit": 1024,
    "backupsEnabled": true,
    "backupsLimit": 0,
    "allowedCustomBinary": true,
    "defaultNode": 6,
    "baseLocation": "/var/gamepanelio/servers/"
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/plans

Add New Plan
POST/plans

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Example Request

Attributes
HideShow
name
required
string 
slotsLimit
required
number 
memoryLimit
required
number 
backupsEnabled
optional
boolean Default: false 
backupsLimit
required
number 
allowedCustomBinary
required
boolean 
defaultNode
required
number 

The ID of the default node for auto-allocation

baseLocation
required
string 

The base directory where all server’s data on this plan will be stored

Response 201

Headers
Content-Type: application/json
Location: /api/v1/plans/2
Body
{
  "id": 5,
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Response 201

Attributes
HideShow
id
number 
name
string 
slotsLimit
number 
memoryLimit
number 
backupsEnabled
boolean Default: false 
backupsLimit
number 
allowedCustomBinary
boolean 
defaultNode
number 

The ID of the default node for auto-allocation

baseLocation
string 

The base directory where all server’s data on this plan will be stored


Plan

Example

GET http://demo.mypanel.io/api/v1/plans/5

Get Plan
GET/plans/{plan}

URI Parameters
HideShow
plan
required
number Example: 5

The ID of the plan

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Response 200

Attributes
HideShow
id
number 
name
string 
slotsLimit
number 
memoryLimit
number 
backupsEnabled
boolean Default: false 
backupsLimit
number 
allowedCustomBinary
boolean 
defaultNode
number 

The ID of the default node for auto-allocation

baseLocation
string 

The base directory where all server’s data on this plan will be stored


Example

PUT http://demo.mypanel.io/api/v1/plans/5

Update Plan
PUT/plans/{plan}

URI Parameters
HideShow
plan
required
number Example: 5

The ID of the plan

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Example Request

Attributes
HideShow
name
required
string 
slotsLimit
required
number 
memoryLimit
required
number 
backupsEnabled
optional
boolean Default: false 
backupsLimit
required
number 
allowedCustomBinary
required
boolean 
defaultNode
required
number 

The ID of the default node for auto-allocation

baseLocation
required
string 

The base directory where all server’s data on this plan will be stored

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Response 200

Attributes
HideShow
id
number 
name
string 
slotsLimit
number 
memoryLimit
number 
backupsEnabled
boolean Default: false 
backupsLimit
number 
allowedCustomBinary
boolean 
defaultNode
number 

The ID of the default node for auto-allocation

baseLocation
string 

The base directory where all server’s data on this plan will be stored


Example

PATCH http://demo.mypanel.io/api/v1/plans/5

Partial Update Plan
PATCH/plans/{plan}

URI Parameters
HideShow
plan
required
number Example: 5

The ID of the plan

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Example Request

Attributes
HideShow
name
required
string 
slotsLimit
required
number 
memoryLimit
required
number 
backupsEnabled
optional
boolean Default: false 
backupsLimit
required
number 
allowedCustomBinary
required
boolean 
defaultNode
required
number 

The ID of the default node for auto-allocation

baseLocation
required
string 

The base directory where all server’s data on this plan will be stored

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 5,
  "name": "Basic Plan",
  "slotsLimit": 100,
  "memoryLimit": 1024,
  "backupsEnabled": true,
  "backupsLimit": 0,
  "allowedCustomBinary": true,
  "defaultNode": 6,
  "baseLocation": "/var/gamepanelio/servers/"
}

Response 200

Attributes
HideShow
id
number 
name
string 
slotsLimit
number 
memoryLimit
number 
backupsEnabled
boolean Default: false 
backupsLimit
number 
allowedCustomBinary
boolean 
defaultNode
number 

The ID of the default node for auto-allocation

baseLocation
string 

The base directory where all server’s data on this plan will be stored


Example

DELETE http://demo.mypanel.io/api/v1/plans/5

Delete Plan
DELETE/plans/{plan}

URI Parameters
HideShow
plan
required
number Example: 5

The ID of the plan

Example Request

Headers
Content-Type: application/json
Body
{
  "newId": 2
}

Example Request

Attributes
HideShow
newId
optional
number 

Response 204

This response has no content.

Response 204


Network: Nodes

Nodes

Example

GET http://demo.mypanel.io/api/v1/network/nodes?limit=25&offset=0

List All Nodes
GET/network/nodes{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 6,
    "name": "London 1",
    "enabled": true,
    "autoAdd": true,
    "connectionAddress": "10.0.0.1:2252",
    "connectionKey": "autoGeneratedConnectionKey",
    "ftpEnabled": true,
    "ftpPort": 22
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/network/nodes

Add New Node
POST/network/nodes

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
autoAdd
optional
boolean Default: false 
connectionAddress
required
string 
connectionKey
required
string 
ftpEnabled
optional
boolean Default: false 
ftpPort
required
number 

Valid port number between 1 and 65535

Response 201

Headers
Content-Type: application/json
Location: /api/v1/network/nodes/2
Body
{
  "id": 6,
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Response 201

Attributes
HideShow
id
number 
name
string 
enabled
boolean Default: false 
autoAdd
boolean Default: false 
connectionAddress
string 
connectionKey
string 
ftpEnabled
boolean Default: false 
ftpPort
number 

Valid port number between 1 and 65535


Node

Example

GET http://demo.mypanel.io/api/v1/network/nodes/6

Get Node
GET/network/nodes/{node}

URI Parameters
HideShow
node
required
number Example: 6

The ID of the node

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 6,
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Response 200

Attributes
HideShow
id
number 
name
string 
enabled
boolean Default: false 
autoAdd
boolean Default: false 
connectionAddress
string 
connectionKey
string 
ftpEnabled
boolean Default: false 
ftpPort
number 

Valid port number between 1 and 65535


Example

PUT http://demo.mypanel.io/api/v1/network/nodes/6

Update Node
PUT/network/nodes/{node}

URI Parameters
HideShow
node
required
number Example: 6

The ID of the node

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
autoAdd
optional
boolean Default: false 
connectionAddress
required
string 
connectionKey
required
string 
ftpEnabled
optional
boolean Default: false 
ftpPort
required
number 

Valid port number between 1 and 65535

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 6,
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Response 200

Attributes
HideShow
id
number 
name
string 
enabled
boolean Default: false 
autoAdd
boolean Default: false 
connectionAddress
string 
connectionKey
string 
ftpEnabled
boolean Default: false 
ftpPort
number 

Valid port number between 1 and 65535


Example

PATCH http://demo.mypanel.io/api/v1/network/nodes/6

Partial Update Node
PATCH/network/nodes/{node}

URI Parameters
HideShow
node
required
number Example: 6

The ID of the node

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
autoAdd
optional
boolean Default: false 
connectionAddress
required
string 
connectionKey
required
string 
ftpEnabled
optional
boolean Default: false 
ftpPort
required
number 

Valid port number between 1 and 65535

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 6,
  "name": "London 1",
  "enabled": true,
  "autoAdd": true,
  "connectionAddress": "10.0.0.1:2252",
  "connectionKey": "autoGeneratedConnectionKey",
  "ftpEnabled": true,
  "ftpPort": 22
}

Response 200

Attributes
HideShow
id
number 
name
string 
enabled
boolean Default: false 
autoAdd
boolean Default: false 
connectionAddress
string 
connectionKey
string 
ftpEnabled
boolean Default: false 
ftpPort
number 

Valid port number between 1 and 65535


Example

DELETE http://demo.mypanel.io/api/v1/network/nodes/6

Delete Node
DELETE/network/nodes/{node}

URI Parameters
HideShow
node
required
number Example: 6

The ID of the node

Response 204

This response has no content.

Response 204


Node Network Addresses

Example

GET http://demo.mypanel.io/api/v1/network/nodes/6/addresses?limit=25&offset=0

Get Node Network Addresses
GET/network/nodes/{node}/addresses{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

node
required
number Example: 6

The ID of the node

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "ipAddress": "10.0.0.1",
    "node": 6,
    "hostname": "node.myhost.com",
    "type": "auto",
    "serverLimit": 10
  }
]

Response 200

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/network/nodes/6/addresses?limit=25&offset=0

Scan Node for New Addresses
POST/network/nodes/{node}/addresses{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

node
required
number Example: 6

The ID of the node

Response 204

This response has no content.

Response 204


Network: Addresses

Network Addresses

Example

GET http://demo.mypanel.io/api/v1/network/addresses?limit=25&offset=0

List All Network Addresses
GET/network/addresses{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "ipAddress": "10.0.0.1",
    "node": 6,
    "hostname": "node.myhost.com",
    "type": "auto",
    "serverLimit": 10
  }
]

Response 200

Attributes
HideShow

Network Address

Example

GET http://demo.mypanel.io/api/v1/network/addresses/10.0.0.1

Get Address
GET/network/addresses/{ipAddress}

URI Parameters
HideShow
ipAddress
required
string Example: 10.0.0.1

The ipAddress to manage

Response 200

Headers
Content-Type: application/json
Body
{
  "ipAddress": "10.0.0.1",
  "node": 6,
  "hostname": "node.myhost.com",
  "type": "auto",
  "serverLimit": 10
}

Response 200

Attributes
HideShow
ipAddress
string 
node
number 
hostname
string 
type
string 

Values: autoautolimiteddedicatedreserved

serverLimit
number 

Example

PUT http://demo.mypanel.io/api/v1/network/addresses/10.0.0.1

Update Address
PUT/network/addresses/{ipAddress}

URI Parameters
HideShow
ipAddress
required
string Example: 10.0.0.1

The ipAddress to manage

Example Request

Headers
Content-Type: application/json
Body
{
  "hostname": "node.myhost.com",
  "type": "auto",
  "serverLimit": 10
}

Example Request

Attributes
HideShow
hostname
optional
string 
type
required
string 

Values: autoautolimiteddedicatedreserved

serverLimit
required
number 

Response 200

Headers
Content-Type: application/json
Body
{
  "ipAddress": "10.0.0.1",
  "node": 6,
  "hostname": "node.myhost.com",
  "type": "auto",
  "serverLimit": 10
}

Response 200

Attributes
HideShow
ipAddress
string 
node
number 
hostname
string 
type
string 

Values: autoautolimiteddedicatedreserved

serverLimit
number 

Example

PATCH http://demo.mypanel.io/api/v1/network/addresses/10.0.0.1

Partial Update Address
PATCH/network/addresses/{ipAddress}

URI Parameters
HideShow
ipAddress
required
string Example: 10.0.0.1

The ipAddress to manage

Example Request

Headers
Content-Type: application/json
Body
{
  "hostname": "node.myhost.com",
  "type": "auto",
  "serverLimit": 10
}

Example Request

Attributes
HideShow
hostname
optional
string 
type
required
string 

Values: autoautolimiteddedicatedreserved

serverLimit
required
number 

Response 200

Headers
Content-Type: application/json
Body
{
  "ipAddress": "10.0.0.1",
  "node": 6,
  "hostname": "node.myhost.com",
  "type": "auto",
  "serverLimit": 10
}

Response 200

Attributes
HideShow
ipAddress
string 
node
number 
hostname
string 
type
string 

Values: autoautolimiteddedicatedreserved

serverLimit
number 

Example

DELETE http://demo.mypanel.io/api/v1/network/addresses/10.0.0.1

Delete Address
DELETE/network/addresses/{ipAddress}

URI Parameters
HideShow
ipAddress
required
string Example: 10.0.0.1

The ipAddress to manage

Response 204

This response has no content.

Response 204


Games

Games

Example

GET http://demo.mypanel.io/api/v1/games?limit=25&offset=0

List Supported Games
GET/games{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "name": "minecraft",
    "systemManagedBinary": true,
    "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
  }
]

Response 200

Attributes
HideShow

Game

Example

GET http://demo.mypanel.io/api/v1/games/minecraft

Get Game
GET/games/{game}

URI Parameters
HideShow
game
required
string Example: minecraft

The name of the game

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "minecraft",
  "systemManagedBinary": true,
  "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
}

Response 200

Attributes
HideShow
name
string 
systemManagedBinary
boolean 

When true, the game’s binary is managed by the system automatically.

startupArguments
string 

The following strings will be replaced by server data:

  • %CS_MEM% - Server allocated memory, formated as 123M

  • %CS_BINARY% - Path to server binary

  • %CS_IP% - IP address assigned to the server

  • %CS_PORT% - The port assigned to the server

  • %CS_SLOTS% - Server configured slot numbers (number)


Example

PUT http://demo.mypanel.io/api/v1/games/minecraft

Update Game
PUT/games/{game}

URI Parameters
HideShow
game
required
string Example: minecraft

The name of the game

Example Request

Headers
Content-Type: application/json
Body
{
  "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
}

Example Request

Attributes
HideShow
startupArguments
required
string 

The following strings will be replaced by server data:

  • %CS_MEM% - Server allocated memory, formated as 123M

  • %CS_BINARY% - Path to server binary

  • %CS_IP% - IP address assigned to the server

  • %CS_PORT% - The port assigned to the server

  • %CS_SLOTS% - Server configured slot numbers (number)

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "minecraft",
  "systemManagedBinary": true,
  "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
}

Response 200

Attributes
HideShow
name
string 
systemManagedBinary
boolean 

When true, the game’s binary is managed by the system automatically.

startupArguments
string 

The following strings will be replaced by server data:

  • %CS_MEM% - Server allocated memory, formated as 123M

  • %CS_BINARY% - Path to server binary

  • %CS_IP% - IP address assigned to the server

  • %CS_PORT% - The port assigned to the server

  • %CS_SLOTS% - Server configured slot numbers (number)


Example

PATCH http://demo.mypanel.io/api/v1/games/minecraft

Update Game
PATCH/games/{game}

URI Parameters
HideShow
game
required
string Example: minecraft

The name of the game

Example Request

Headers
Content-Type: application/json
Body
{
  "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
}

Example Request

Attributes
HideShow
startupArguments
required
string 

The following strings will be replaced by server data:

  • %CS_MEM% - Server allocated memory, formated as 123M

  • %CS_BINARY% - Path to server binary

  • %CS_IP% - IP address assigned to the server

  • %CS_PORT% - The port assigned to the server

  • %CS_SLOTS% - Server configured slot numbers (number)

Response 200

Headers
Content-Type: application/json
Body
{
  "name": "minecraft",
  "systemManagedBinary": true,
  "startupArguments": "-Xmx%CS_MEM% -XX:+AggressiveOpts -XX:+UseGCOverheadLimit -jar %CS_BINARY% nogui"
}

Response 200

Attributes
HideShow
name
string 
systemManagedBinary
boolean 

When true, the game’s binary is managed by the system automatically.

startupArguments
string 

The following strings will be replaced by server data:

  • %CS_MEM% - Server allocated memory, formated as 123M

  • %CS_BINARY% - Path to server binary

  • %CS_IP% - IP address assigned to the server

  • %CS_PORT% - The port assigned to the server

  • %CS_SLOTS% - Server configured slot numbers (number)


Game Binaries

Example

GET http://demo.mypanel.io/api/v1/games/minecraft/binaries?limit=25&offset=0

List All Binaries for Game
GET/games/{game}/binaries{?limit,offset}

URI Parameters
HideShow
game
required
string Example: minecraft

The name of the game

limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 8,
    "game": "minecraft",
    "name": "Vanilla Minecraft",
    "enabled": true,
    "version": "1.0.0",
    "node": 6,
    "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
  }
]

Response 200

Returned binaries will be for this game only.

Attributes
HideShow

Example

POST http://demo.mypanel.io/api/v1/games/minecraft/binaries

Create a Binary for Game
POST/games/{game}/binaries

URI Parameters
HideShow
game
required
string Example: minecraft

The name of the game

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
version
required
string 
node
required
number 
path
required
string 

The path on the node to the binary file

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 8,
  "game": "minecraft",
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Response 200

Attributes
HideShow
id
number 
game
string 
name
string 
enabled
boolean Default: false 
version
string 
node
number 
path
string 

The path on the node to the binary file


Binaries

Example

GET http://demo.mypanel.io/api/v1/binaries?limit=25&offset=0

List All Binaries
GET/binaries{?limit,offset}

URI Parameters
HideShow
limit
optional
number Default: 10 Example: 25

The amount of items to list

offset
optional
number Default: 0 Example: 0

The amount of items to offset the listing by

Response 200

Headers
Content-Type: application/json
X-Total-Count: 10
Body
[
  {
    "id": 8,
    "game": "minecraft",
    "name": "Vanilla Minecraft",
    "enabled": true,
    "version": "1.0.0",
    "node": 6,
    "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
  }
]

Response 200

Attributes
HideShow

Binary

Example

GET http://demo.mypanel.io/api/v1/binaries/8

Get Binary
GET/binaries/{binary}

URI Parameters
HideShow
binary
required
number Example: 8

The ID of the binary

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 8,
  "game": "minecraft",
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Response 200

Attributes
HideShow
id
number 
game
string 
name
string 
enabled
boolean Default: false 
version
string 
node
number 
path
string 

The path on the node to the binary file


Example

PUT http://demo.mypanel.io/api/v1/binaries/8

Update Binary
PUT/binaries/{binary}

URI Parameters
HideShow
binary
required
number Example: 8

The ID of the binary

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
version
required
string 
node
required
number 
path
required
string 

The path on the node to the binary file

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 8,
  "game": "minecraft",
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Response 200

Attributes
HideShow
id
number 
game
string 
name
string 
enabled
boolean Default: false 
version
string 
node
number 
path
string 

The path on the node to the binary file


Example

PATCH http://demo.mypanel.io/api/v1/binaries/8

Partial Update Binary
PATCH/binaries/{binary}

URI Parameters
HideShow
binary
required
number Example: 8

The ID of the binary

Example Request

Headers
Content-Type: application/json
Body
{
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Example Request

Attributes
HideShow
name
required
string 
enabled
optional
boolean Default: false 
version
required
string 
node
required
number 
path
required
string 

The path on the node to the binary file

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 8,
  "game": "minecraft",
  "name": "Vanilla Minecraft",
  "enabled": true,
  "version": "1.0.0",
  "node": 6,
  "path": "/var/binaries/minecraft/vanilla-1.0.0.jar"
}

Response 200

Attributes
HideShow
id
number 
game
string 
name
string 
enabled
boolean Default: false 
version
string 
node
number 
path
string 

The path on the node to the binary file


Current User

Profile

Example

GET http://demo.mypanel.io/api/v1/profile

Get Profile
GET/profile

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Example

PUT http://demo.mypanel.io/api/v1/profile

Update Profile
PUT/profile

Example Request

Headers
Content-Type: application/json
Body
{
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "password": "Hello, world!"
}

Example Request

Attributes
HideShow
fullName
optional
string 
minecraftUsername
optional
string,null 
email
optional
string 
password
optional
string 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Example

PATCH http://demo.mypanel.io/api/v1/profile

Partial Update Profile
PATCH/profile

Example Request

Headers
Content-Type: application/json
Body
{
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "password": "Hello, world!"
}

Example Request

Attributes
HideShow
fullName
optional
string 
minecraftUsername
optional
string,null 
email
optional
string 
password
optional
string 

Response 200

Headers
Content-Type: application/json
Body
{
  "id": 12,
  "username": "Bob",
  "locked": true,
  "powerUser": true,
  "fullName": "Bob Bobbington",
  "minecraftUsername": "Bob",
  "email": "bob@email.bob",
  "owner": 0
}

Response 200

Attributes
HideShow
id
number 
username
string 
locked
boolean 
powerUser
boolean 
fullName
string 
minecraftUsername
string,null 
email
string 
owner
number 

Panel Configuration

Settings

Example

GET http://demo.mypanel.io/api/v1/settings

Get Settings
GET/settings

Response 200

Headers
Content-Type: application/json
Body
{
  "maintenanceMode": false,
  "maintenanceMessage": "We're undergoing maintenance! Check back later :)",
  "serverIdPrefix": "x",
  "serverDefaultName": "My super awesome server",
  "serverDefaultNetworkAddress": "10.0.0.1",
  "panelTitle": "GamePanel.io Control Panel",
  "panelLogo": "Hello, world!",
  "panelTheme": "BlueCosmos",
  "panelDefaultLocale": "en",
  "usernameChange": false,
  "personalAccessTokensEnabled": true
}

Response 200

Attributes
HideShow
maintenanceMode
boolean 
maintenanceMessage
string,null 
serverIdPrefix
string 

The prefix used for any new server’s friendlyId

serverDefaultName
string 

The default name for new servers

serverDefaultNetworkAddress
string 
panelTitle
string 
panelLogo
string,null 

Path to an image used for the control panel’s logo

panelTheme
string 
panelDefaultLocale
string 
usernameChange
boolean 
personalAccessTokensEnabled
boolean 

Example

PATCH http://demo.mypanel.io/api/v1/settings

Partial Update Settings
PATCH/settings

Example Request

Headers
Content-Type: application/json
Body
{
  "maintenanceMode": false,
  "maintenanceMessage": "We're undergoing maintenance! Check back later :)",
  "serverIdPrefix": "x",
  "serverDefaultName": "My super awesome server",
  "serverDefaultNetworkAddress": "10.0.0.1",
  "panelTitle": "GamePanel.io Control Panel",
  "panelLogo": "Hello, world!",
  "panelTheme": "BlueCosmos",
  "panelDefaultLocale": "en",
  "usernameChange": false,
  "personalAccessTokensEnabled": true
}

Example Request

Attributes
HideShow
maintenanceMode
required
boolean 
maintenanceMessage
optional
string,null 
serverIdPrefix
required
string 

The prefix used for any new server’s friendlyId

serverDefaultName
required
string 

The default name for new servers

serverDefaultNetworkAddress
required
string 
panelTitle
required
string 
panelLogo
optional
string,null 

Path to an image used for the control panel’s logo

panelTheme
required
string 
panelDefaultLocale
required
string 
usernameChange
required
boolean 
personalAccessTokensEnabled
required
boolean 

Response 200

Headers
Content-Type: application/json
Body
{
  "maintenanceMode": false,
  "maintenanceMessage": "We're undergoing maintenance! Check back later :)",
  "serverIdPrefix": "x",
  "serverDefaultName": "My super awesome server",
  "serverDefaultNetworkAddress": "10.0.0.1",
  "panelTitle": "GamePanel.io Control Panel",
  "panelLogo": "Hello, world!",
  "panelTheme": "BlueCosmos",
  "panelDefaultLocale": "en",
  "usernameChange": false,
  "personalAccessTokensEnabled": true
}

Response 200

Attributes
HideShow
maintenanceMode
boolean 
maintenanceMessage
string,null 
serverIdPrefix
string 

The prefix used for any new server’s friendlyId

serverDefaultName
string 

The default name for new servers

serverDefaultNetworkAddress
string 
panelTitle
string 
panelLogo
string,null 

Path to an image used for the control panel’s logo

panelTheme
string 
panelDefaultLocale
string 
usernameChange
boolean 
personalAccessTokensEnabled
boolean