Retrieve Time Series Stats - Storage
GET/api/v1/stats/timeseries/storage
REQUEST PARAMETERS
| key | Value | Description |
|---|---|---|
stat_type | string | api, addons, transcodes, storage or cdn |
stat_subtype | string | (Optional) See below |
start_time | integer | earliest time as UTC timestamp, like 1652129843. Minimum can be upto 364 days in the past from current time. Maximum can be current time. |
end_time | latest time as UTC timestamp, like 1716150001. Minimum can be upto 364 days in the past from current time. Maximum can be current time. |
stat_subtype parameter
This allows filtering response for specific API, addon, etc.
If stat_type=api
stat_subtypecan be a specific api like/api/v1/assets/{ASSET_ID}/data- Note this must be url encoded when sent as query parameter, like,
stat_subtype=%2Fapi%2Fv1%2Fassets%2F%7BASSET_ID%7D%2Fdata
If stat_type=addons
stat_subtypecan be specific addon likeREMOVE_BACKGROUND
If stat_type=transcodes
stat_subtypeis not needed
if stat_type= storage
stat_subtypeshould beASSET
If stat_type=cdn
stat_subtypecan betraffic,request
RESPONSE JSON
The API call will return with a JSON response as below.
When user_id is not sent in parameters, the API returns consolidated stats for the user group. user_id will be set to * in this case.
{
"usergroup_id": 42,
"stat_type": "api",
"stat_subtype": "/api/v1/assets/{ASSET_ID}/data",
"start_time": "1742507272",
"end_time": "1738294624",
"data": {
"*": [
{
"timestamp": 1738294624,
"value": 238
},
{
"timestamp": 1740715993,
"value": 18
}
]
}
}
When user_id is sent in parameters, the API returns stats for the user. user_id will be set to appropriate id in this case as below.
{
"usergroup_id": 42,
"stat_type": "api",
"stat_subtype": "/api/v1/assets/{ASSET_ID}/data",
"start_time": "1742507272",
"end_time": "1738294624",
"data": {
"*": [
{
"timestamp": 1738294624,
"value": 238
},
{
"timestamp": 1740715993,
"value": 18
}
]
}
}
| key | Value | Description |
|---|---|---|
usergroup_id | integer | User group id |
stat_type | string | See above |
stat_subtype | string | See above |
start_time | integer | earliest time as UTC timestamp, like 1652129843 |
end_time | latest time as UTC timestamp, like 1716150001 | |
data | JSON | JSON with user_id as key. * for consolidated stats for all users (default) |
timestamp and value | List | Key-Value pairs with UTC timestamp and value for the requested stat |
Request
Responses
- 200
- 401
- 403
- 500
Successful operation
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
Internal server error