Physical Server Control API
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
Lists all servers associated with this account.
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
Responses
Code | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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
Example
|
||||||||||||||
403 | Not authorised to access this API. application/json
Example
|
get /{server_type}/servers/{identifier}
Returns information about the specified server.
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
identifier string | path |
The server identifier or Mythic ID |
Responses
Code | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Server information application/json
Example
|
||||||||||||||||||||||
403 | Not authorised to access server or server does not exist application/json
Example
|
get /{server_type}/servers/{identifier}/power
List power connections and their state
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
identifier string | path |
The server identifier or Mythic ID |
Responses
Code | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
200 | Power ports and state application/json
Example
|
||||||||
403 | Not authorised to access server or server does not exist application/json
Example
|
put /{server_type}/servers/{identifier}/power/{power_port}
Power server (or individual power port) on or off
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
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
Name | Description |
---|---|
power string |
(Required) Power state
Possible values:
|
Example
application/json
{
"power": "cycle"
}
Responses
Code | Description | ||||
---|---|---|---|---|---|
200 | Power control successful application/json
Example
|
||||
400 | Bad request application/json
Example
|
||||
403 | Not authorised to access server or server does not exist application/json
Example
|
get /{server_type}/servers/{identifier}/console/log
Get serial console output
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
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
Code | Description | ||||||
---|---|---|---|---|---|---|---|
200 | Console output (as a single string) application/json
Example
|
||||||
400 | Bad request application/json
Example
|
||||||
403 | Not authorised to access server or server does not exist application/json
Example
|
get /{server_type}/servers/{identifier}/console/websocket
Returns a URL of a websocket attached to the serial console of the server.
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
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:
Default:
"serial" |
Responses
Code | Description | ||||
---|---|---|---|---|---|
200 | Websocket URL application/json
Example
|
||||
403 | Not authorised to access server or server does not exist application/json
Example
|
put /{server_type}/servers/{identifier}/console/break
Send break on serial console.
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
identifier string | path |
The server identifier or Mythic ID |
Responses
Code | Description | ||||
---|---|---|---|---|---|
200 | Break sent successfully application/json
Example
|
||||
403 | Not authorised to access server or server does not exist application/json
Example
|
get /{server_type}/servers/{identifier}/console
Get serial console state
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
identifier string | path |
The server identifier or Mythic ID |
Responses
Code | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
200 | Serial console state application/json
Example
|
||||||||||||||||
403 | Not authorised to access server or server does not exist application/json
Example
|
put /{server_type}/servers/{identifier}/console
Set serial console parameters.
Parameters
Name | Location | Description |
---|---|---|
server_type string | path |
Server type
Possible values:
|
identifier string | path |
The server identifier or Mythic ID |
Request Body JSON
Name | Description |
---|---|
baudrate integer |
(Required) Baud rate
Possible values:
|
Example
application/json
{
"baudrate": 9600
}
Responses
Code | Description | ||||
---|---|---|---|---|---|
200 | Parameters updated successfully application/json
Example
|
||||
400 | Bad request application/json
Example
|
||||
403 | Not authorised to access server or server does not exist application/json
Example
|