Aggregated Data

​

This endpoint retrieves aggregated data of the given metrics.

Body

application/json
  • Aggregate multiple metrics at the same time

    Properties: 2
  • The timeframe to get the data for. Currently we only support maximum difference between start_at and end_at to be 60 days

    Properties: 2
  • The unique identifier of the Gumlet workspace ID available on the Video Workspaces.

  • Get aggregations for metrics with multiple filters, value should be an exact match

    Properties: 3

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/insights/aggregated-data
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const videoAnalytic = await client.videoAnalytics.aggregatedData({
  aggregate: [
    {
      metric: 'views',
      function: 'sum',
    },
  ],
  workspace_id: '',
  timeframe: {},
});

console.log(videoAnalytic);
{
  "views": {
    "sum": {
      "value": 79,
      "unit": "views"
    }
  }
}