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
.
Example
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;
};
Returns
getMetrics()
will return an array of rooms with following fields
Name | Type | Description |
---|---|---|
livestreamCount | number | Total number of livestreams |
recordingCount | number | Total number of recordings |
tokenGatedMeetings | number | Total number of token gated meetings |
totalMeetings | number | Total number of meetings |
totalDuration | number | Total duration of meetings |
totalUsers | number | Total number of users |
{
"data": {
"livestreamCount": 0,
"recordingCount": 0,
"tokenGatedMeetings": 0,
"totalMeetings": 0,
"totalDuration": 0,
"totalUsers": 0
}
}