Skip to main content
JavaScript
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
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The queue ID

Query Parameters

withinDays
string
default:30

Number of days to analyze statistics for

Response

Successful response

reviewStats
object
required
actionStats
object[]
required
topReviewers
object[]
required

List of top reviewers and their statistics