Skip to main content
The performance API returns real-time snapshots of bot health — memory usage, CPU utilization, response time samples, and alert thresholds. All endpoints require the x-api-secret API key header (OAuth Bearer tokens are not accepted). Base path: /api/v1/performance
All performance endpoints require API key authentication only (x-api-secret header). OAuth Bearer tokens are not accepted.

GET /performance

Returns the current performance snapshot including stats, time-series data, and alert thresholds.

Authentication

x-api-secret
string
required
Shared API secret configured via the BOT_API_SECRET environment variable.

Response

Returns a performance snapshot object with current metrics and historical time-series data.
current
object
Current point-in-time metrics.
thresholds
object
Currently configured alert thresholds.

Example

curl -H "x-api-secret: YOUR_SECRET" \
  https://volvox.bot/api/v1/performance
{
  "current": {
    "memoryHeapMb": 142.3,
    "memoryRssMb": 218.7,
    "cpuPercent": 12.4,
    "responseTimeMs": 87
  },
  "thresholds": {
    "memoryHeapMb": 500,
    "memoryRssMb": 800,
    "cpuPercent": 80,
    "responseTimeMs": 3000
  }
}

GET /performance/thresholds

Returns the current alert thresholds only.

Authentication

x-api-secret
string
required
Shared API secret.

Example

curl -H "x-api-secret: YOUR_SECRET" \
  https://volvox.bot/api/v1/performance/thresholds
{
  "memoryHeapMb": 500,
  "memoryRssMb": 800,
  "cpuPercent": 80,
  "responseTimeMs": 3000
}

PUT /performance/thresholds

Updates one or more alert thresholds. Only the supplied fields are changed; omitted fields retain their current values.

Authentication

x-api-secret
string
required
Shared API secret.

Request body

All fields are optional but at least one must be provided. Values must be positive numbers.
memoryHeapMb
number
Alert threshold for V8 heap usage in MB.
memoryRssMb
number
Alert threshold for RSS in MB.
cpuPercent
number
Alert threshold for CPU utilization percentage.
responseTimeMs
number
Alert threshold for command response time in ms.

Example

curl -X PUT \
  -H "x-api-secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"memoryHeapMb": 600, "responseTimeMs": 5000}' \
  https://volvox.bot/api/v1/performance/thresholds
{
  "memoryHeapMb": 600,
  "memoryRssMb": 800,
  "cpuPercent": 80,
  "responseTimeMs": 5000
}

Error responses

StatusCause
400No valid threshold fields provided, or a value is not a positive number
401Missing or invalid x-api-secret

Build docs developers (and LLMs) love