Video Usage Analytics
This endpoint gives usage analytics data of your videos. Ex - top assets, bandwidth consumption
Body
application/json
- Type: objectdate
_range requiredThe timeframe to get the data for. Currently we only support a maximum of 60 days between
start_atandend_at. - Type: array string[] enummetricsrequired
Define the metric you need the data for, currently we only support
bandwidth_consumption,asset_duration,storage_unit,top_assets,bandwidth_consumption_by_collection,errored_videosandwidget_datavalues- bandwidth
_consumption - asset
_duration - storage
_unit - top
_assets - drm
_requests - ai
_credit _usage - errored
_videos
- Type: objectfilters
- Type: string enumgroup
_by Group by hourly, daily or monthly. If you don't specify anything it's
hourlyby default.values- hourly
- daily
- monthly
- Type: stringtop
_assets _count Count of video assets that should be returned. Max assets count is 1000 per page.
- Type: stringtop
_assets _page top_assets metric may get paginated response. Iterate this parameter to get more data.
Responses
- application/json
- application/json
Request Example for post/video/analytics
import Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
const videoUsageAnalytic = await client.videoUsageAnalytics.retrieve({
metrics: ['bandwidth_consumption', 'asset_duration', 'storage_unit', 'top_assets', 'drm_requests'],
date_range: { start_at: '2026-08-01', end_at: '2026-08-20' },
group_by: 'daily',
});
console.log(videoUsageAnalytic);
{
"drm_requests": [
{
"units": 1,
"timestamp": 1
}
],
"bandwidth_saving_unit": "",
"storage_data_unit": "gb",
"bandwidth_consumption": [
{
"units": 1,
"timestamp": 1
}
],
"storage_unit": [
{
"units": 1,
"timestamp": 1
}
],
"asset_duration": [
{
"units": 1,
"timestamp": 1
}
],
"top_assets": [
{
"asset_id": "string",
"units": "string",
"workspace_id": "string",
"duration": "string",
"title": "string",
"collection_name": "string"
}
],
"has_more_top_asset": true,
"ai_credit_usage": [
{
"timestamp": 1
}
],
"errored_videos": [
{
"timestamp": 1,
"units": 1
}
]
}
