tools.ozone.report.closeReports

Close eligible reports on a subject matching the given criteria, optionally linking an existing moderation action. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId. Reports whose current status does not permit a transition to closed are skipped silently.

Details · procedure
Kindprocedure
Authorityreport.ozone.tools
Commit rev3n2oxkytspk24
Indexed

Showing version bafyreicehpycckcxpgdewn2paunik573nbgtr76wehrgfxemz6to75qhre. Show the latest

cid bafyreicehpycckcxpgdewn2paunik573nbgtr76wehrgfxemz6to75qhre

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.excludedReportTypes.itemsNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.input.schema.properties.internalNoteNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.input.schema.properties.reportTypes.itemsNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Close eligible reports on a subject matching the given criteria, optionally linking an existing moderation action. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId. Reports whose current status does not permit a transition to closed are skipped silently.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "actionEventId": {
              "description": "Optional existing moderation event that closes reports. It must target the exact subject or its owning account; account-wide closure requires an account event. The event is linked to each closed report and may predate the report. The link does not imply the action is still in effect.",
              "minimum": 1,
              "type": "integer"
            },
            "excludedReportTypes": {
              "description": "Reports of these types (fully qualified reason NSIDs) are excluded from closure and left unchanged. When omitted or empty, no report types are excluded.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "includeAllOwned": {
              "default": false,
              "description": "If true, also close reports on all subjects owned by the account, including records, messages, and conversations. Only valid when subject is an account DID.",
              "type": "boolean"
            },
            "internalNote": {
              "description": "Optional moderator-only note recorded on each close activity. Not visible to reporters.",
              "type": "string"
            },
            "isAutomated": {
              "default": false,
              "description": "Set true when this action is triggered by an automated process. Defaults to false.",
              "type": "boolean"
            },
            "meta": {
              "description": "Optional metadata for the report activities. Lifecycle and resolution fields are controlled by the service.",
              "type": "unknown"
            },
            "reportId": {
              "description": "An explicitly targeted report in the requested subject scope. It is included even if assigned, escalated, or not in reportTypes; excludedReportTypes still applies.",
              "minimum": 1,
              "type": "integer"
            },
            "reportTypes": {
              "description": "If nonempty, eligible reports of the given report types (fully qualified reason NSIDs) are closed, in addition to reportId. When omitted or empty, all eligible reports in the requested subject scope are targeted, except excludedReportTypes. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "subject": {
              "description": "Subject DID (account-level reports) or AT-URI (record-level reports) whose reports should be closed.",
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "subject"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "closedCount": {
              "description": "Number of reports that were transitioned to closed.",
              "type": "integer"
            },
            "reportIds": {
              "description": "IDs of the reports that were closed.",
              "items": {
                "type": "integer"
              },
              "type": "array"
            }
          },
          "required": [
            "closedCount",
            "reportIds"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.report.closeReports",
  "lexicon": 1
}