Get space user metrics
Returns space related metrics of specified type for specific user.
This operation requires space_view_statistics privilege.
Example cURL requests
Get user storage block access metrics with 1 hour resolution
curl -X GET -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/metrics/space/$SPACE_ID/user/$USER_ID?metric=block_access&step=1h"
{
"providerId": "4efc4a0c-0a61-4766-8fe9-c3d7fb414da8",
"rrd": {
"about": "RRDtool graph JSON output",
"data": [[ 5.6435528434 ], [ 2.6435528434 ], [ 4.6435528434 ] ],
"meta": {
"start": 1465466700,
"end": 1465553100,
"legend": ["space fe14b4cc-bce0-4220-8394-a911d11a0a53; metric storage_used; oneprovider Id 4efc4a0c-0a61-4766-8fe9-c3d7fb414da8; storage_used[bytes]"],
"step": 3600
}
}
}
Path parameters
| Parameter | Type & Description |
|---|---|
| sid required | string Id of a specific space for which the monitoring metrics should be retrieved. |
| uid required | string Id of a specific user within a space for which the monitoring metrics should be limited to. |
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 xml getSpaceUserMetrics sid=$SPACE_ID uid=$USER_ID metric=metadata_access_ops step=1hResponses
The monitoring data retrieved in the form of RRD record exported to JSON or XML.
No schema provided.
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Oneprovider REST API not available.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}