# dev.knotless.getStats

> What an appview shows anyone of how it is used: the network as its index has it now, and each of the last 30 days, what the network wrote in it and how many people drew its pages (by a hash forgotten each day). Its operators read the rest with dev.knotless.getUsage.

- Kind: query
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getStats)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getStats/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getStats/analytics)

## Query (`dev.knotless.getStats`)

Type: query · GET

### Output (application/json)

- `days` (array, required): The last 30 days, oldest first, today (UTC) the last.
  - `items` (ref)
    - Reference: `#day`
- `network` (ref): Absent where the appview keeps no index.
  - Reference: `dev.knotless.getUsage#network`

## #day (`dev.knotless.getStats#day`)

Type: object

One day, in UTC, as anyone sees it.

### Properties

- `authors` (integer, required): Accounts that made a repository, pushed, or wrote in a thread.
  - Constraints: minimum: 0
- `checks` (integer, required): Check runs started.
  - Constraints: minimum: 0
- `comments` (integer, required)
  - Constraints: minimum: 0
- `day` (string, required): YYYY-MM-DD.
- `issues` (integer, required)
  - Constraints: minimum: 0
- `pulls` (integer, required)
  - Constraints: minimum: 0
- `pushes` (integer, required)
  - Constraints: minimum: 0
- `repos` (integer, required): Repositories made, from the index.
  - Constraints: minimum: 0
- `views` (integer, required): Pages they drew.
  - Constraints: minimum: 0
- `visitors` (integer, required): People whose browsers drew a page, each once.
  - Constraints: minimum: 0

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "day": {
      "description": "One day, in UTC, as anyone sees it.",
      "properties": {
        "authors": {
          "description": "Accounts that made a repository, pushed, or wrote in a thread.",
          "minimum": 0,
          "type": "integer"
        },
        "checks": {
          "description": "Check runs started.",
          "minimum": 0,
          "type": "integer"
        },
        "comments": {
          "minimum": 0,
          "type": "integer"
        },
        "day": {
          "description": "YYYY-MM-DD.",
          "type": "string"
        },
        "issues": {
          "minimum": 0,
          "type": "integer"
        },
        "pulls": {
          "minimum": 0,
          "type": "integer"
        },
        "pushes": {
          "minimum": 0,
          "type": "integer"
        },
        "repos": {
          "description": "Repositories made, from the index.",
          "minimum": 0,
          "type": "integer"
        },
        "views": {
          "description": "Pages they drew.",
          "minimum": 0,
          "type": "integer"
        },
        "visitors": {
          "description": "People whose browsers drew a page, each once.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "day",
        "visitors",
        "views",
        "repos",
        "pushes",
        "pulls",
        "issues",
        "comments",
        "checks",
        "authors"
      ],
      "type": "object"
    },
    "main": {
      "description": "What an appview shows anyone of how it is used: the network as its index has it now, and each of the last 30 days, what the network wrote in it and how many people drew its pages (by a hash forgotten each day). Its operators read the rest with dev.knotless.getUsage.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "days": {
              "description": "The last 30 days, oldest first, today (UTC) the last.",
              "items": {
                "ref": "#day",
                "type": "ref"
              },
              "type": "array"
            },
            "network": {
              "description": "Absent where the appview keeps no index.",
              "ref": "dev.knotless.getUsage#network",
              "type": "ref"
            }
          },
          "required": [
            "days"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "dev.knotless.getStats",
  "lexicon": 1
}
```
