# Download one artifact

`GET /o/{org}/sessions/{session}/artifacts/{name}`

The file's bytes, streamed, with the `Content-Type` it was saved with,
`Content-Disposition: inline` and its filename. Send the key, or open the artifact's `url`
from the session read, which carries `expires` and `signature` and needs no key until
`url_expires_at`; `HEAD` on the link answers the headers alone. A link opens only the file
it was issued for; a wrong, expired or altered link answers `404`, as a missing file does.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `org` | path | string | yes | The org's slug or id. A caller with no role in the org gets `404`. |
| `session` | path | string | yes | The session's full id (`execution_id`). |
| `name` | path | string | yes | A `name` from the artifact list. |
| `expires` | query | integer | no | Part of a file's signed `url`; send it as given, with no key. |
| `signature` | query | string | no | Part of a file's signed `url`; send it as given, with no key. |

## Example request

```bash
curl "https://api.phoenix.so/o/$RUSH_ORG/sessions/$SESSION_ID/artifacts/$NAME" \
  -H "Authorization: Bearer $RUSH_API_KEY"
```

```typescript
const org = process.env.RUSH_ORG;
const sessionId = process.env.SESSION_ID;
const name = process.env.NAME;

const res = await fetch(`https://api.phoenix.so/o/${org}/sessions/${sessionId}/artifacts/${name}`, {
  headers: {
    Authorization: `Bearer ${process.env.RUSH_API_KEY}`,
  },
});

console.log(res.status, await res.text());
```

```python
import os

import requests

org = os.environ["RUSH_ORG"]
session_id = os.environ["SESSION_ID"]
name = os.environ["NAME"]

res = requests.get(
    f"https://api.phoenix.so/o/{org}/sessions/{session_id}/artifacts/{name}",
    headers={"Authorization": f"Bearer {os.environ['RUSH_API_KEY']}"},
)

print(res.status_code, res.text)
```

## Responses

### 200

The file.


### 401

No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.

### 404

No such resource for the caller, including one in an org the caller is not in or a Project that is private to someone else.

### 429

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (`RATE_LIMITED`). The error names the limit. Wait `Retry-After` seconds.

## Example response (200)

```json
"<!doctype html>\n<html lang=\"en\">\n<head><meta charset=\"utf-8\"><title>Coverage report</title></head>\n<body>…</body>\n</html>\n"
```
