Skip to Content
SeyloDocs

Get usage of a service

GET
/api/v1/metrics.service

Returns a service's CPU, memory (without page cache) and network series over a range, summed over its replicas and nodes, with the current value per node and the peak memory in the range.

Needs metrics.view on the service (a grant on its project covers it). Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Query Parameters

serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
range?||||
Default"1h"

Response Body

Success.

application/json
  1. response
range*string|string|string|string|string
stepSeconds*integer
Range1 <= value
current*array<>
peakMemoryBytes*integer
Range0 <= value
points*array<>
Example Request
curl -X GET 'https://example.com/api/v1/metrics.service?serviceId=string'
Example Response
{  "range": "live",  "stepSeconds": 1,  "current": [    {      "nodeId": "string",      "at": "2019-08-24T14:15:22Z",      "cpuPercent": 0,      "memoryBytes": 0,      "memoryLimitBytes": 0,      "networkRxBytesPerSec": 0,      "networkTxBytesPerSec": 0    }  ],  "peakMemoryBytes": 0,  "points": [    {      "t": 0,      "cpuPercent": 0,      "cpuPercentMax": 0,      "memoryBytes": 0,      "memoryBytesMax": 0,      "networkRxBytesPerSec": 0,      "networkTxBytesPerSec": 0    }  ]}