List Servers
curl --request GET \
--url https://api.example.com/api/serversimport requests
url = "https://api.example.com/api/servers"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/servers', 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://api.example.com/api/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/servers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/servers")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/servers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"state": "<string>",
"is_suspended": true,
"utilization": {
"state": "<string>",
"memory_bytes": 123,
"memory_limit_bytes": 123,
"cpu_absolute": 123,
"disk_bytes": 123,
"network_rx_bytes": 123,
"network_tx_bytes": 123,
"uptime": 123
},
"configuration": {}
}Servers
List Servers
GET
/
api
/
servers
List Servers
curl --request GET \
--url https://api.example.com/api/serversimport requests
url = "https://api.example.com/api/servers"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/servers', 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://api.example.com/api/servers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/servers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/servers")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/servers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"state": "<string>",
"is_suspended": true,
"utilization": {
"state": "<string>",
"memory_bytes": 123,
"memory_limit_bytes": 123,
"cpu_absolute": 123,
"disk_bytes": 123,
"network_rx_bytes": 123,
"network_tx_bytes": 123,
"uptime": 123
},
"configuration": {}
}Returns all servers that are registered and configured on this Wings instance.
Authentication
Requires the Wings authentication token in theAuthorization header:
Authorization: Bearer <token>
Response
Returns an array of server objects with their current state and resource utilization.string
Current state of the server. One of:
offline, starting, running, stoppingboolean
Whether the server is currently suspended
object
Current resource usage statistics
object
Server configuration details including UUID, limits, and allocations
Example Request
curl -X GET https://wings.example.com/api/servers \
-H "Authorization: Bearer your-wings-token" \
-H "Accept: application/json"
Example Response
[
{
"state": "running",
"is_suspended": false,
"utilization": {
"state": "running",
"memory_bytes": 536870912,
"memory_limit_bytes": 1073741824,
"cpu_absolute": 25.5,
"disk_bytes": 2147483648,
"network_rx_bytes": 1024000,
"network_tx_bytes": 512000,
"uptime": 3600000
},
"configuration": {
"uuid": "8d3f9a2e-5c7b-4f1e-9d2a-6e8f1c3b5a7d",
"suspended": false,
"invocation": "java -Xms128M -Xmx1024M -jar server.jar",
"skip_egg_scripts": false,
"build": {
"memory_limit": 1024,
"swap": 0,
"io_weight": 500,
"cpu_limit": 100,
"disk_space": 5120,
"threads": "0-3"
},
"container": {
"image": "ghcr.io/pterodactyl/yolks:java_17"
},
"allocations": {
"default": {
"ip": "0.0.0.0",
"port": 25565
},
"mappings": {}
}
}
}
]
Source Reference
Implemented inrouter/router_system.go:50⌘I
