import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const response = await client.queue.getStats('id');
console.log(response.actionStats);{
"reviewStats": {
"averageTimeToReview": 123,
"totalReviewed": 123,
"totalPending": 123
},
"actionStats": [
{
"actionId": "<string>",
"actionName": "<string>",
"count": 123,
"percentageOfTotal": 123
}
],
"topReviewers": [
{
"userId": "<string>",
"name": "<string>",
"reviewCount": 123,
"averageTimePerReview": 123,
"topActions": [
{
"actionId": "<string>",
"actionName": "<string>",
"count": 123
}
],
"accuracyScore": 123
}
],
"trends": {
"dailyReviewCounts": [
{
"date": "<string>",
"count": 123
}
],
"flaggedContentTrends": [
{
"label": "<string>",
"trend": 123
}
]
}
}Get detailed statistics about a moderation queue including review times, action counts, and trends
import ModerationAPI from '@moderation-api/sdk';
const client = new ModerationAPI({
secretKey: process.env['MODAPI_SECRET_KEY'], // This is the default and can be omitted
});
const response = await client.queue.getStats('id');
console.log(response.actionStats);{
"reviewStats": {
"averageTimeToReview": 123,
"totalReviewed": 123,
"totalPending": 123
},
"actionStats": [
{
"actionId": "<string>",
"actionName": "<string>",
"count": 123,
"percentageOfTotal": 123
}
],
"topReviewers": [
{
"userId": "<string>",
"name": "<string>",
"reviewCount": 123,
"averageTimePerReview": 123,
"topActions": [
{
"actionId": "<string>",
"actionName": "<string>",
"count": 123
}
],
"accuracyScore": 123
}
],
"trends": {
"dailyReviewCounts": [
{
"date": "<string>",
"count": 123
}
],
"flaggedContentTrends": [
{
"label": "<string>",
"trend": 123
}
]
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The queue ID
Number of days to analyze statistics for
Successful response
Show child attributes
List of top reviewers and their statistics
Show child attributes
ID of the reviewer
Name of the reviewer
Number of items reviewed
Average review time in milliseconds
Most common actions taken by this reviewer
Optional accuracy score based on review quality metrics
Show child attributes
Was this page helpful?