> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gu1.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Report export jobs

> List and download async report files generated from Reporting, presets, or Generar reporte automations.

## Overview

Every **Generate** run from Reporting, a preset, or the automation action **Generar reporte** (`send_report`) enqueues an export job and stores the file in object storage. Use these endpoints to list **Descargables** and re-download with an authenticated session (not a permanent public signed URL).

| Method | Path                                          | Use                                                                       |
| ------ | --------------------------------------------- | ------------------------------------------------------------------------- |
| `GET`  | `/report-export-jobs`                         | List report-sourced jobs (filter by `presetId`, `templateCode`, `status`) |
| `GET`  | `/report-export-jobs/{kind}/{jobId}/download` | Authenticated file download                                               |

`kind` is one of: `entities`, `transactions`, `investigations`, `alerts`, `documents` (entity PDF profile and metrics reports).

File retention is stored per job in `fileExpiresAt`. A `null` value means the file
does not expire. New entity and transaction exports use `null`; other export kinds
keep their configured retention period. This field is separate from `linkExpiresAt`,
which only expires the signed link sent by email.

## Authentication and tenant

<ParamField header="Authorization" type="string" required>
  `Bearer YOUR_API_KEY` — see [Authentication](/en/api-reference/authentication).
</ParamField>

<ParamField header="X-Organization-ID" type="string" required>
  Production or sandbox organization UUID — see [Environments](/en/api-reference/environments).
</ParamField>

## Permissions

| Endpoint       | Granular permission |
| -------------- | ------------------- |
| `GET` list     | `reports:read`      |
| `GET` download | `reports:export`    |

## List jobs

```
GET http://api.gu1.ai/report-export-jobs
```

<ParamField query="presetId" type="string">
  Optional UUID — only jobs produced from that [report preset](/en/api-reference/entities/report-presets).
</ParamField>

<ParamField query="templateCode" type="string">
  Optional template code (for example `alerts_by_rules`).
</ParamField>

<ParamField query="status" type="string">
  Optional job status (`queued`, `running`, `completed`, `completed_email_failed`, `failed`).
</ParamField>

<ParamField query="limit" type="integer">
  Page size (1–100, default 50).
</ParamField>

<ParamField query="offset" type="integer">
  Offset for pagination (default 0).
</ParamField>

### Response

```json theme={null}
{
  "success": true,
  "jobs": [
    {
      "id": "…",
      "kind": "alerts",
      "status": "completed",
      "outputFilename": "alerts-by-rules-2026-08-06.xlsx",
      "fileExpiresAt": "2026-08-07T12:00:00.000Z",
      "linkExpiresAt": "2026-08-07T12:00:00.000Z",
      "downloadAvailable": true,
      "reportSource": "preset",
      "reportPresetId": "…",
      "reportTemplateCode": "alerts_by_rules",
      "createdAt": "2026-08-06T12:00:00.000Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}
```

## Download a job file

```
GET http://api.gu1.ai/report-export-jobs/{kind}/{jobId}/download
```

Returns the binary file with `Content-Disposition: attachment`. Status codes:

| Status | Meaning                     |
| ------ | --------------------------- |
| `200`  | File body                   |
| `404`  | Job not found in the tenant |
| `409`  | Job not ready               |
| `410`  | File removed                |

See also [Report templates](/en/api-reference/entities/report-templates) and [Report presets](/en/api-reference/entities/report-presets).
