---
title: "listRepoExtensionFilesAtBranch"
---

> 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.

# listRepoExtensionFilesAtBranch

Path: Forge API › extensions

`GET /repos/{repo_id}/branches/{branch}/extensions/{name}/files`

List an extension's files in path order: each one's id, path, and size in UTF-8 bytes, without content. Read content with getRepoExtensionFileAtBranch or searchRepoExtensionFilesAtBranch.

## Path parameters

- `repo_id` (`listRepoExtensionFilesAtBranch.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `branch` (`listRepoExtensionFilesAtBranch.path.branch`; string, required)
  - minLength: `1`
- `name` (`listRepoExtensionFilesAtBranch.path.name`; string, required)
  - maxLength: `64` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*$`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/extensions/<name>/files'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/extensions/<name>/files';
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>/branches/<branch>/extensions/<name>/files"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Success

#### Example

```json
[
  {
    "id": "string",
    "extension_id": "string",
    "path": "string",
    "attachment_blob_id": "string",
    "bytes": -9007199254740991
  }
]
```

- `id` (`listRepoExtensionFilesAtBranch.response.200.id`; string, required)
  - pattern: `^extension_file_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `extension_id` (`listRepoExtensionFilesAtBranch.response.200.extension_id`; string, required)
  - pattern: `^extension_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `path` (`listRepoExtensionFilesAtBranch.response.200.path`; string, required)
  - maxLength: `256` · pattern: `^(?:[A-Za-z0-9_][A-Za-z0-9._-]*\/)*[A-Za-z0-9_][A-Za-z0-9._-]*$`
- `attachment_blob_id` (`listRepoExtensionFilesAtBranch.response.200.attachment_blob_id`; any of, required)
  - any of the following: `TypeId`, `null`
- `bytes` (`listRepoExtensionFilesAtBranch.response.200.bytes`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`

### 400

InvalidRequest

#### Example

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

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

### 401

InvalidCredentials

#### Example

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

- `_tag` (`listRepoExtensionFilesAtBranch.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

BranchNotFound | ExtensionNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "BranchNotFound",
  "branch": "string"
}
```

Any of the following:

- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `ExtensionNotFoundEncoded`
  - `_tag` (`ExtensionNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionNotFound"`
  - `extension_name` (`ExtensionNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 429

RateLimited

#### Example

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

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

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`listRepoExtensionFilesAtBranch.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`listRepoExtensionFilesAtBranch.response.500.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/list-repo-extension-files-at-branch/index.md
