Aggregated Data
This endpoint retrieves aggregated data of the given metrics.
Body
application/json
- Type: array object[]aggregaterequired
Aggregate multiple metrics at the same time
- Type: objecttimeframerequired
The timeframe to get the data for. Currently we only support maximum difference between
start_atandend_atto be 60 days - Type: stringworkspace
_id requiredThe unique identifier of the Gumlet workspace ID available on the Video Workspaces.
- Type: array object[]filters
Get aggregations for metrics with multiple filters,
valueshould be an exact match
Responses
- 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"
}
}
}
