Get Metrics

getMetrics() provides the ability to fetch the total number of minutes spent on meetings, total number of livestream, total number of recordings, total number of token gated meetings and total number of meetings. You need an API_KEY to use this function.


Metrics which you get from getMetrics() will be based on the provided API_KEY.


import { API } from '@huddle01/server-sdk/api';
const metrics = async () => {
  const api = new API({
    apiKey: process.env.API_KEY!,
  const metrics = await api.getMetrics();
  return metrics?.data;


getMetrics() will return an array of rooms with following fields

livestreamCountnumberTotal number of livestreams
recordingCountnumberTotal number of recordings
tokenGatedMeetingsnumberTotal number of token gated meetings
totalMeetingsnumberTotal number of meetings
totalDurationnumberTotal duration of meetings
totalUsersnumberTotal number of users
  "data": {
    "livestreamCount": 0,
    "recordingCount": 0,
    "tokenGatedMeetings": 0,
    "totalMeetings": 0,
    "totalDuration": 0,
    "totalUsers": 0
Audio/Video Infrastructure designed for the developers to empower them ship simple yet powerful Audio/Video Apps.
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.