Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pixlcore/xyops/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Servers API provides access to server inventory, real-time monitoring data, and server management operations.

Get Active Servers

GET /api/app/get_active_servers/v1 Get list of all currently connected servers.

Response

rows
array
Array of server objects
list
object
Metadata with total count

Example

cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  https://your-server.com/api/app/get_active_servers/v1
Response
{
  "code": 0,
  "rows": [
    {
      "id": "s12345",
      "hostname": "web-01.example.com",
      "ip": "192.168.1.10",
      "groups": ["production", "web"],
      "cpu": { "cores": 8, "usage": 45.2 },
      "mem": { "total": 16000000000, "free": 8000000000 },
      "online": true
    }
  ],
  "list": { "length": 1 }
}

Get Server

GET /api/app/get_server/v1 Get detailed information about a specific server including full minute monitoring data.

Parameters

id
string
required
Server ID

Response

server
object
Server object with configuration and status
data
object
Full monitoring data from last minute
online
boolean
Whether server is currently connected

Example

cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://your-server.com/api/app/get_server/v1?id=s12345"
Response
{
  "code": 0,
  "server": {
    "id": "s12345",
    "hostname": "web-01.example.com",
    "groups": ["production", "web"],
    "enabled": true
  },
  "data": {
    "cpu": { "cores": 8, "usage": 45.2 },
    "mem": { "total": 16000000000, "used": 8000000000 },
    "disk": { "total": 500000000000, "used": 250000000000 },
    "net": { "bytes_sent": 1234567890, "bytes_recv": 9876543210 }
  },
  "online": true
}

Update Server

POST /api/app/update_server/v1 Update server configuration (title, enabled status, groups, etc.). Requires the update_servers privilege.

Parameters

id
string
required
Server ID to update
title
string
Custom display name
enabled
boolean
Whether server is enabled
groups
array
Array of group IDs
icon
string
Material Design icon name
autoGroup
boolean
Enable automatic group assignment

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "id": "s12345",
    "title": "Production Web Server",
    "groups": ["production", "web", "nginx"]
  }' \
  https://your-server.com/api/app/update_server/v1

Update Server Data

POST /api/app/update_server_data/v1 Update custom user data stored with server. Requires the update_servers privilege.

Parameters

id
string
required
Server ID
data
object
required
User data object (shallow-merged unless replace is true)
replace
boolean
If true, replace entire userData object instead of merging

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "id": "s12345",
    "data": {
      "location": "us-west-1",
      "owner": "DevOps Team"
    }
  }' \
  https://your-server.com/api/app/update_server_data/v1
Response
{
  "code": 0,
  "data": {
    "location": "us-west-1",
    "owner": "DevOps Team"
  }
}

Delete Server

POST /api/app/delete_server/v1 Permanently delete a server and optionally its monitoring history. Requires admin privileges.

Parameters

id
string
required
Server ID to delete
history
boolean
If true, also delete all monitoring data

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "id": "s12345",
    "history": true
  }' \
  https://your-server.com/api/app/delete_server/v1
This operation sends an uninstall command to online servers. For offline servers, only monitoring data is deleted if history is true.

Watch Server

POST /api/app/watch_server/v1 Set a watch on a server to take monitoring snapshots every minute for a specified duration. Requires the create_snapshots privilege.

Parameters

id
string
required
Server ID
duration
number
required
Watch duration in seconds (0 to cancel)

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "id": "s12345",
    "duration": 3600
  }' \
  https://your-server.com/api/app/watch_server/v1

Create Snapshot

POST /api/app/create_snapshot/v1 Manually create a monitoring snapshot for a server. Requires the create_snapshots privilege.

Parameters

server
string
required
Server ID

Response

id
string
Generated snapshot ID

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"server": "s12345"}' \
  https://your-server.com/api/app/create_snapshot/v1
Response
{
  "code": 0,
  "id": "snap123abc"
}

Delete Snapshot

POST /api/app/delete_snapshot/v1 Delete a monitoring snapshot. Requires the delete_snapshots privilege.

Parameters

id
string
required
Snapshot ID to delete

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"id": "snap123abc"}' \
  https://your-server.com/api/app/delete_snapshot/v1

Get Live Stats

Real-time server metrics are available through the active server endpoints. For historical monitoring data, see the Monitors API.
Server IDs are automatically generated when servers first connect. Use the hostname to identify servers if the ID is not yet known.

Build docs developers (and LLMs) love