Modbot Docs
APIAPI referenceAnalytics

Get team analytics

GET/api/analytics/team

The Stats page's Moderation tab: is moderation keeping up, and is the team OK? Actions on people (instance kicks, warns, bans, removals, join requests turned away) and door work and admin (invites, approvals, unbans, role changes), counted apart and never added together, from daily totals. The caller's own numbers (you, by their linked VRChat account) beside the team's middle (middle, left out below four active moderators). Each moderator's own numbers (moderators) and who left an instance last (coverageGaps[].lastModerator) need ViewAuditLog as well; without it canSeeEachModerator is false, moderators is empty and lastModerator is null.

Coverage gaps are stretches when people were in a group instance and no moderator was, from the companion's presence reports. A moderator is present when a paired client is reporting from the instance or when somebody recognised as a moderator (holds a role with moderation permissions, or has taken a moderation action) is seen there. Moderators without the client are not seen at all. cover lays them over the hours of the week (168 buckets, Monday 00:00 UTC first): hours when a group instance held at least people people by VRChat's head count, those a gap overlapped, and those no companion reported from. people defaults to the saved setting.

waits gives the middle wait of join requests (request to approval or rejection), AutoMod flags (flagged to dismissed or confirmed) and reviews (opened to closed), over the decisions made in the range. actedOnAgain counts people acted on who had been acted on within 30 days before; bansLifted counts the bans in the range, those at least 30 days old (oldEnough) and how many of those were lifted within 30 days, and the reasons given on case files lifted in the range.

Needs the ViewAnalytics permission.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Query Parameters

days?integer
Formatint32
all?boolean
from?string
Formatdate
to?string
Formatdate
people?integer
Formatint32

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/analytics/team"
{  "from": "2019-08-24",  "to": "2019-08-24",  "today": null,  "kinds": [    {      "metric": "string",      "label": "string",      "group": "string"    }  ],  "canSeeEachModerator": true,  "you": null,  "moderators": [    {      "who": {        "platform": "string",        "id": "string",        "name": null      },      "onPeople": 0.1,      "doorAndAdmin": 0.1,      "byKind": {        "property1": 0.1,        "property2": 0.1      },      "daysActive": 0,      "onPeoplePerDay": null,      "usualPerDay": null,      "lastActiveDay": null    }  ],  "moderatorsActive": 0,  "middle": null,  "onPeoplePerDay": [    {      "day": "2019-08-24",      "value": 0.1    }  ],  "doorAndAdminPerDay": [    {      "day": "2019-08-24",      "value": 0.1    }  ],  "actionsPerDayByKind": [    {      "metric": "string",      "label": "string",      "total": 0.1,      "points": [        {          "day": "2019-08-24",          "value": 0.1        }      ]    }  ],  "coverageGaps": [    {      "worldId": "string",      "instanceId": "string",      "worldName": null,      "modbotInstanceId": null,      "instanceName": null,      "startedAt": "2019-08-24T14:15:22Z",      "endedAt": null,      "endedBy": "string",      "peopleWhenLastModeratorLeft": 0,      "lastModerator": null    }  ],  "cover": {    "people": 0,    "savedPeople": 0,    "busy": [      0    ],    "nobodyOn": [      0    ],    "notSeen": [      0    ]  },  "waits": [    {      "queue": "string",      "decided": 0,      "middleMinutes": null,      "middleMinutesPerDay": [        {          "day": "2019-08-24",          "value": 0.1        }      ]    }  ],  "actedOnAgain": {    "people": 0,    "again": 0,    "days": 0  },  "bansLifted": {    "bans": 0,    "oldEnough": 0,    "liftedWithin": 0,    "days": 0,    "reasons": [      {        "label": "string",        "count": 0      }    ],    "liftedWithoutReason": 0  },  "moderatorsRecognised": 0,  "instancesWatched": 0,  "instancesOpenedWithoutAnyWatch": 0,  "daysWithoutAuditLog": [    "2019-08-24"  ],  "coverage": {    "dailyTotalsFirstDay": null,    "dailyTotalsLastDay": null,    "dailyTotalsUpdatedAt": null,    "factFirstDay": null,    "factLastDay": null,    "retentionConfigured": true,    "moderationFactRetentionDays": 0,    "presenceFactRetentionDays": 0  },  "generatedAt": "2019-08-24T14:15:22Z"}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.