# pub.chive.admin.listPDSes

> 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.listPDSes)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.listPDSes/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.admin.listPDSes/examples)

## Definitions

### `pub.chive.admin.listPDSes`

**Type**: `query`

List known PDSes and their statistics

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No | Maximum number of results |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `stats` | `ref` → `#pdsStats` | No | PDS statistics |

#### Errors

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

### `pub.chive.admin.listPDSes#pdsInfo`

**Type**: `object`

Information about a single PDS

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `url` | `string` | Yes | PDS URL |
| `status` | `string` | Yes | Health status |
| `lastScan` | `string` (datetime) | No | Last scan timestamp |
| `errorCount` | `integer` | No | Total errors encountered |
| `recordCount` | `integer` | No | Number of indexed records |
| `consecutiveErrors` | `integer` | No | Consecutive error count |

### `pub.chive.admin.listPDSes#pdsStats`

**Type**: `object`

PDS registry statistics

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `items` | `array` | Yes | Individual PDS entries |
| `total` | `integer` | Yes | Total known PDSes |
| `healthy` | `integer` | No | Number of healthy PDSes |
| `unhealthy` | `integer` | No | Number of unhealthy PDSes |
| `withRecords` | `integer` | No | PDSes with indexed records |

## Raw Schema

```json
{
  "id": "pub.chive.admin.listPDSes",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthenticationRequired"
        },
        {
          "name": "AdminRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "properties": {
            "stats": {
              "ref": "#pdsStats",
              "type": "ref",
              "description": "PDS statistics"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum number of results"
          }
        }
      },
      "description": "List known PDSes and their statistics"
    },
    "pdsInfo": {
      "type": "object",
      "required": [
        "url",
        "status"
      ],
      "properties": {
        "url": {
          "type": "string",
          "description": "PDS URL"
        },
        "status": {
          "type": "string",
          "description": "Health status",
          "knownValues": [
            "healthy",
            "unhealthy",
            "unknown"
          ]
        },
        "lastScan": {
          "type": "string",
          "format": "datetime",
          "description": "Last scan timestamp"
        },
        "errorCount": {
          "type": "integer",
          "description": "Total errors encountered"
        },
        "recordCount": {
          "type": "integer",
          "description": "Number of indexed records"
        },
        "consecutiveErrors": {
          "type": "integer",
          "description": "Consecutive error count"
        }
      },
      "description": "Information about a single PDS"
    },
    "pdsStats": {
      "type": "object",
      "required": [
        "total",
        "items"
      ],
      "properties": {
        "items": {
          "type": "array",
          "items": {
            "ref": "#pdsInfo",
            "type": "ref"
          },
          "description": "Individual PDS entries"
        },
        "total": {
          "type": "integer",
          "description": "Total known PDSes"
        },
        "healthy": {
          "type": "integer",
          "description": "Number of healthy PDSes"
        },
        "unhealthy": {
          "type": "integer",
          "description": "Number of unhealthy PDSes"
        },
        "withRecords": {
          "type": "integer",
          "description": "PDSes with indexed records"
        }
      },
      "description": "PDS registry statistics"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
