Modbot Docs

List audit log

GET/api/audit

The merged fact timeline: who did what to whom, and when. One log, discriminated by source (spec 5.9). ViewAuditLog covers moderation and membership history; ViewOperationalLog covers Modbot's own record — logins, settings changes, sync failures. The two are separate permissions and the filter is applied server-side on every query: asking for a type you cannot see omits it rather than refusing the request.

Facts carry occurredAt and, when the time is an inference rather than a statement, occurredBefore. precision says which, so a window is never rendered as an instant.

account is one Modbot account's whole history: facts about it — sign-ins, role changes, its password being reset — and facts it did, including every kick and ban pressed in Modbot. Both halves at once, because the log records the first against the subject and the second against the actor, and either alone is half the story. It narrows what you may already see: a caller with only ViewAuditLog gets the account's moderation actions, one with only ViewOperationalLog gets its sign-ins and role changes.

person is one person's whole history across every account Modbot can tie to the one named: facts about any of them and facts any of them did. personPlatform says which platform the id is on: VRChat (the default), Discord, or Modbot for a Modbot account id. Accounts are tied the way GET /api/people/lookup ties them, with your permissions: the linked Discord account needs ViewProfile and the Modbot account needs ViewOperationalLog or ManageUsers, and without them only the account you named is read.

show narrows to moderation (bans, kicks, warnings, turned-down requests, notes, case files, AutoMod and copied bans), presence (arrivals, leaves and avatars a companion saw) or discord (Discord's own log and every copy between the two platforms). Leave it out, or send everything, for all of it. GET /api/audit/filters lists which of the three each type is in.

notType leaves out the types it names, and can be combined with type.

world and instance narrow to one world or one VRChat instance number; category to Moderation or Operational; precision to Exact or Window; hasActor to facts somebody is named for, or not; q finds a word in the payload, the subject id or the actor id.

Paged by keyset. Send the returned next back as beforeOccurredAt + beforeId; both are required.

AuthorizationBearer <token>

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

In: header

Query Parameters

type?array<string>
notType?array<string>
source?array<string>
subject?string
subjectPlatform?string
actor?string
actorPlatform?string
account?string
Formatuuid
person?string
personPlatform?string
show?string
from?string
Formatdate-time
to?string
Formatdate-time
world?string
instance?string
category?string
precision?string
hasActor?boolean
search?string

Also accepted as q.

beforeOccurredAt?string
Formatdate-time
beforeId?integer
Formatint64
limit?integer
Formatint32

Response Body

application/json

application/problem+json

application/problem+json

curl -X GET "https://example.com/api/audit"
{  "entries": [    {      "id": 0,      "occurredAt": "2019-08-24T14:15:22Z",      "occurredBefore": null,      "observedAt": "2019-08-24T14:15:22Z",      "precision": "Exact",      "type": "string",      "typeRaw": null,      "category": "Moderation",      "source": "string",      "subjectPlatform": "string",      "subjectId": "string",      "subjectKind": "Person",      "subjectName": null,      "actorPlatform": null,      "actorId": null,      "actorName": null,      "worldId": null,      "worldName": null,      "instanceId": null,      "modbotInstanceId": null,      "instanceName": null,      "description": null,      "data": null,      "subjectTrustRank": null,      "actorTrustRank": null,      "linked": null,      "reportedBy": null,      "caseFileId": null,      "reviewId": null    }  ],  "next": null,  "coverage": {    "oldestFact": null,    "firstObservedAt": null,    "catchUpComplete": true  },  "now": "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.