# dev.knotless.getRepoStorage

> What a repository's packs take up on its owner's PDS, as `knotless repo storage` counts them: counted again only once a write to the repository's packs, claims or refs is seen (for a private one, once a sync of its space finds a write there), or compaction from these pages folds them. Apart from dev.knotless.getRepoSettings, as counting reads every pack record from the PDS.

- 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.getRepoStorage)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getRepoStorage/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getRepoStorage/analytics)

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

Type: query · GET

### Parameters (query string)

- `repo` (string · at-uri, required): The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.

### Output (application/json)

- `schema` (ref)
  - Reference: `dev.knotless.getRepoSettings#storageView`

### Errors

- `NotFound`: No such repository.
- `UpstreamFailure`: Its owner's PDS could not be read.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "What a repository's packs take up on its owner's PDS, as `knotless repo storage` counts them: counted again only once a write to the repository's packs, claims or refs is seen (for a private one, once a sync of its space finds a write there), or compaction from these pages folds them. Apart from dev.knotless.getRepoSettings, as counting reads every pack record from the PDS.",
      "errors": [
        {
          "description": "No such repository.",
          "name": "NotFound"
        },
        {
          "description": "Its owner's PDS could not be read.",
          "name": "UpstreamFailure"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "dev.knotless.getRepoSettings#storageView",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "repo": {
            "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "What a repository takes up on its owner's PDS.",
  "id": "dev.knotless.getRepoStorage",
  "lexicon": 1
}
```
