# pub.chive.admin.listWarnings

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.listWarnings)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.listWarnings/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.listWarnings/examples)

## Definitions

### `pub.chive.admin.listWarnings`

**Type**: `query`

List user warnings

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | No | Filter by user DID |
| `limit` | `integer` | No | Maximum number of warnings |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `total` | `integer` | Yes | Total warnings |
| `warnings` | `array` | Yes | Warning records |

#### Errors

- **AuthenticationRequired**
- **AdminRequired**

### `pub.chive.admin.listWarnings#warning`

**Type**: `object`

User warning record

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | Warning ID |
| `did` | `string` (did) | Yes | Warned user DID |
| `handle` | `string` | No | Warned user handle |
| `reason` | `string` | Yes | Reason for the warning |
| `issuedBy` | `string` (did) | Yes | Admin DID who issued the warning |
| `createdAt` | `string` (datetime) | Yes | When the warning was issued |
| `expiresAt` | `string` (datetime) | No | Warning expiry timestamp |

## Raw Schema

```json
{
  "id": "pub.chive.admin.listWarnings",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "AdminRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "warnings",
            "total"
          ],
          "properties": {
            "total": {
              "type": "integer",
              "description": "Total warnings"
            },
            "warnings": {
              "type": "array",
              "items": {
                "ref": "#warning",
                "type": "ref"
              },
              "description": "Warning records"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "did": {
            "type": "string",
            "format": "did",
            "description": "Filter by user DID"
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of warnings"
          }
        }
      },
      "description": "List user warnings"
    },
    "warning": {
      "type": "object",
      "required": [
        "id",
        "did",
        "reason",
        "issuedBy",
        "createdAt"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Warning ID"
        },
        "did": {
          "type": "string",
          "format": "did",
          "description": "Warned user DID"
        },
        "handle": {
          "type": "string",
          "description": "Warned user handle"
        },
        "reason": {
          "type": "string",
          "description": "Reason for the warning"
        },
        "issuedBy": {
          "type": "string",
          "format": "did",
          "description": "Admin DID who issued the warning"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the warning was issued"
        },
        "expiresAt": {
          "type": "string",
          "format": "datetime",
          "description": "Warning expiry timestamp"
        }
      },
      "description": "User warning record"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
