# tools.ozone.report.queryReports

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.queryReports)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.queryReports/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.report.queryReports/examples)

## Definitions

### `tools.ozone.report.queryReports`

**Type**: `query`

View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `assignedTo` | `string` (did) | No | Filter by the DID of the moderator permanently assigned to the report. |
| `collections` | `array` | No | If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored. |
| `cursor` | `string` | No |  |
| `did` | `string` (did) | No | Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects. |
| `isMuted` | `boolean` | No | Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false. |
| `limit` | `integer` | No |  |
| `queueId` | `integer` | No | Filter by queue ID. Use -1 for unassigned reports. |
| `reportTypes` | `array` | No | Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>). |
| `reportedAfter` | `string` (datetime) | No | Retrieve reports created after a given timestamp |
| `reportedBefore` | `string` (datetime) | No | Retrieve reports created before a given timestamp |
| `sortDirection` | `string` | No |  |
| `sortField` | `string` | No |  |
| `status` | `string` | Yes | Filter by report status. |
| `subject` | `string` (uri) | No | Filter by subject DID or AT-URI. |
| `subjectType` | `string` | No | If specified, reports of the given subject type will be returned. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `reports` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "View moderation reports. Reports are individual instances of content being reported, as opposed to subject statuses which aggregate reports at the subject level.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "reports": {
              "items": {
                "ref": "tools.ozone.report.defs#reportView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "reports"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "assignedTo": {
            "description": "Filter by the DID of the moderator permanently assigned to the report.",
            "format": "did",
            "type": "string"
          },
          "collections": {
            "description": "If specified, reports where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.",
            "items": {
              "format": "nsid",
              "type": "string"
            },
            "maxLength": 20,
            "type": "array"
          },
          "cursor": {
            "type": "string"
          },
          "did": {
            "description": "Filter to reports where the subject is this DID or any record owned by this DID. Unlike `subject` (which scopes to a specific account or record), this returns all reports tied to the DID across both account-level and record-level subjects.",
            "format": "did",
            "type": "string"
          },
          "isMuted": {
            "default": false,
            "description": "Filter by muted status. true returns only muted reports, false returns only unmuted reports. Defaults to false.",
            "type": "boolean"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "queueId": {
            "description": "Filter by queue ID. Use -1 for unassigned reports.",
            "type": "integer"
          },
          "reportTypes": {
            "description": "Filter by report types (fully qualified string in the format of com.atproto.moderation.defs#reason<name>).",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reportedAfter": {
            "description": "Retrieve reports created after a given timestamp",
            "format": "datetime",
            "type": "string"
          },
          "reportedBefore": {
            "description": "Retrieve reports created before a given timestamp",
            "format": "datetime",
            "type": "string"
          },
          "sortDirection": {
            "default": "desc",
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string"
          },
          "sortField": {
            "default": "createdAt",
            "enum": [
              "createdAt",
              "updatedAt"
            ],
            "type": "string"
          },
          "status": {
            "description": "Filter by report status.",
            "knownValues": [
              "open",
              "closed",
              "escalated",
              "queued",
              "assigned"
            ],
            "type": "string"
          },
          "subject": {
            "description": "Filter by subject DID or AT-URI.",
            "format": "uri",
            "type": "string"
          },
          "subjectType": {
            "description": "If specified, reports of the given subject type will be returned.",
            "knownValues": [
              "account",
              "record",
              "message",
              "conversation"
            ],
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "tools.ozone.report.queryReports",
  "lexicon": 1
}
```
