---
title: "Get a download artifact link"
method: GET
path: "/repositories/{workspace}/{repo_slug}/downloads/{filename}"
tags: ["Downloads"]
---

# Get a download artifact link

`GET /repositories/{workspace}/{repo_slug}/downloads/{filename}`

## Request

- Base URL: `https://api.bitbucket.org/2.0`
- URL: `https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/downloads/{filename}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://bitbucket.org/site/oauth2/authorize`
    - Token URL: `https://bitbucket.org/site/oauth2/access_token` scopes: `repository`
  - HTTP basic
  - API key in header `Authorization`

Return a redirect to the contents of a download artifact.

This endpoint returns the actual file contents and not the artifact's
metadata.

    $ curl -s -L https://api.bitbucket.org/2.0/repositories/evzijst/git-tests/downloads/hello.txt
    Hello World

## Other responses

- `302`: Redirects to the url of the specified download artifact.
- `403`: User is not authorized to read from the repository.
- `404`: The specified download artifact does not exist.

---

[API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [All operations](https://skmtc.dev/atlassian/apis/bitbucket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/bitbucket-api/revisions/6ae783fa75da?raw)
