curl --request GET \
--url https://api.example.com/api/client/servers/:server/websocket{
"400": {},
"403": {},
"404": {},
"500": {},
"502": {},
"token": "<string>",
"socket": "<string>",
"unavailable": true,
"message": "<string>",
"diagnostics": {
"error": "<string>",
"serverUuid": "<string>",
"serverIdentifier": {},
"nodeId": {},
"serverStatus": {}
}
}Establish a WebSocket connection to the server console for real-time interaction
curl --request GET \
--url https://api.example.com/api/client/servers/:server/websocket{
"400": {},
"403": {},
"404": {},
"500": {},
"502": {},
"token": "<string>",
"socket": "<string>",
"unavailable": true,
"message": "<string>",
"diagnostics": {
"error": "<string>",
"serverUuid": "<string>",
"serverIdentifier": {},
"nodeId": {},
"serverStatus": {}
}
}Retrieve WebSocket credentials to connect to a server’s console. This endpoint returns a JWT token and WebSocket URL that can be used to establish a real-time connection to the server’s console output and input.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/xyrapanel/panel/llms.txt
Use this file to discover all available pages before exploring further.
websocket.connect permission on the specified server.
wss:// for HTTPS nodesws:// for HTTP nodeswss://node.example.com:8080/api/servers/{uuid}/wstrue when the server is unavailablecurl -X GET "https://panel.example.com/api/client/servers/my-server/websocket" \
-H "Cookie: session=your-session-token"
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2ZXIiOnsidXVpZCI6ImExYjJjM2Q0LWU1ZjYtNzg5MC1hYmNkLWVmMTIzNDU2Nzg5MCJ9LCJ1c2VyIjp7ImlkIjoidXNlci00NTYiLCJ1dWlkIjoidXNlci00NTYifSwicGVybWlzc2lvbnMiOlsiKiJdLCJpZGVudGlmaWVkQnkiOiJ1c2VyLTQ1NjphMWIyYzNkNC1lNWY2LTc4OTAtYWJjZC1lZjEyMzQ1Njc4OTAiLCJpYXQiOjE3MDk2MzcyMDAsImV4cCI6MTcwOTYzODEwMH0.signature",
"socket": "wss://node.example.com:8080/api/servers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ws"
}
{
"unavailable": true,
"message": "Server is not available on the assigned Wings node",
"diagnostics": {
"error": "404: The requested resource does not exist on this instance",
"serverUuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"serverIdentifier": "my-server",
"nodeId": "node-123",
"serverStatus": "offline"
}
}
const ws = new WebSocket(`${socket}?token=${token}`);
ws.onopen = () => {
console.log('Connected to server console');
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('Console output:', data);
};
ws.onerror = (error) => {
console.error('WebSocket error:', error);
};
ws.onclose = () => {
console.log('Disconnected from server console');
};
// Send a command to the server
ws.send(JSON.stringify({
event: 'send command',
args: ['say Hello from the API!']
}));
["*"]) to allow the WebSocket client to interact with all server functions through the console connection.{
"status": 400,
"message": "Missing server identifier"
}
websocket.connect permission{
"status": 500,
"message": "Node not available: Server has no resolved Wings node"
}
{
"status": 502,
"message": "Failed to prepare websocket session: Connection refused"
}