# social.colibri.beta.blob.get

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.blob.get)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.blob.get/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.blob.get/examples)

## Definitions

### `social.colibri.beta.blob.get`

**Type**: `query`

Serves a blob from a permissioned space through the AppView, which holds the space credential the client does not. Every byte is verified against the CID before it is served, and the content type is sniffed rather than trusted. Supports HTTP range requests.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes | The blob's CID. |
| `did` | `string` (did) | Yes | DID of the repo holding the blob. |
| `space` | `string` (space-ref) | No | The space holding the blob. Required for a blob in a permissioned space, and omitted for one on a public repo. |
| `variant` | `string` | No | A rendition of a resizable image. |
| `filename` | `string` | No | Sets the download filename. |

#### Output

**Encoding**: `*/*`

#### Errors

- **AuthRequired**: The request has no valid service auth.
- **Forbidden**: The requesting user may not read the space holding the blob.
- **BlobNotFound**: No blob matches the given DID and CID.
- **InvalidRequest**: The arguments are inconsistent or malformed beyond schema validation.
- **UpstreamFailure**: The repo's PDS failed while the AppView fetched the blob.

## Raw Schema

```json
{
  "id": "social.colibri.beta.blob.get",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request has no valid service auth."
        },
        {
          "name": "Forbidden",
          "description": "The requesting user may not read the space holding the blob."
        },
        {
          "name": "BlobNotFound",
          "description": "No blob matches the given DID and CID."
        },
        {
          "name": "InvalidRequest",
          "description": "The arguments are inconsistent or malformed beyond schema validation."
        },
        {
          "name": "UpstreamFailure",
          "description": "The repo's PDS failed while the AppView fetched the blob."
        }
      ],
      "output": {
        "encoding": "*/*"
      },
      "parameters": {
        "type": "params",
        "required": [
          "did",
          "cid"
        ],
        "properties": {
          "cid": {
            "type": "string",
            "format": "cid",
            "description": "The blob's CID."
          },
          "did": {
            "type": "string",
            "format": "did",
            "description": "DID of the repo holding the blob."
          },
          "space": {
            "type": "string",
            "format": "space-ref",
            "description": "The space holding the blob. Required for a blob in a permissioned space, and omitted for one on a public repo."
          },
          "variant": {
            "type": "string",
            "description": "A rendition of a resizable image.",
            "knownValues": [
              "thumbnail",
              "avatar",
              "banner",
              "full"
            ]
          },
          "filename": {
            "type": "string",
            "description": "Sets the download filename."
          }
        }
      },
      "description": "Serves a blob from a permissioned space through the AppView, which holds the space credential the client does not. Every byte is verified against the CID before it is served, and the content type is sniffed rather than trusted. Supports HTTP range requests."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
