# org.cairnsproto.draft.listIssues

> Issues about a project: the project, its policy, one of its sites, or one of its stones. Newest first, each with its comments and the state its latest maintainer issueState gives it.

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

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

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)
- `site` (string): Limit to issues about this site key (hex) or a stone at it.
  - Constraints: minLength: 64, maxLength: 64
- `state` (string)
  - Constraints: maxLength: 32, knownValues: open | closed

### Output (application/json)

- `cursor` (string)
  - Constraints: maxLength: 512
- `issues` (array, required)
  - `items` (ref)
    - Reference: `#issueView`
- `project` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

## #issueView (`org.cairnsproto.draft.listIssues#issueView`)

Type: object

### Properties

- `author` (string · did, required)
- `comments` (array, required): Oldest first.
  - `items` (ref)
    - Reference: `#recordView`
- `issue` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `record` (unknown, required): The issue record as its author wrote it.
- `seenRound` (integer, required)
  - Constraints: minimum: 1
- `site` (string): The key (hex) of the site the issue is about: its site subject's, or the site of its stone subject. Absent for an issue about the project or its policy.
  - Constraints: minLength: 64, maxLength: 64
- `state` (string, required)
  - Constraints: maxLength: 32, knownValues: open | closed
- `stateRecord` (ref): The maintainer issueState that set the state. Absent while no maintainer has written one.
  - Reference: `com.atproto.repo.strongRef`

## #recordView (`org.cairnsproto.draft.listIssues#recordView`)

Type: object

### Properties

- `author` (string · did, required)
- `record` (unknown, required)
- `ref` (ref, required)
  - Reference: `com.atproto.repo.strongRef`
- `seenRound` (integer, required)
  - Constraints: minimum: 1

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "issueView": {
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "comments": {
          "description": "Oldest first.",
          "items": {
            "ref": "#recordView",
            "type": "ref"
          },
          "type": "array"
        },
        "issue": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "record": {
          "description": "The issue record as its author wrote it.",
          "type": "unknown"
        },
        "seenRound": {
          "minimum": 1,
          "type": "integer"
        },
        "site": {
          "description": "The key (hex) of the site the issue is about: its site subject's, or the site of its stone subject. Absent for an issue about the project or its policy.",
          "maxLength": 64,
          "minLength": 64,
          "type": "string"
        },
        "state": {
          "knownValues": [
            "open",
            "closed"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "stateRecord": {
          "description": "The maintainer issueState that set the state. Absent while no maintainer has written one.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        }
      },
      "required": [
        "issue",
        "author",
        "seenRound",
        "record",
        "state",
        "comments"
      ],
      "type": "object"
    },
    "main": {
      "description": "Issues about a project: the project, its policy, one of its sites, or one of its stones. Newest first, each with its comments and the state its latest maintainer issueState gives it.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "maxLength": 512,
              "type": "string"
            },
            "issues": {
              "items": {
                "ref": "#issueView",
                "type": "ref"
              },
              "type": "array"
            },
            "project": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          },
          "required": [
            "project",
            "issues"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "maxLength": 512,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "project": {
            "format": "at-uri",
            "type": "string"
          },
          "site": {
            "description": "Limit to issues about this site key (hex) or a stone at it.",
            "maxLength": 64,
            "minLength": 64,
            "type": "string"
          },
          "state": {
            "knownValues": [
              "open",
              "closed"
            ],
            "maxLength": 32,
            "type": "string"
          }
        },
        "required": [
          "project"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "recordView": {
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "record": {
          "type": "unknown"
        },
        "ref": {
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "seenRound": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "ref",
        "author",
        "seenRound",
        "record"
      ],
      "type": "object"
    }
  },
  "id": "org.cairnsproto.draft.listIssues",
  "lexicon": 1
}
```
