Skip to content

tools.ozone.moderation.queryEvents

Lexicon Version: 1

Type: query

List moderation events related to a subject.

Parameters:

NameTypeReq’dDescriptionConstraints
typesArray of stringThe types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent) to filter by. If not specified, all events are returned.
createdBystringFormat: did
sortDirectionstringSort direction for the events. Defaults to descending order of created at timestamp.Enum: asc, desc
Default: desc
createdAfterstringRetrieve events created after a given timestampFormat: datetime
createdBeforestringRetrieve events created before a given timestampFormat: datetime
subjectstringFormat: uri
collectionsArray of stringIf specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to ‘account’, this will be ignored.Max Items: 20
subjectTypestringIf specified, only events where the subject is of the given type (account or record) will be returned. When this is set to ‘account’ the ‘collections’ parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.Known Values: account, record
includeAllUserRecordsbooleanIf true, events on all record types (posts, lists, profile etc.) or records from given ‘collections’ param, owned by the did are returned.Default: false
limitintegerMin: 1
Max: 100
Default: 50
hasCommentbooleanIf true, only events with comments are returned
commentstringIf specified, only events with comments containing the keyword are returned. Apply
addedLabelsArray of stringIf specified, only events where all of these labels were added are returned
removedLabelsArray of stringIf specified, only events where all of these labels were removed are returned
addedTagsArray of stringIf specified, only events where all of these tags were added are returned
removedTagsArray of stringIf specified, only events where all of these tags were removed are returned
reportTypesArray of string
policiesArray of string
modToolArray of stringIf specified, only events where the modTool name matches any of the given values are returned
batchIdstringIf specified, only events where the batchId matches the given value are returned
ageAssuranceStatestringIf specified, only events where the age assurance state matches the given value are returnedKnown Values: pending, assured, unknown, reset, blocked
cursorstring
Output:
  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
cursorstring
eventsArray of tools.ozone.moderation.defs#modEventView

{
"lexicon": 1,
"id": "tools.ozone.moderation.queryEvents",
"defs": {
"main": {
"type": "query",
"description": "List moderation events related to a subject.",
"parameters": {
"type": "params",
"properties": {
"types": {
"type": "array",
"items": {
"type": "string"
},
"description": "The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned."
},
"createdBy": {
"type": "string",
"format": "did"
},
"sortDirection": {
"type": "string",
"default": "desc",
"enum": [
"asc",
"desc"
],
"description": "Sort direction for the events. Defaults to descending order of created at timestamp."
},
"createdAfter": {
"type": "string",
"format": "datetime",
"description": "Retrieve events created after a given timestamp"
},
"createdBefore": {
"type": "string",
"format": "datetime",
"description": "Retrieve events created before a given timestamp"
},
"subject": {
"type": "string",
"format": "uri"
},
"collections": {
"type": "array",
"maxLength": 20,
"description": "If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
"items": {
"type": "string",
"format": "nsid"
}
},
"subjectType": {
"type": "string",
"description": "If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.",
"knownValues": [
"account",
"record"
]
},
"includeAllUserRecords": {
"type": "boolean",
"default": false,
"description": "If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 50
},
"hasComment": {
"type": "boolean",
"description": "If true, only events with comments are returned"
},
"comment": {
"type": "string",
"description": "If specified, only events with comments containing the keyword are returned. Apply || separator to use multiple keywords and match using OR condition."
},
"addedLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "If specified, only events where all of these labels were added are returned"
},
"removedLabels": {
"type": "array",
"items": {
"type": "string"
},
"description": "If specified, only events where all of these labels were removed are returned"
},
"addedTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "If specified, only events where all of these tags were added are returned"
},
"removedTags": {
"type": "array",
"items": {
"type": "string"
},
"description": "If specified, only events where all of these tags were removed are returned"
},
"reportTypes": {
"type": "array",
"items": {
"type": "string"
}
},
"policies": {
"type": "array",
"items": {
"type": "string",
"description": "If specified, only events where the action policies match any of the given policies are returned"
}
},
"modTool": {
"type": "array",
"items": {
"type": "string"
},
"description": "If specified, only events where the modTool name matches any of the given values are returned"
},
"batchId": {
"type": "string",
"description": "If specified, only events where the batchId matches the given value are returned"
},
"ageAssuranceState": {
"type": "string",
"description": "If specified, only events where the age assurance state matches the given value are returned",
"knownValues": [
"pending",
"assured",
"unknown",
"reset",
"blocked"
]
},
"cursor": {
"type": "string"
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"events"
],
"properties": {
"cursor": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "ref",
"ref": "tools.ozone.moderation.defs#modEventView"
}
}
}
}
}
}
}
}