Appearance
GET /stats/
Description
The Statistics resource helps to obtain usage statistics easily. You can retrieve information on your conversion usage, storage usage, or bandwidth usage.
Endpoints
- GET /stats/conversion: Get conversion statistics.
- GET /stats/storage: Get storage statistics.
- GET /stats/bandwidth: Get bandwidth statistics.
- GET /stats/bandwidth/tags: Get bandwidth statistics for AutoGraph Tags.
Authentication
- Required: Yes
- Method: Bearer token
Headers
- Authorization:
Bearer [AUTH_TOKEN]
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
Overrides the Request Accept header. - human:
boolean(Optional)
Values:true,false
Causes the response to be in a structured, more human-readable form. - view:
string(Optional)
Values:user,application
Default:user - current_subscription:
boolean(Optional)
Values:true,false
Default:false - from_date:
string(Optional)
Format:YYYY-MM-DD'T'hh:mm:ss'Z' - to_date:
string(Optional)
Format:YYYY-MM-DD'T'hh:mm:ss'Z' - action:
string(Optional)
Values:aggregate
Example Request
bash
curl -X GET "https://api.xvid.com/v1/stats/bandwidth/?format=json¤t_subscription=true&human=true" \
-H "Authorization: Bearer AUTH_TOKEN"Example Response
Bandwidth Usage
json
{
"stats": [
{
"bandwidth_data": 27159296,
"from_date": 1438300800001,
"to_date": 1438387200000,
"user": {
"id": "54b67486e4b0e8aca492f67d",
"href": "https://api.xvid.com/v1/users/54b67486e4b0e8aca492f67d"
}
},
...
]
}Storage Usage
json
{
"stats": [
{
"user": {
"id": "552b874d14eab3a29d1b3d8d",
"href": "https://api.xvid.com/v1/users/552b874d14eab3a29d1b3d8d"
},
"from_date": 1435795200001,
"to_date": 1435881600000,
"storage_data": 730774413
},
...
]
}Conversion Usage
json
{
"stats": [{
"from_date": 1434931200001,
"to_date": 1436351027259,
"user": {
"id": "552b874d14eab3a29d1b3d8d",
"href": "https://api.xvid.com/v1/users/552b874d14eab3a29d1b3d8d"
},
"conversion_data": 130520484
}]
}Bandwidth Usage per Application
json
{
"stats": [{
"application": {
"id": "552cae3514ea10cb4d3ac69e"
},
"from_date": 1434931200001,
"to_date": 1435017600000,
"conversion_data": 64752296
},
...
]
}