Get Server Details
curl --request GET \
--url https://api.example.com/api/servers/:serverimport requests
url = "https://api.example.com/api/servers/:server"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/servers/:server', 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/:server",
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/:server"
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/:server")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/servers/:server")
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": {
"uuid": "<string>",
"suspended": true,
"invocation": "<string>",
"skip_egg_scripts": true,
"build": {},
"container": {},
"allocations": {}
}
}Servers
Get Server Details
GET
/
api
/
servers
/
:server
Get Server Details
curl --request GET \
--url https://api.example.com/api/servers/:serverimport requests
url = "https://api.example.com/api/servers/:server"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/servers/:server', 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/:server",
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/:server"
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/:server")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/servers/:server")
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": {
"uuid": "<string>",
"suspended": true,
"invocation": "<string>",
"skip_egg_scripts": true,
"build": {},
"container": {},
"allocations": {}
}
}Returns detailed information about a single server instance, including its current state, resource utilization, and configuration.
Authentication
Requires the Wings authentication token in theAuthorization header:
Authorization: Bearer <token>
Path Parameters
string
required
The UUID of the server
Response
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
Error Responses
The requested server does not exist on this Wings instance.
Example Request
curl -X GET https://wings.example.com/api/servers/8d3f9a2e-5c7b-4f1e-9d2a-6e8f1c3b5a7d \
-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_server.go:21⌘I
