# us.off-the-clock.listSpaceRecords

> The visible records of one collection in one community space, newest first or by start time from now.

- Kind: query
- Authority: off-the-clock.us
- Lexicon: 1
- Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listSpaceRecords)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listSpaceRecords/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listSpaceRecords/analytics)

## Query (`us.off-the-clock.listSpaceRecords`)

Type: query · GET

### Parameters (query string)

- `collection` (string · nsid, required)
- `cursor` (string)
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50
- `since` (string · datetime): With sort=startsAt and until: the start of a range. Records whose span from startsAt to endsAt touches [since, until) are answered.
- `sort` (string)
  - Constraints: maxLength: 64, default: "newest", knownValues: newest | startsAt
- `space` (string): A pair's TID; the default pair by default.
  - Constraints: maxLength: 512
- `until` (string · datetime): With sort=startsAt and since: the end of the range, exclusive.

### Output (application/json)

- `cursor` (string)
- `items` (array, required)
  - `items` (union)
    - One of: `us.off-the-clock.defs#postView`, `us.off-the-clock.defs#eventView`, `us.off-the-clock.defs#rsvpView`, `us.off-the-clock.defs#profileView`, `us.off-the-clock.defs#recordView`, `us.off-the-clock.defs#bookmarkView`, `us.off-the-clock.defs#documentView`, `us.off-the-clock.defs#listingView`, `us.off-the-clock.defs#reviewView`, `us.off-the-clock.polls.pollView`

### Errors

- `InvalidRequest`: No description in schema.
- `NotSpaceMember`: No description in schema.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "The visible records of one collection in one community space, newest first or by start time from now.",
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "NotSpaceMember"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "items": {
              "items": {
                "refs": [
                  "us.off-the-clock.defs#postView",
                  "us.off-the-clock.defs#eventView",
                  "us.off-the-clock.defs#rsvpView",
                  "us.off-the-clock.defs#profileView",
                  "us.off-the-clock.defs#recordView",
                  "us.off-the-clock.defs#bookmarkView",
                  "us.off-the-clock.defs#documentView",
                  "us.off-the-clock.defs#listingView",
                  "us.off-the-clock.defs#reviewView",
                  "us.off-the-clock.polls.pollView"
                ],
                "type": "union"
              },
              "type": "array"
            }
          },
          "required": [
            "items"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "since": {
            "description": "With sort=startsAt and until: the start of a range. Records whose span from startsAt to endsAt touches [since, until) are answered.",
            "format": "datetime",
            "type": "string"
          },
          "sort": {
            "default": "newest",
            "knownValues": [
              "newest",
              "startsAt"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "space": {
            "description": "A pair's TID; the default pair by default.",
            "maxLength": 512,
            "type": "string"
          },
          "until": {
            "description": "With sort=startsAt and since: the end of the range, exclusive.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "collection"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "us.off-the-clock.listSpaceRecords",
  "lexicon": 1
}
```
