# tools.ozone.queue.routeReports

> Route reports within an ID range to matching queues based.

- Kind: procedure
- Authority: queue.ozone.tools
- Lexicon: 1
- Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.queue.routeReports)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.queue.routeReports/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.queue.routeReports/analytics)

## Procedure (`tools.ozone.queue.routeReports`)

Type: procedure · POST

### Input (application/json)

- `endReportId` (integer, required): End of report ID range (inclusive). Difference between start and end must be less than 5,000.
- `startReportId` (integer, required): Start of report ID range (inclusive).

### Output (application/json)

- `assigned` (integer, required): The number of reports assigned to a queue.
- `unmatched` (integer, required): The number of reports with no matching queue.

### Errors

- `OutOfRange`: The request is invalid, such as missing required fields or invalid field values.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Route reports within an ID range to matching queues based.",
      "errors": [
        {
          "description": "The request is invalid, such as missing required fields or invalid field values.",
          "name": "OutOfRange"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "endReportId": {
              "description": "End of report ID range (inclusive). Difference between start and end must be less than 5,000.",
              "type": "integer"
            },
            "startReportId": {
              "description": "Start of report ID range (inclusive).",
              "type": "integer"
            }
          },
          "required": [
            "startReportId",
            "endReportId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "assigned": {
              "description": "The number of reports assigned to a queue.",
              "type": "integer"
            },
            "unmatched": {
              "description": "The number of reports with no matching queue.",
              "type": "integer"
            }
          },
          "required": [
            "assigned",
            "unmatched"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.queue.routeReports",
  "lexicon": 1
}
```
