Physical Server Control API

OpenAPI YAML

This API enables access to consoles and power control of dedicated and colo servers hosted on Mythic Beasts infrastructure.

All requests need to be authenticated using a Bearer token obtained from our auth service.

The base URL for this service is:

  • https://api.mythic-beasts.com/beta

The endpoints listed below should be appended to the above URL.

Endpoints

get /{server_type}/servers

https://api.mythic-beasts.com/beta/{server_type}/servers

Lists all servers associated with this account.

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"

Responses

CodeDescription
200

Server information

An object with keys giving the Mythic Beasts ID of servers associated with this account. Values are objects with additional information about the server.

application/json

NameDescription
* object

Server information (key will match Mythic ID)

identifier string

Server identifier

product string

Product code

period string

Billing period

name string

Friendly name for server

mythic_id boolean

Mythic ID of server

Example
{
    "B0000abcd": {
        "identifier": "dedi1",
        "product": "DSY1000",
        "period": "year",
        "name": null,
        "mythic_id": "B0000abcd"
    },
    "B0000bcde": {
        "identifier": "dedi2",
        "product": "DSM2000",
        "period": "month",
        "name": "database-server",
        "mythic_id": "B0000bcde"
    }
}
403

Not authorised to access this API.

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

get /{server_type}/servers/{identifier}

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}

Returns information about the specified server.

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

Responses

CodeDescription
200

Server information

application/json

NameDescription
product string

Product code

identifier string

Server identifier

mythic_id string

Mythic ID of server

period string

Billing period

Possible values:
  • "year"
  • "quarter"
  • "month"
price integer

Price (in pence per period)

ipv6 array

List of IPv6 addresses of server

ipv4 array

List of IPv4 addresses of server

location object
site string

Site (datacentre) in which server hosted

rack string

Rack in which server is located

Example
{
    "product": "DSY1000",
    "identifier": "dedi1",
    "mythic_id": "B0000abcd",
    "period": "year",
    "ipv6": [
        "2a00:1098:abcd::1",
        "2a00:1098:abcd::2"
    ],
    "ipv4": [
        "46.235.224.236"
    ],
    "location": {
        "site": "cam",
        "rack": "cam-8"
    }
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

get /{server_type}/servers/{identifier}/power

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/power

List power connections and their state

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

Responses

CodeDescription
200

Power ports and state

application/json

NameDescription
* object

Power port information (key will match index)

index string

Power port index (usually 0 or 1, but may potentially be an arbitrary string)

state string

Power port state

Possible values:
  • "on"
  • "off"
  • "unknown"
Example
{
    "0": {
        "index": "0",
        "state": true
    },
    "1": {
        "index": "1",
        "state": false
    }
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

put /{server_type}/servers/{identifier}/power/{power_port}

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/power/{power_port}

Power server (or individual power port) on or off

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

power_port string path (Optional)

Power port index from power port list endpoint (if unspecified, controls all power ports)

Request Body JSON

NameDescription
power string

(Required) Power state

Possible values:
  • "on"
  • "off"
  • "cycle"
Example

application/json

{
    "power": "cycle"
}

Responses

CodeDescription
200

Power control successful

application/json

NameDescription
message string

Response message

Example
{
    "message": "Server powered on"
}
400

Bad request

application/json

NameDescription
message
Example
{}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

get /{server_type}/servers/{identifier}/console/log

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/console/log

Get serial console output

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

limit integer query (Optional)

Line limit (maximum number of lines of output to return; maximum 1000)

Default: 100
timestamps boolean query (Optional)

Whether or not to include timestamps in the console output

Default: true
state_changes boolean query (Optional)

Whether or not to include state change lines in the console output

Default: true

Responses

CodeDescription
200

Console output (as a single string)

application/json

NameDescription
console_output string

Console output

limit integer

Line limit

Example
{
    "console_output": "2025-02-08 13:37:00: Debian GNU/Linux 10 dedi1.example.com ttyS0\r2025-02-08 13:37:00: dedi1 login: ",
    "limit": 2
}
400

Bad request

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Invalid limit (must be numeric)"
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

get /{server_type}/servers/{identifier}/console/websocket

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/console/websocket

Returns a URL of a websocket attached to the serial console of the server.

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

type query (Optional)

Websocket type (plain serial data, serial data wrapped in Telnet, or serial state updates)

Possible values:
  • "serial"
  • "telnet"
  • "state"
Default: "serial"

Responses

CodeDescription
200

Websocket URL

application/json

NameDescription
url string

Websocket URL

Example
{
    "url": "wss://ts-cam-x.consoles.mythic-beasts.com/?token=827d0118b624ac187f30d1ea4a0fb7557228ebe4519e21bcb858a51ab9d7dfc7"
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

put /{server_type}/servers/{identifier}/console/break

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/console/break

Send break on serial console.

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

Responses

CodeDescription
200

Break sent successfully

application/json

NameDescription
message string

Response message

Example
{
    "message": "Break sent"
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

get /{server_type}/servers/{identifier}/console

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/console

Get serial console state

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

Responses

CodeDescription
200

Serial console state

application/json

NameDescription
baudrate integer

Baud rate

rts boolean

RTS serial line state

cts boolean

CTS serial line state

dtr boolean

DTR serial line state

dsr boolean

DSR serial line state

ri boolean

RI serial line state

cd boolean

CD serial line state

Example
{
    "baudrate": 115200,
    "rts": false,
    "cts": false,
    "dtr": true,
    "dsr": true,
    "ri": false,
    "cd": false
}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}

put /{server_type}/servers/{identifier}/console

https://api.mythic-beasts.com/beta/{server_type}/servers/{identifier}/console

Set serial console parameters.

Parameters

NameLocationDescription
server_type string path

Server type

Possible values:
  • "dedicated"
  • "colo"
identifier string path

The server identifier or Mythic ID

Request Body JSON

NameDescription
baudrate integer

(Required) Baud rate

Possible values:
  • 9600
  • 19200
  • 38400
  • 57600
  • 115200
Example

application/json

{
    "baudrate": 9600
}

Responses

CodeDescription
200

Parameters updated successfully

application/json

NameDescription
message string

Response message

Example
{
    "message": "Settings updated"
}
400

Bad request

application/json

NameDescription
message
Example
{}
403

Not authorised to access server or server does not exist

application/json

NameDescription
error string

A description of the error

Example
{
    "error": "Not authorised"
}