---
title: "getRepoAttachmentBlobDownload"
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getRepoAttachmentBlobDownload

Path: Forge API › attachmentBlobs

`GET /repos/{repo_id}/attachment-blobs/{attachment_blob_id}/download`

A short-lived signed URL to download an attachment blob's file. With disposition=inline, an image (PNG, JPEG, GIF, WebP or AVIF) or a PDF is served to show in place, as in a frame or a new tab; any other type, and any file without it, downloads.

## Path parameters

- `repo_id` (`getRepoAttachmentBlobDownload.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `attachment_blob_id` (`getRepoAttachmentBlobDownload.path.attachment_blob_id`; string, required)
  - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Query parameters

- `disposition` (`getRepoAttachmentBlobDownload.query.disposition`; string, optional)
  - one of `"attachment"`, `"inline"`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/repos/<repo_id>/attachment-blobs/<attachment_blob_id>/download'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/attachment-blobs/<attachment_blob_id>/download';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/attachment-blobs/<attachment_blob_id>/download"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

SignedAttachmentUrl

#### Example

```json
{
  "url": "string",
  "expires_at": "string"
}
```

- `url` (`getRepoAttachmentBlobDownload.response.200.url`; string, required)
  - minLength: `1`
- `expires_at` (`getRepoAttachmentBlobDownload.response.200.expires_at`; string, required)
  - minLength: `1`

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`getRepoAttachmentBlobDownload.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`getRepoAttachmentBlobDownload.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`getRepoAttachmentBlobDownload.response.400.issues`; array of object, required)
  - `path` (`getRepoAttachmentBlobDownload.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`getRepoAttachmentBlobDownload.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`getRepoAttachmentBlobDownload.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

AttachmentBlobNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "AttachmentBlobNotFound",
  "attachment_blob_id": "string"
}
```

Any of the following:

- `AttachmentBlobNotFoundEncoded`
  - `_tag` (`AttachmentBlobNotFoundEncoded._tag`; string, required)
    - one of `"AttachmentBlobNotFound"`
  - `attachment_blob_id` (`AttachmentBlobNotFoundEncoded.attachment_blob_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`getRepoAttachmentBlobDownload.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

AttachmentUrlFailed | RepoFailure

#### Example

```json
{
  "_tag": "AttachmentUrlFailed"
}
```

Any of the following:

- `AttachmentUrlFailedEncoded`
  - `_tag` (`AttachmentUrlFailedEncoded._tag`; string, required)
    - one of `"AttachmentUrlFailed"`
- `RepoFailureEncoded`
  - `_tag` (`RepoFailureEncoded._tag`; string, required)
    - one of `"RepoFailure"`
  - `reason` (`RepoFailureEncoded.reason`; string, required)

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/get-repo-attachment-blob-download/index.md
