tools.ozone.moderation.emitEvents
Take a moderation action on multiple subjects at once. Each subject is processed independently; failures are listed in failedEvents. Only the listed event types are supported.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | moderation.ozone.tools |
| Commit rev | 3n2oxkx5s7z2n |
| Indexed |
Checks
Validunlimited-stringdefs.failedEvent.properties.errorNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.failedEvent.properties.errorNameNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.subjectEntry.properties.externalIdNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"failedEvent": {
"description": "An event that failed to process.",
"properties": {
"error": {
"description": "Error message describing the reason for failure.",
"type": "string"
},
"errorName": {
"description": "Typed error identifier for programmatic handling. Omitted when the error is unexpected/uncategorized.",
"knownValues": [
"InvalidSubject",
"SubjectHasAction",
"AlreadyTakendown",
"NotTakendown",
"DuplicateExternalId",
"InvalidConfiguration",
"InvalidRequest"
],
"type": "string"
},
"subject": {
"description": "The subject from the failed event input.",
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
],
"type": "union"
}
},
"required": [
"error",
"subject"
],
"type": "object"
},
"main": {
"description": "Take a moderation action on multiple subjects at once. Each subject is processed independently; failures are listed in failedEvents. Only the listed event types are supported.",
"errors": [
{
"description": "One or more labels contain invalid characters.",
"name": "InvalidLabel"
},
{
"description": "The subjects array contains duplicate entries.",
"name": "DuplicateSubjects"
},
{
"description": "The subjects array is empty.",
"name": "EmptySubjects"
},
{
"description": "The event type is not supported by this bulk endpoint.",
"name": "UnsupportedEvent"
}
],
"input": {
"encoding": "application/json",
"schema": {
"properties": {
"createdBy": {
"format": "did",
"type": "string"
},
"event": {
"refs": [
"tools.ozone.moderation.defs#modEventTakedown",
"tools.ozone.moderation.defs#modEventAcknowledge",
"tools.ozone.moderation.defs#modEventLabel",
"tools.ozone.moderation.defs#modEventReport",
"tools.ozone.moderation.defs#modEventReverseTakedown",
"tools.ozone.moderation.defs#modEventResolveAppeal",
"tools.ozone.moderation.defs#modEventEmail",
"tools.ozone.moderation.defs#modEventTag",
"tools.ozone.moderation.defs#revokeAccountCredentialsEvent"
],
"type": "union"
},
"modTool": {
"ref": "tools.ozone.moderation.defs#modTool",
"type": "ref"
},
"subjects": {
"description": "Array of subjects to apply the moderation event to.",
"items": {
"ref": "#subjectEntry",
"type": "ref"
},
"maxLength": 100,
"type": "array"
}
},
"required": [
"event",
"subjects",
"createdBy"
],
"type": "object"
}
},
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"events": {
"description": "Successfully processed moderation events.",
"items": {
"ref": "tools.ozone.moderation.defs#modEventView",
"type": "ref"
},
"type": "array"
},
"failedEvents": {
"description": "Events that failed to process.",
"items": {
"ref": "#failedEvent",
"type": "ref"
},
"type": "array"
}
},
"required": [
"events",
"failedEvents"
],
"type": "object"
}
},
"type": "procedure"
},
"subjectEntry": {
"description": "A subject with optional blob CIDs, external event ID, and report-level targeting. Report targeting applies only to this entry.",
"properties": {
"externalId": {
"description": "Deduplicate events of this type for this subject using an external ID.",
"type": "string"
},
"reportAction": {
"description": "Optional report-level targeting for this subject. Links the event to matching reports and may notify reporters.",
"ref": "tools.ozone.moderation.emitEvent#reportAction",
"type": "ref"
},
"subject": {
"refs": [
"com.atproto.admin.defs#repoRef",
"com.atproto.repo.strongRef"
],
"type": "union"
},
"subjectBlobCids": {
"items": {
"format": "cid",
"type": "string"
},
"type": "array"
}
},
"required": [
"subject"
],
"type": "object"
}
},
"id": "tools.ozone.moderation.emitEvents",
"lexicon": 1
}