oCoreoCore Docs
API Reference

Metrics

Get server metrics history

Returns historical metrics with resolution based on the requested period.

GET
/servers/{id}/metrics

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Server ID

Query Parameters

periodstring

Time period (1h, 6h, 24h, 7d)

Default: "1h"
curl -X GET "//api.ocore.dev/api/servers/<string>/metrics?period=1h" \
  -H "Authorization: <token>"

OK

{
  "count": 0,
  "metrics": [
    {
      "collectedAt": "string",
      "cpuLoad15m": 0,
      "cpuLoad1m": 0,
      "cpuLoad5m": 0,
      "cpuUsagePercent": 0,
      "diskAvailableBytes": 0,
      "diskTotalBytes": 0,
      "diskUsagePercent": 0,
      "diskUsedBytes": 0,
      "id": "string",
      "networkRxBytes": 0,
      "networkTxBytes": 0,
      "ramAvailableBytes": 0,
      "ramTotalBytes": 0,
      "ramUsagePercent": 0,
      "ramUsedBytes": 0,
      "serverId": "string",
      "uptimeSeconds": 0
    }
  ],
  "period": "string"
}

Get latest server metrics

Returns the most recent metrics snapshot for a server.

GET
/servers/{id}/metrics/latest

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Server ID

curl -X GET "//api.ocore.dev/api/servers/<string>/metrics/latest" \
  -H "Authorization: <token>"

OK

{
  "collectedAt": "string",
  "cpuLoad15m": 0,
  "cpuLoad1m": 0,
  "cpuLoad5m": 0,
  "cpuUsagePercent": 0,
  "diskAvailableBytes": 0,
  "diskTotalBytes": 0,
  "diskUsagePercent": 0,
  "diskUsedBytes": 0,
  "id": "string",
  "networkRxBytes": 0,
  "networkTxBytes": 0,
  "ramAvailableBytes": 0,
  "ramTotalBytes": 0,
  "ramUsagePercent": 0,
  "ramUsedBytes": 0,
  "serverId": "string",
  "uptimeSeconds": 0
}

Get instance metrics history

Returns historical instance metrics (CPU, memory, disk) for the given time period.

GET
/instances/{id}/monitoring/metrics

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Instance ID (UUID)

Query Parameters

periodstring

Time period: 1h, 6h, 24h, 7d

Default: "1h"
curl -X GET "//api.ocore.dev/api/instances/<string>/monitoring/metrics?period=1h" \
  -H "Authorization: <token>"

OK

{
  "metrics": [
    {}
  ],
  "period": "string"
}

Get latest instance metrics

Returns the most recent metric snapshot for an instance.

GET
/instances/{id}/monitoring/metrics/latest

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Instance ID (UUID)

curl -X GET "//api.ocore.dev/api/instances/<string>/monitoring/metrics/latest" \
  -H "Authorization: <token>"

OK

{}

Stream instance metrics (SSE)

Server-Sent Events stream pushing latest instance metrics every 10 seconds.

GET
/instances/{id}/monitoring/metrics/stream

Authorization

Authorization<token>

JWT Bearer token (format: Bearer {token})

In: header

Path Parameters

idRequiredstring

Instance ID (UUID)

curl -X GET "//api.ocore.dev/api/instances/<string>/monitoring/metrics/stream" \
  -H "Authorization: <token>"

SSE event stream

"string"

Was this page helpful?