Video Usage Analytics

This endpoint gives usage analytics data of your videos. Ex - top assets, bandwidth consumption

Body
application/json
  • date_range
    Type: object
    required

    The timeframe to get the data for. Currently we only support a maximum of 60 days between start_at and end_at.

  • metrics
    Type: array string[] enum
    required

    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_videos and widget_data

    values
    • bandwidth_consumption
    • asset_duration
    • storage_unit
    • top_assets
    • drm_requests
    • ai_credit_usage
    • errored_videos
  • filters
    Type: object
  • group_by
    Type: string enum

    Group by hourly, daily or monthly. If you don't specify anything it's hourly by default.

    values
    • hourly
    • daily
    • monthly
  • top_assets_count
    Type: string

    Count of video assets that should be returned. Max assets count is 1000 per page.

  • top_assets_page
    Type: string

    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
    }
  ]
}