Aggregated Data

This endpoint retrieves aggregated data of the given metrics.

Body
application/json
  • aggregate
    Type: array object[]
    required

    Aggregate multiple metrics at the same time

  • timeframe
    Type: object
    required

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

  • workspace_id
    Type: string
    required

    The unique identifier of the Gumlet workspace ID available on the Video Workspaces.

  • filters
    Type: array object[]

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

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/insights/aggregated-data
curl https://api.gumlet.com/v1/insights/aggregated-data \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "aggregate": [
    {
      "metric": "views",
      "function": "sum"
    }
  ],
  "workspace_id": "",
  "timeframe": {
    "start_at": "",
    "end_at": ""
  },
  "filters": [
    {
      "name": "meta_browser",
      "value": "",
      "operator": "equals"
    }
  ]
}'
{
  "views": {
    "sum": {
      "value": 79,
      "unit": "views"
    }
  }
}