# social.colibri.beta.polyfill.getRecord

> Reads one record from the requesting user's repo in a space the AppView hosts for them.

- 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.getRecord)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.getRecord/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.polyfill.getRecord/analytics)

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

Type: query · GET

### Parameters (query string)

- `collection` (string · nsid, required): The record's collection.
- `rkey` (string · record-key, required): The record key.
- `space` (string · space-ref, required): The space holding the repo.

### Output (application/json)

- `schema` (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.
- `RecordNotFound`: No record matches.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Reads one record from the requesting user's repo in a space the AppView hosts for them.",
      "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"
        },
        {
          "description": "No record matches.",
          "name": "RecordNotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "social.colibri.beta.polyfill.defs#recordView",
          "type": "ref"
        }
      },
      "parameters": {
        "properties": {
          "collection": {
            "description": "The record's collection.",
            "format": "nsid",
            "type": "string"
          },
          "rkey": {
            "description": "The record key.",
            "format": "record-key",
            "type": "string"
          },
          "space": {
            "description": "The space holding the repo.",
            "format": "space-ref",
            "type": "string"
          }
        },
        "required": [
          "space",
          "collection",
          "rkey"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.colibri.beta.polyfill.getRecord",
  "lexicon": 1
}
```
