# fyi.opensocial.listSpaceRecords

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listSpaceRecords)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listSpaceRecords/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.listSpaceRecords/examples)

## Definitions

### `fyi.opensocial.listSpaceRecords`

**Type**: `query`

Records in one of a group's content spaces, from the host's index of it: one collection or every collection, newest first, a page at a time. Only for those the space's own access record lets read, checked on every call, with service auth.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `collection` | `string` (nsid) | No |  |
| `cursor` | `string` | No | From the last page: continues with older records. |
| `equals` | `string` | No |  |
| `field` | `string` | No | Only records whose field (a name or a dotted path, like subject.uri) equals `equals`. |
| `group` | `string` (did) | Yes |  |
| `limit` | `integer` | No |  |
| `space` | `string` | Yes | The space's URI. |
| `uri` | `string` (at-uri) | No | One record in the space, by its URI. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `records` | `array` | Yes |  |
| `rev` | `string` | No | Where the index has got to in the space: a reader that saw this revision has seen everything up to it. |

#### Errors

- **NotFound**
- **NotAuthorized**

### `fyi.opensocial.listSpaceRecords#spaceRecord`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `repo` | `string` (did) | Yes |  |
| `uri` | `string` | Yes |  |
| `value` | `unknown` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Records in one of a group's content spaces, from the host's index of it: one collection or every collection, newest first, a page at a time. Only for those the space's own access record lets read, checked on every call, with service auth.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "NotAuthorized"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "records": {
              "items": {
                "ref": "#spaceRecord",
                "type": "ref"
              },
              "type": "array"
            },
            "rev": {
              "description": "Where the index has got to in the space: a reader that saw this revision has seen everything up to it.",
              "type": "string"
            }
          },
          "required": [
            "records"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "format": "nsid",
            "type": "string"
          },
          "cursor": {
            "description": "From the last page: continues with older records.",
            "type": "string"
          },
          "equals": {
            "maxLength": 2048,
            "type": "string"
          },
          "field": {
            "description": "Only records whose field (a name or a dotted path, like subject.uri) equals `equals`.",
            "maxLength": 128,
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "space": {
            "description": "The space's URI.",
            "type": "string"
          },
          "uri": {
            "description": "One record in the space, by its URI.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "group",
          "space"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "spaceRecord": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "repo": {
          "format": "did",
          "type": "string"
        },
        "uri": {
          "type": "string"
        },
        "value": {
          "type": "unknown"
        }
      },
      "required": [
        "uri",
        "cid",
        "repo",
        "value",
        "createdAt"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.listSpaceRecords",
  "lexicon": 1
}
```
