/clusters/resources/{resource_type}/{query_type}?to={time}&from={time}&interval={polling_interval}
Gets average number of jobs by type.
Request
GET http://unravel-host
:3000/api/v1/clusters/resources/{resource_type}/{query_type}?to={time}&from={time}&interval={polling_interval}
Path parameters
Name | Type | Description | ||
---|---|---|---|---|
| string | Resource type. Valid values:
| ||
| string | Query type. Valid values:
|
Query parameters
Required parameters are highlighted
.
Name | Type | Description |
---|---|---|
| string | Polling interval. Valid values are 1m, 5m, 10m, 30m, |1hk |
| string | Start time in Unix epoch format. |
| string | End time in Unix epoch format. |
Response body
{epoch-timestamp
:count
}
Examples
Request:
curl -X GET "http://myserver.com:3000/api/v1/clusters/resources/cpu/allocated?to=1538666160&interval=30m&from=1536273311" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ "1535360400000": "12", "1535364000000": "3.125", "1535367600000": "5.0303030303" }
Request:
curl -X GET "http://localhost:3000/api/v1/clusters/resources/memory/total?to=1536273841&interval=1h&from=1536187441" -H "accept: application/json" -H "Authorization: JWT token
"
Response:
{ "1535364000000": 47460, "1535367600000": 45087, "1535371200000": 37968 }