# social.colibri.beta.polyfill.listRecords

> Lists records of one collection in the requesting user's repo in a space the AppView hosts for them, ordered by record key.

- Kind: query
- Authority: polyfill.beta.colibri.social
- Lexicon: 1
- Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.listRecords)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.listRecords/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.listRecords/analytics)

## Query (`social.colibri.beta.polyfill.listRecords`)

Type: query · GET

### Parameters (query string)

- `collection` (string · nsid, required): The record's collection.
- `cursor` (string): Where the next page starts.
- `limit` (integer): The page size.
  - Constraints: minimum: 1, maximum: 100, default: 50
- `reverse` (boolean): Newest record key first.
- `space` (string · space-ref, required): The space holding the repo.

### Output (application/json)

- `cursor` (string): Where the next page starts.
- `records` (array, required): The records on this page.
  - `items` (ref)
    - Reference: `social.colibri.beta.polyfill.defs#recordView`

### Errors

- `AuthRequired`: The request has no valid service auth.
- `InvalidRequest`: The arguments are inconsistent or malformed beyond schema validation.
- `SpaceNotFound`: No space matches the given space reference.
- `NotAuthorized`: The caller may not write to or read from this repo in the space.
- `RepoNotHosted`: The AppView does not host the caller's repo in this space, because it lives on the caller's PDS. Write to the PDS instead.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Lists records of one collection in the requesting user's repo in a space the AppView hosts for them, ordered by record key.",
      "errors": [
        {
          "description": "The request has no valid service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The arguments are inconsistent or malformed beyond schema validation.",
          "name": "InvalidRequest"
        },
        {
          "description": "No space matches the given space reference.",
          "name": "SpaceNotFound"
        },
        {
          "description": "The caller may not write to or read from this repo in the space.",
          "name": "NotAuthorized"
        },
        {
          "description": "The AppView does not host the caller's repo in this space, because it lives on the caller's PDS. Write to the PDS instead.",
          "name": "RepoNotHosted"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "description": "Where the next page starts.",
              "type": "string"
            },
            "records": {
              "description": "The records on this page.",
              "items": {
                "ref": "social.colibri.beta.polyfill.defs#recordView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "description": "The record's collection.",
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "description": "Where the next page starts.",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "description": "The page size.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "reverse": {
            "description": "Newest record key first.",
            "type": "boolean"
          },
          "space": {
            "description": "The space holding the repo.",
            "format": "space-ref",
            "type": "string"
          }
        },
        "required": [
          "space",
          "collection"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.colibri.beta.polyfill.listRecords",
  "lexicon": 1
}
```
