# org.cairnsproto.draft.getInputs

> Everything a client needs to recompute a project's reading itself: every input record with its value, the beacons its draw claims used, the epoch each author was first seen in, and the labels of the policy's labelers. A client can drop records before reading, such as stones from sponsors it blocks, without telling the indexer.

- 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.getInputs)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.getInputs/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:np7ezqujtsry4bkogisaabul/org.cairnsproto.draft.getInputs/analytics)

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

Type: query · GET

### Parameters (query string)

- `project` (string · at-uri, required)

### Output (application/json)

- `beacons` (array, required)
  - `items` (ref)
    - Reference: `org.cairnsproto.draft.getReading#beacon`
- `epoch` (integer, required): The indexer's current epoch.
  - Constraints: minimum: 0
- `firstEpochs` (array, required)
  - `items` (ref)
    - Reference: `#firstEpoch`
- `labels` (array): Every label from the labelers the policy lists, for the reading to evaluate as of its time.
  - `items` (ref)
    - Reference: `#label`
- `policy` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `project` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `records` (array, required)
  - `items` (ref)
    - Reference: `#record`
- `sources` (array): Every source record, from any author, whose hash is one of the project's scope sources or a source its stones' sites trace back to, ordered by URI. The hash is the source's identity and records with the same hash are interchangeable metadata, such as URLs and a MIME type. They are not reading inputs and are not in the input root.
  - `items` (ref)
    - Reference: `#record`
- `tombstones` (array): The project's stones deleted from their repos: CID and site key only, with no URI, author or payload. A reading counts each as withdrawn and adds it to the input root.
  - `items` (ref)
    - Reference: `#tombstone`

## #firstEpoch (`org.cairnsproto.draft.getInputs#firstEpoch`)

Type: object

### Properties

- `did` (string · did, required)
- `epoch` (integer, required)
  - Constraints: minimum: 0

## #label (`org.cairnsproto.draft.getInputs#label`)

Type: object

An ATProto label as its labeler published it.

### Properties

- `cid` (string · cid)
- `cts` (string · datetime)
- `exp` (string · datetime)
- `neg` (boolean)
- `src` (string · did, required)
- `uri` (string · uri, required)
- `val` (string, required)
  - Constraints: maxLength: 128

## #record (`org.cairnsproto.draft.getInputs#record`)

Type: object

### Properties

- `cid` (string · cid, required)
- `seenEpoch` (integer, required)
  - Constraints: minimum: 0
- `uri` (string · at-uri, required)
- `value` (unknown, required)

## #tombstone (`org.cairnsproto.draft.getInputs#tombstone`)

Type: object

### Properties

- `cid` (string · cid, required)
- `site` (ref, required)
  - Reference: `org.cairnsproto.draft.defs#hash`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "firstEpoch": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "epoch": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "did",
        "epoch"
      ],
      "type": "object"
    },
    "label": {
      "description": "An ATProto label as its labeler published it.",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "cts": {
          "format": "datetime",
          "type": "string"
        },
        "exp": {
          "format": "datetime",
          "type": "string"
        },
        "neg": {
          "type": "boolean"
        },
        "src": {
          "format": "did",
          "type": "string"
        },
        "uri": {
          "format": "uri",
          "type": "string"
        },
        "val": {
          "maxLength": 128,
          "type": "string"
        }
      },
      "required": [
        "src",
        "uri",
        "val"
      ],
      "type": "object"
    },
    "main": {
      "description": "Everything a client needs to recompute a project's reading itself: every input record with its value, the beacons its draw claims used, the epoch each author was first seen in, and the labels of the policy's labelers. A client can drop records before reading, such as stones from sponsors it blocks, without telling the indexer.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "beacons": {
              "items": {
                "ref": "org.cairnsproto.draft.getReading#beacon",
                "type": "ref"
              },
              "type": "array"
            },
            "epoch": {
              "description": "The indexer's current epoch.",
              "minimum": 0,
              "type": "integer"
            },
            "firstEpochs": {
              "items": {
                "ref": "#firstEpoch",
                "type": "ref"
              },
              "type": "array"
            },
            "labels": {
              "description": "Every label from the labelers the policy lists, for the reading to evaluate as of its time.",
              "items": {
                "ref": "#label",
                "type": "ref"
              },
              "type": "array"
            },
            "policy": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "project": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "records": {
              "items": {
                "ref": "#record",
                "type": "ref"
              },
              "type": "array"
            },
            "sources": {
              "description": "Every source record, from any author, whose hash is one of the project's scope sources or a source its stones' sites trace back to, ordered by URI. The hash is the source's identity and records with the same hash are interchangeable metadata, such as URLs and a MIME type. They are not reading inputs and are not in the input root.",
              "items": {
                "ref": "#record",
                "type": "ref"
              },
              "type": "array"
            },
            "tombstones": {
              "description": "The project's stones deleted from their repos: CID and site key only, with no URI, author or payload. A reading counts each as withdrawn and adds it to the input root.",
              "items": {
                "ref": "#tombstone",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "project",
            "policy",
            "epoch",
            "records",
            "beacons",
            "firstEpochs"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "project": {
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "project"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "record": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "seenEpoch": {
          "minimum": 0,
          "type": "integer"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "value": {
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "seenEpoch",
        "value"
      ],
      "type": "object"
    },
    "tombstone": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "site": {
          "ref": "org.cairnsproto.draft.defs#hash",
          "type": "ref"
        }
      },
      "required": [
        "cid",
        "site"
      ],
      "type": "object"
    }
  },
  "id": "org.cairnsproto.draft.getInputs",
  "lexicon": 1
}
```
