Skip to main content
GET
https://www.lormex.xyz
/
api
/
metrics
Metrics
curl --request GET \
  --url https://www.lormex.xyz/api/metrics \
  --header 'Content-Type: application/json' \
  --data '
{
  "slug": "<string>",
  "online": 123,
  "success": true
}
'
{
  "top24": 5420,
  "topAll": 12850
}

Metrics API

Get peak metrics for a service or submit new metrics data.

GET /api/metrics

Retrieve peak metrics (24-hour and all-time) for a specific service.

Query Parameters

slug
string
required
The service slug to get metrics for

Response

top24
number
Peak online count in the last 24 hours
topAll
number
All-time peak online count

Example Request

curl -X GET "https://www.lormex.xyz/api/metrics?slug=example-service"

Example Response

{
  "top24": 5420,
  "topAll": 12850
}

POST /api/metrics

Submit metrics data for a service. Used by service integrations to report online counts.

Request Body

slug
string
required
Service identifier (1-64 alphanumeric characters, hyphens, underscores)
online
number
Current online player count (0 to 1,000,000)
success
boolean
Whether the service check was successful

Example Request

curl -X POST "https://www.lormex.xyz/api/metrics" \
  -H "Content-Type: application/json" \
  -d '{"slug": "example-service", "online": 1250}'

Response

{
  "ok": true
}

Error Responses

CodeErrorDescription
400Invalid bodyRequest body validation failed
415Unsupported Media TypeContent-Type must be application/json
500Internal errorServer error
{
  "top24": 5420,
  "topAll": 12850
}