# zone.stratos.space.getRecord

> Published by [lexicon.northsky.app](https://lexicon.garden/identity/did:plc:6uxgo3ypovauub7nblwylqyv)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:6uxgo3ypovauub7nblwylqyv/zone.stratos.space.getRecord)
- [Documentation](https://lexicon.garden/lexicon/did:plc:6uxgo3ypovauub7nblwylqyv/zone.stratos.space.getRecord/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:6uxgo3ypovauub7nblwylqyv/zone.stratos.space.getRecord/examples)

## Definitions

### `zone.stratos.space.getRecord`

**Type**: `query`

Get a single record from a permissioned space. Spec-shaped mirror of com.atproto.space.getRecord (atproto#5187): callable with standard user auth (the caller must be a member of the space) or with a space credential for that space (for syncing services). The record must belong to the requested space; records outside it - including records with no space at all - resolve to RecordNotFound (no existence leak).

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `repo` | `string` (did) | Yes | The DID of the account whose repo to read from. |
| `rkey` | `string` | Yes | The Record Key. |
| `space` | `string` | Yes | The space's at:// URI (at://{did}/space/{type}/{skey}). Mirrors the upstream space-ref string format (atproto#5187); declared as a plain string until @atproto/lexicon supports that format. Its space DID must equal this service's DID. |
| `collection` | `string` (nsid) | Yes | The NSID of the record collection. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `value` | `unknown` | Yes |  |

#### Errors

- **RecordNotFound**: The record does not exist in the requested space (or does not exist at all - indistinguishable by design).
- **UnknownSpace**: The requested space URI is malformed or its space DID does not match this service's DID.
- **AuthRequired**: The caller is not admitted to the requested space (not a member, or the presented credential targets a different space).

## Raw Schema

```json
{
  "id": "zone.stratos.space.getRecord",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "RecordNotFound",
          "description": "The record does not exist in the requested space (or does not exist at all - indistinguishable by design)."
        },
        {
          "name": "UnknownSpace",
          "description": "The requested space URI is malformed or its space DID does not match this service's DID."
        },
        {
          "name": "AuthRequired",
          "description": "The caller is not admitted to the requested space (not a member, or the presented credential targets a different space)."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "cid",
            "value"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid"
            },
            "uri": {
              "type": "string",
              "format": "at-uri"
            },
            "value": {
              "type": "unknown"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "space",
          "repo",
          "collection",
          "rkey"
        ],
        "properties": {
          "repo": {
            "type": "string",
            "format": "did",
            "description": "The DID of the account whose repo to read from."
          },
          "rkey": {
            "type": "string",
            "maxLength": 512,
            "description": "The Record Key."
          },
          "space": {
            "type": "string",
            "description": "The space's at:// URI (at://{did}/space/{type}/{skey}). Mirrors the upstream space-ref string format (atproto#5187); declared as a plain string until @atproto/lexicon supports that format. Its space DID must equal this service's DID."
          },
          "collection": {
            "type": "string",
            "format": "nsid",
            "description": "The NSID of the record collection."
          }
        }
      },
      "description": "Get a single record from a permissioned space. Spec-shaped mirror of com.atproto.space.getRecord (atproto#5187): callable with standard user auth (the caller must be a member of the space) or with a space credential for that space (for syncing services). The record must belong to the requested space; records outside it - including records with no space at all - resolve to RecordNotFound (no existence leak)."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
