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

Monitors are custom metrics derived from server data using expressions. Use these endpoints to create, update, and test monitor definitions, and to fetch monitoring data.

List Monitors

GET /api/app/get_monitors/v1 Fetch all monitor definitions.

Response

{
  "code": 0,
  "rows": [
    {
      "id": "load_avg",
      "title": "Load Average",
      "source": "cpu.load_avg",
      "data_type": "float",
      "enabled": true
    }
  ],
  "list": { "length": 1 }
}

Get Monitor

GET /api/app/get_monitor/v1 Fetch a single monitor definition.

Parameters

id
string
required
Monitor ID

Example

cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://your-server.com/api/app/get_monitor/v1?id=load_avg"

Create Monitor

POST /api/app/create_monitor/v1 Create a new monitor definition. Requires the create_monitors privilege.

Parameters

title
string
required
Display name for the monitor
source
string
required
JEXL expression to extract value from server data
data_type
string
required
Data type: integer, float, bytes, seconds, or milliseconds
enabled
boolean
Whether monitor is active (default: true)
data_match
string
Optional regex to extract value from string results
id
string
Custom monitor ID (auto-generated if omitted)

Example

curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "title": "CPU Load Average",
    "source": "cpu.load_avg",
    "data_type": "float",
    "enabled": true
  }' \
  https://your-server.com/api/app/create_monitor/v1
The source expression is compiled using JEXL syntax. Common examples:
  • cpu.load_avg - Direct property access
  • mem.used / mem.total * 100 - Calculated percentage
  • disk["/"].used - Array access

Update Monitor

POST /api/app/update_monitor/v1 Update an existing monitor. Requires the edit_monitors privilege.

Parameters

id
string
required
Monitor ID to update
...
any
Any monitor properties to update

Example

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

Test Monitor

POST /api/app/test_monitor/v1 Test a monitor expression against a specific server before creating it. Requires the edit_monitors privilege.

Parameters

server
string
required
Server ID to test against
source
string
required
JEXL expression to test
data_type
string
required
Data type for the result
data_match
string
Optional regex pattern

Response

value
number
Extracted value from server data
fail
boolean
True if expression failed to evaluate

Example

curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "server": "s12345",
    "source": "cpu.load_avg",
    "data_type": "float"
  }' \
  https://your-server.com/api/app/test_monitor/v1

Delete Monitor

POST /api/app/delete_monitor/v1 Delete a monitor definition. Requires the delete_monitors privilege.

Parameters

id
string
required
Monitor ID to delete

Example

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

Get QuickMon Data

POST /api/app/get_quickmon_data/v1 Get real-time monitoring data for servers.

Parameters

server
string
Specific server ID (omit for all servers)
group
string
Server group ID (returns all servers in group)

Response

servers
object
Object with server IDs as keys, each containing array of monitor values

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/get_quickmon_data/v1
Response
{
  "code": 0,
  "servers": {
    "s12345": [
      {"id": "load_avg", "value": 2.45},
      {"id": "mem_pct", "value": 65.2}
    ]
  }
}

Get Latest Monitor Data

POST /api/app/get_latest_monitor_data/v1 Fetch the most recent monitoring timeline data for a server.

Parameters

server
string
required
Server ID
sys
string
required
System ID (e.g., minute, hour, day)
limit
number
required
Number of data points to return

Response

rows
array
Array of timeline data points
data
object
Current server data object

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "server": "s12345",
    "sys": "minute",
    "limit": 60
  }' \
  https://your-server.com/api/app/get_latest_monitor_data/v1

Get Historical Monitor Data

POST /api/app/get_historical_monitor_data/v1 Fetch historical monitoring data for a specific date range.

Parameters

server
string
required
Server ID
sys
string
required
System ID (e.g., hour, day)
date
number
required
Unix timestamp for the date to query
limit
number
required
Number of data points to return

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "server": "s12345",
    "sys": "hour",
    "date": 1234567890,
    "limit": 24
  }' \
  https://your-server.com/api/app/get_historical_monitor_data/v1
Response
{
  "code": 0,
  "rows": [
    {
      "epoch": 1234567890,
      "load_avg": 2.45,
      "mem_pct": 65.2
    }
  ]
}

Multi-Update Monitors

POST /api/app/multi_update_monitor/v1 Update multiple monitors in a single call (typically used for reordering). Requires the edit_monitors privilege.

Parameters

items
array
required
Array of objects with id and sort_order

Example

cURL
curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "items": [
      {"id": "load_avg", "sort_order": 0},
      {"id": "mem_pct", "sort_order": 1}
    ]
  }' \
  https://your-server.com/api/app/multi_update_monitor/v1