# org.cairnsproto.draft.listSnapshots

> The snapshots a project's maintainers published, newest first by createdAt, each with the exports made from it and their merge state.

- Kind: query
- Authority: draft.cairnsproto.org
- Lexicon: 1
- Published by [cairnsproto.org](https://lexicon.garden/identity/did:plc:np7ezqujtsry4bkogisaabul), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.listSnapshots)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.listSnapshots/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.listSnapshots/analytics)

## Query (`org.cairnsproto.draft.listSnapshots`)

Type: query · GET

### Parameters (query string)

- `cursor` (string)
  - Constraints: maxLength: 512
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50
- `project` (string · at-uri, required)

### Output (application/json)

- `cursor` (string)
  - Constraints: maxLength: 512
- `project` (string · at-uri, required)
- `snapshots` (array, required)
  - `items` (ref)
    - Reference: `#snapshotView`

## #exportView (`org.cairnsproto.draft.listSnapshots#exportView`)

Type: object

### Properties

- `export` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `files` (integer, required): How many files the export lists.
  - Constraints: minimum: 0
- `merged` (ref): Set once an import result shows every exported file's hash at a branch head.
  - Reference: `#merged`
- `pr` (string · uri)
  - Constraints: maxLength: 2048
- `target` (unknown, required): The export record's target.

## #merged (`org.cairnsproto.draft.listSnapshots#merged`)

Type: object

### Properties

- `commit` (string, required)
  - Constraints: maxLength: 64
- `importResult` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## #snapshotView (`org.cairnsproto.draft.listSnapshots#snapshotView`)

Type: object

### Properties

- `author` (string · did, required)
- `createdAt` (string · datetime, required)
- `exports` (array, required)
  - `items` (ref)
    - Reference: `#exportView`
- `inputRoot` (ref, required)
  - Reference: `org.cairnsproto.draft.defs#hash`
- `policy` (ref)
  - Reference: `com.atproto.repo.strongRef`
- `previous` (ref)
  - Reference: `com.atproto.repo.strongRef`
- `readingImpl` (ref)
  - Reference: `org.cairnsproto.draft.snapshot#readingImpl`
- `seenRound` (integer, required): Quicknet round when the indexer first saw the snapshot.
  - Constraints: minimum: 1
- `seenThrough` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `snapshot` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "exportView": {
      "properties": {
        "export": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "files": {
          "description": "How many files the export lists.",
          "minimum": 0,
          "type": "integer"
        },
        "merged": {
          "description": "Set once an import result shows every exported file's hash at a branch head.",
          "ref": "#merged",
          "type": "ref"
        },
        "pr": {
          "format": "uri",
          "maxLength": 2048,
          "type": "string"
        },
        "target": {
          "description": "The export record's target.",
          "type": "unknown"
        }
      },
      "required": [
        "export",
        "target",
        "files"
      ],
      "type": "object"
    },
    "main": {
      "description": "The snapshots a project's maintainers published, newest first by createdAt, each with the exports made from it and their merge state.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "maxLength": 512,
              "type": "string"
            },
            "project": {
              "format": "at-uri",
              "type": "string"
            },
            "snapshots": {
              "items": {
                "ref": "#snapshotView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "project",
            "snapshots"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "maxLength": 512,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "project": {
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "project"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "merged": {
      "properties": {
        "commit": {
          "maxLength": 64,
          "type": "string"
        },
        "importResult": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "importResult",
        "commit"
      ],
      "type": "object"
    },
    "snapshotView": {
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "exports": {
          "items": {
            "ref": "#exportView",
            "type": "ref"
          },
          "type": "array"
        },
        "inputRoot": {
          "ref": "org.cairnsproto.draft.defs#hash",
          "type": "ref"
        },
        "policy": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "previous": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "readingImpl": {
          "ref": "org.cairnsproto.draft.snapshot#readingImpl",
          "type": "ref"
        },
        "seenRound": {
          "description": "Quicknet round when the indexer first saw the snapshot.",
          "minimum": 1,
          "type": "integer"
        },
        "seenThrough": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "snapshot": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "snapshot",
        "author",
        "createdAt",
        "seenThrough",
        "inputRoot",
        "seenRound",
        "exports"
      ],
      "type": "object"
    }
  },
  "id": "org.cairnsproto.draft.listSnapshots",
  "lexicon": 1
}
```
