# com.bad-example.repo.getUriRecord

> Published by [bad-example.com](https://lexicon.garden/identity/did:plc:hdhoaan3xa3jiuq4fg4mefid)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:hdhoaan3xa3jiuq4fg4mefid/com.bad-example.repo.getUriRecord)
- [Documentation](https://lexicon.garden/lexicon/did:plc:hdhoaan3xa3jiuq4fg4mefid/com.bad-example.repo.getUriRecord/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:hdhoaan3xa3jiuq4fg4mefid/com.bad-example.repo.getUriRecord/examples)

## Definitions

### `com.bad-example.repo.getUriRecord`

**Type**: `query`

ergonomic complement to com.atproto.repo.getRecord which accepts an at-uri instead of individual repo/collection/rkey params

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | optional CID of the version of the record. if not specified, return the most recent version. if specified and a newer version exists, returns 404. |
| `at_uri` | `string` (at-uri) | Yes | the at-uri of the record (identifier can be a DID or handle) |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | CID for this exact version of the record |
| `uri` | `string` (at-uri) | Yes | at-uri for this record |
| `value` | `unknown` | Yes | the record itself |

## Raw Schema

```json
{
  "id": "com.bad-example.repo.getUriRecord",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "uri",
            "value"
          ],
          "properties": {
            "cid": {
              "type": "string",
              "format": "cid",
              "description": "CID for this exact version of the record"
            },
            "uri": {
              "type": "string",
              "format": "at-uri",
              "description": "at-uri for this record"
            },
            "value": {
              "type": "unknown",
              "description": "the record itself"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "at_uri"
        ],
        "properties": {
          "cid": {
            "type": "string",
            "format": "cid",
            "description": "optional CID of the version of the record. if not specified, return the most recent version. if specified and a newer version exists, returns 404."
          },
          "at_uri": {
            "type": "string",
            "format": "at-uri",
            "description": "the at-uri of the record (identifier can be a DID or handle)"
          }
        }
      },
      "description": "ergonomic complement to com.atproto.repo.getRecord which accepts an at-uri instead of individual repo/collection/rkey params"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
