# computer.localnetwork.directory.getStats

> Directory totals, plus the genres and cities of active projects, most common first.

- Kind: query
- Authority: directory.localnetwork.computer
- Lexicon: 1
- Published by [localnetwork.computer](https://lexicon.garden/identity/did:plc:d42l64gsczg6qh2vo243xv5l), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getStats)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getStats/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:d42l64gsczg6qh2vo243xv5l/computer.localnetwork.directory.getStats/analytics)

## Query (`computer.localnetwork.directory.getStats`)

Type: query · GET

### Output (application/json)

- `active` (integer, required)
  - Constraints: minimum: 0
- `cities` (array, required)
  - `items` (ref)
    - Reference: `computer.localnetwork.directory.defs#place`
- `cityCount` (integer, required): Distinct cities across every project.
  - Constraints: minimum: 0
- `genres` (array, required)
  - `items` (ref)
    - Reference: `computer.localnetwork.directory.defs#facet`
- `total` (integer, required)
  - Constraints: minimum: 0
- `unclaimed` (integer, required): Projects nobody manages yet, in any status.
  - Constraints: minimum: 0

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Directory totals, plus the genres and cities of active projects, most common first.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "active": {
              "minimum": 0,
              "type": "integer"
            },
            "cities": {
              "items": {
                "ref": "computer.localnetwork.directory.defs#place",
                "type": "ref"
              },
              "type": "array"
            },
            "cityCount": {
              "description": "Distinct cities across every project.",
              "minimum": 0,
              "type": "integer"
            },
            "genres": {
              "items": {
                "ref": "computer.localnetwork.directory.defs#facet",
                "type": "ref"
              },
              "type": "array"
            },
            "total": {
              "minimum": 0,
              "type": "integer"
            },
            "unclaimed": {
              "description": "Projects nobody manages yet, in any status.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "total",
            "active",
            "unclaimed",
            "cityCount",
            "genres",
            "cities"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "computer.localnetwork.directory.getStats",
  "lexicon": 1
}
```
