---
title: "GET /v1/jobs/{jobId}/artifact-content"
description: "Read a job's result content"
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`), a Clerk session JWT (`Authorization: Bearer …`) or the Clerk `__session` cookie (browser sessions). See [Authentication](/docs/api/authentication).

Returns the content of one of a finished job's result files, either as a parsed summary with metrics (`format=parsed`, the default) or as the raw text (`format=raw`). Raw text is cut at `maxLength` characters and `truncated` says so.

`artifactType` picks the file; it defaults to `output`, and the types a job offers depend on its tool. For a job whose results are a zip archive, `member` names one file inside it. With `preflight=true` the route only checks that the file exists and is readable and returns that verdict, without the content.

A job that is still running returns 404 with `code` `JOB_NOT_COMPLETE`: the file does not exist yet, so retry after the job finishes. A job that failed returns 422 `JOB_FAILED` with its error message, and that one is permanent. A job you cannot read and a job outside your API key's project scope are reported like a job that does not exist (404 `JOB_NOT_FOUND`).

## Request

#### Path parameters

- `jobId` (string (uuid)) —
Job UUID.

#### Query parameters

- `artifactType` (string) —
Which result file to read. Defaults to `output`.

- `format` (enum (&quot;parsed&quot; | &quot;raw&quot;)) —
`parsed` for a summary and metrics, `raw` for the file text. Defaults to `parsed`.

- `maxLength` (integer) —
Most characters of raw content to return. Defaults to 100000 and is capped at 500000.

- `preflight` (enum (&quot;true&quot;)) —
`true` to check availability instead of returning content.

- `member` (string) —
One relative file path inside a results archive to serve instead of the type-selected file.

## Responses

### `200` OK

The parsed summary, the raw content, or the preflight verdict

Response shape:

- `success` (enum (true)) —

- `jobId` (string (uuid)) —

- `jobType` (string) —

- `artifactType` (string) —

- `summary` (string) —
A text summary of the parsed result (`format=parsed`).

- `metrics` (object) —
Parsed metrics (`format=parsed`).

- `rawContent` (string) —
The file text (`format=raw`), cut at `maxLength` characters.

- `truncated` (boolean) —
`true` when `rawContent` was cut.

- `originalSize` (integer) —
Size of the full content before it was cut.

- `preflight` (boolean) —
`true` on a preflight response, which carries no content.

- `validation` (object) —
Availability verdict for one artifact type (preflight with `artifactType`).

- `availability` (object) —
Availability of every artifact the job offers (preflight without `artifactType`).

- `archive` (object) —
What was served, when the content came from a results archive.

- `archiveFiles` (object[]) —
The served archive members with their names, when more than one was served.

### `400` Bad Request

The job id, `format` or `member` is invalid

Response shape: `object`

### `401` Unauthorized

Authentication required

Response shape: `object`

### `403` Forbidden

The caller carries no user identity, or may not read this job

Response shape: `object`

### `404` Not Found

The job does not exist or is not visible to you (including a job outside your API key's project scope), or the artifact type is not available for it. Also `JOB_NOT_COMPLETE` while the job is still running; that 404 is retryable, so retry after the job finishes.

Response shape: `object`

### `405`

The method is not GET

Response shape: `object`

### `422` Unprocessable Entity

The job failed (`JOB_FAILED`, permanent) or the file could not be read; `code` says which

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

### `500` Internal Server Error

Reading the content failed

Response shape: `object`

**curl**

```bash
curl -X GET 'https://ivybiosciences.com/api/v1/jobs/{jobId}/artifact-content' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/jobs/{jobId}/artifact-content', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.get(
    "https://ivybiosciences.com/api/v1/jobs/{jobId}/artifact-content",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
