Fetch Server Usage

Fetches a collection of timestamped data points listing the total amount of RAM used by this hub.

Requires the usage-view permission.

query
  • sort

    Sorts can be performed on any field - see sorting

  • filter

    Collections of resources can be filtered based on certain criteria - see filtering  Accepted filters: range

If filtering by range, you have a few available options. Set it to hour to get data points grouped by the minute. Set it to day to get hourly data points. Set it to week to get daily data points. Finally, the default is month, which will return a collection of data points grouped by day.

Returns

Returns an array of usage data points, otherwise returns an Error.

Usage Data Point
  • time
    timestamp

    The time the data point was sampled.

  • nodes
    integer

    The number of active nodes (servers) currently active on this hub at the time the data point was sampled.

  • memory_gb
    integer

    The amount of RAM (in GB) currently active in this hub. Counts toward tier usage.

GET /v1/infrastructure/servers/usage

Example Request
$ curl https://api.cycle.io/v1/infrastructure/servers/usage?filter[range]=week \
-H
"Authorization: Bearer API_KEY"
\
-H
"X-Hub-Id: HUB_ID"
Example Response
{
"data": [
{
"memory_gb": 10,
"nodes": 2,
"time": "2019-06-09T20:00:00Z"
},
{
"memory_gb": 10,
"nodes": 2,
"time": "2019-06-09T21:00:00Z"
}
]
}