Usage Analytics
Get usage analytics for your live streams.
Body
application/json
- Type: objectdate
_range required - Type: string enumgroup
_by requiredGroup the data either weekly, daily or monthly
values- daily
- weekly
- monthly
- Type: array string[] enummetricsrequired
List of metrics required in response
values- bandwidth
_consumption - asset
_duration - storage
_unit
Responses
- application/json
- 400
Bad Request
Request Example for post/video/live/analytics
import Gumlet from '@gumlet/nodejs-sdk';
const client = new Gumlet({
apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});
const liveStreamAnalytic = await client.liveStreamAnalytics.usage({
date_range: {
start_at: '2024-01-01',
end_at: '2024-01-01',
},
group_by: 'daily',
metrics: ['bandwidth_consumption'],
});
console.log(liveStreamAnalytic);
{
"bandwidth_consumption": [
{
"units": 1,
"timestamp": 1
}
],
"asset_duration": [
{
"units": 1,
"timestamp": 1
}
],
"storage_unit": [
{
"units": 1,
"timestamp": 1
}
],
"storage_data_unit": "min"
}
