# dev.knotless.getAttachment

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Something a pull, an issue or a comment attaches, such as a picture its body shows.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getAttachment)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getAttachment/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getAttachment/examples)

## Definitions

### `dev.knotless.getAttachment`

**Type**: `query`

A blob a dev.knotless.pull, dev.knotless.issue or dev.knotless.comment record attaches, of any kind in its `attachments`, from its author's PDS, or for a private repository from their repo in its space: only one the record names. Served so that a browser never runs it as a page, with the type its record gives when that is one shown safely, and the same for good. dev.knotless.getThread's `html` shows its pictures from here. No authentication beyond what reading the repository takes; responses are not personalized.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | The attached blob. |
| `repo` | `string` (at-uri) | Yes | The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it. |
| `uri` | `string` (at-uri) | Yes | The pull, issue or comment. |

#### Output

**Encoding**: `*/*`

#### Errors

- **NotFound**: No such repository, record, or blob it attaches.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A blob a dev.knotless.pull, dev.knotless.issue or dev.knotless.comment record attaches, of any kind in its `attachments`, from its author's PDS, or for a private repository from their repo in its space: only one the record names. Served so that a browser never runs it as a page, with the type its record gives when that is one shown safely, and the same for good. dev.knotless.getThread's `html` shows its pictures from here. No authentication beyond what reading the repository takes; responses are not personalized.",
      "errors": [
        {
          "description": "No such repository, record, or blob it attaches.",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "*/*"
      },
      "parameters": {
        "properties": {
          "cid": {
            "description": "The attached blob.",
            "format": "cid",
            "type": "string"
          },
          "repo": {
            "description": "The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.",
            "format": "at-uri",
            "type": "string"
          },
          "uri": {
            "description": "The pull, issue or comment.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "repo",
          "uri",
          "cid"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "description": "Something a pull, an issue or a comment attaches, such as a picture its body shows.",
  "id": "dev.knotless.getAttachment",
  "lexicon": 1
}
```
