{
  "lexicon": 1,
  "id": "tools.ozone.report.reassignQueue",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Manually reassign a report to a different queue (or unassign it). Records a queueActivity entry on the report.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["reportId", "queueId"],
          "properties": {
            "reportId": {
              "type": "integer",
              "description": "ID of the report to reassign"
            },
            "queueId": {
              "type": "integer",
              "description": "Target queue ID. Use -1 to unassign from any queue."
            },
            "comment": {
              "type": "string",
              "description": "Optional moderator-only note recorded on the resulting queueActivity as internalNote."
            }
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["report"],
          "properties": {
            "report": {
              "type": "ref",
              "ref": "tools.ozone.report.defs#reportView"
            }
          }
        }
      },
      "errors": [
        {
          "name": "ReportNotFound",
          "description": "No report exists with the given reportId"
        },
        {
          "name": "ReportClosed",
          "description": "The report is closed and cannot be reassigned"
        },
        {
          "name": "AlreadyInTargetQueue",
          "description": "The report is already assigned to the target queue"
        },
        {
          "name": "QueueNotFound",
          "description": "No active queue exists with the given queueId"
        },
        {
          "name": "QueueDisabled",
          "description": "The target queue is disabled and cannot receive new assignments"
        }
      ]
    }
  }
}

