---
title: "getNpmPackageTarball"
---

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

# getNpmPackageTarball

Path: Forge API › registry

`GET /npm/@buildr-custom/{name}/-/{version}`

Download a release of @buildr-custom/<org slug>.<repo slug>.<name> as an npm tarball: its source files, a package.json that Forge writes, and an npm-shrinkwrap.json of the npm packages its build resolved. Forge packs a release once, when it publishes, so every download gives the same bytes.

## Path parameters

- `name` (`getNpmPackageTarball.path.name`; string, required) — An extension's npm package without its @buildr-custom/ scope, <org slug>.<repo slug>.<name>
- `version` (`getNpmPackageTarball.path.version`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/npm/@buildr-custom/<name>/-/<version>'
```

### TypeScript

```typescript
const url = '<base-url>/npm/@buildr-custom/<name>/-/<version>';
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>/npm/@buildr-custom/<name>/-/<version>"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

Success

#### Example

```text
string
```

#### Body (application/octet-stream)

Type: `string`

- format: `binary`

### 400

InvalidRequest

#### Example

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

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

### 401

InvalidCredentials

#### Example

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

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

### 403

ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "ForbiddenOrigin"
}
```

Any of the following:

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

ExtensionVersionNotFound | OrgNotFound

#### Example

```json
{
  "_tag": "ExtensionVersionNotFound",
  "extension_name": "string",
  "version": "string",
  "message": "string"
}
```

Any of the following:

- `ExtensionVersionNotFoundEncoded`
  - `_tag` (`ExtensionVersionNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionVersionNotFound"`
  - `extension_name` (`ExtensionVersionNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
  - `version` (`ExtensionVersionNotFoundEncoded.version`; string, required)
  - `message` (`ExtensionVersionNotFoundEncoded.message`; string, required)
- `OrgNotFoundEncoded`
  - `_tag` (`OrgNotFoundEncoded._tag`; string, required)
    - one of `"OrgNotFound"`

### 429

RateLimited

#### Example

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

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

### 500

OrgFailure | ControlPlaneFailure

#### Example

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

Every option has:

- `reason` (`<option>.reason`; string, required)

Any of the following, each adding:

- `OrgFailureEncoded`
  - `_tag` (`OrgFailureEncoded._tag`; string, required)
    - one of `"OrgFailure"`
- `ControlPlaneFailureEncoded`
  - `_tag` (`ControlPlaneFailureEncoded._tag`; string, required)
    - one of `"ControlPlaneFailure"`

### 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-npm-package-tarball/index.md
