List servers
GET
https://api.rahona.network/services/servers
Retrieves the list of servers.
[
{
"id": "123",
"name": "vm1"
},
...
]
{ "error": "Could not find any servers" }
Get server
GET
https://api.rahona.network/services/servers/:id
Retrieves the server.
Path Parameters
{
"id": 123
"name": "vm1",
"status": "UP",
"cpus": 2,
"cpu": 8.39,
"mem": 3807158272, # Bytes
"maxmem": 4294967296, # Bytes
"network": [
{
"ip": "198.51.100.71",
"reverse": "71.100.51.198.ip.rahona.network."
"mask": "255.255.255.255",
"mac": " 02:00:00:00:00:00",
"gateway": "198.51.100.254"
},
...
]
}
{ "error": "Could not find this server" }
Start server
GET
https://api.rahona.network/services/servers/:id/start
Start the server.
Path Parameters
{ "message": "Server start successfully" }
{ "error": "Could not start the server" }
Restart server
GET
https://api.rahona.network/services/servers/:id/restart
Restart the server.
Path Parameters
{ "message": "Server restart successfully" }
{ "error": "Could not restart the server" }
Stop server
GET
https://api.rahona.network/services/servers/:id/stop
Stop the server.
Path Parameters
{ "message": "Server stop successfully" }
{ "error": "Could not stop the server" }
Get server graphics
POST
https://api.rahona.network/services/servers/:id/graphs
Get servers graphics.
Path Parameters
Request Body
Name | Type | Description |
---|
| | hour | day | week | month |
{
[
{
"maxdisk" => 322122547200
"diskread" => 1888.7111111111
"diskwrite" => 27991.665777778
"netout" => 411.74677777778
"time" => 1589769000
"maxmem" => 4294967296
"maxcpu" => 2
"mem" => 3800528486.4
"disk" => 0
"netin" => 646.29266666667
"cpu" => 0.074558249080812
},
{
"diskwrite" => 32698.481777778
"diskread" => 3895.7511111111
"maxdisk" => 322122547200
"netout" => 346.94211111111
"time" => 1589830200
"maxmem" => 4294967296
"netin" => 611.06288888889
"disk" => 0
"mem" => 3815129024.2844
"maxcpu" => 2
"cpu" => 0.073981276889674
}
...
]
}
{ "error": "Invalid timeframe" }
{ "error": "Can't find any graphs" }
{ "error": "This service is suspended" }
Please check in the invoices section.
{ "error": "Server already running" }
You cannot start an already running server 🙄
{ "error": "Server already stopped" }
You cannot stop an already stopped server 🙄
{ "error": "Server down, could not restart" }
You cannot restart an already stopped server 🙄
{ "error": "Could not connect to the node" }
Could not connect to the node : An internal problem has occurred, contact a staff member.
Dernière mise à jour