Get space metrics
Returns space related metrics of specified type.
This operation requires space_view_statistics privilege.
Example cURL requests
Get storage space used metrics
curl -H "X-Auth-Token: $TOKEN" \
-X GET "https://$HOST/api/v3/oneprovider/metrics/space/$SPACE_ID?metric=storage_used"
{
"providerId": "a0b1d2e6ad583ba1b14caf3b71bc6129ch4f74",
"rrd": {
"about": "RRDtool graph JSON output",
"data": [[ 5.6435528434 ], [ 2.6435528434 ], [ 4.6435528434 ] ],
"meta": {
"start": 1465466700,
"end": 1465553100,
"legend": ["space fb519d81146bcc635b890ff03a5da0fdch34fe; metric storage_used; oneprovider Id a0b1d2e6ad583ba1b14caf3b71bc6129ch4f74; storage_used[bytes]"],
"step": 300
}
}
}
Path parameters
| Parameter | Type & Description |
|---|---|
| sid required | string Id of a specific space for which the monitoring metrics should be retrieved |
Query parameters
| Parameter | Type & Description |
|---|---|
| metric required | string The type of metrics to retrieve. |
| step | string The resolution of the monitoring data to return - default is 5m [5 minutes]. |
Request Examples
oneprovider-rest-cli -ac json getSpaceMetrics sid=$SPACE_ID metric=storage_quota step=5mResponses
The monitoring data retrieved in the form of RRD record exported to JSON or XML.
No schema provided.
Invalid request.
Identifier representing internal error code.
Detailed error message.
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
Identifier representing internal error code.
Detailed error message.
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Oneprovider REST API not available.
Identifier representing internal error code.
Detailed error message.
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
Identifier representing internal error code.
Detailed error message.
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}