> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/insights/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/insights/api/origin-insights-new-generation/async-report-generation.md).

# Async Report Generation

Supported endpoints can generate Excel reports asynchronously by adding `async=true` and report parameters to the query string. The request returns `200 OK` immediately, and the report is generated in the background by a dedicated Lambda without API Gateway timeout constraints.

**Required query parameters (in addition to the endpoint's own parameters):**

| Parameter     | Required | Description                                            |
| ------------- | -------- | ------------------------------------------------------ |
| `async`       | Yes      | Set to `true` to trigger async processing              |
| `user_email`  | Yes      | Email of the user requesting the report                |
| `report_name` | Yes      | Name for the generated report                          |
| `product`     | Yes      | Product identifier (e.g. `content_pulse`)              |
| `transform`   | Yes      | Transform function name from the transforms bundle     |
| `branch`      | No       | Git branch for the transforms bundle (default: `main`) |

**Example:**

```
GET /insights/content_pulse/catalog?platform_country=US&platform_id=34&async=true&user_email=user@example.com&report_name=US_Catalog&product=content_pulse&transform=catalog_transform
```

**Response:** `200 OK` with `{"message": "ok"}`

**How it works:**

1. The endpoint validates the request and invokes the async query Lambda
2. The Lambda executes the full query with all filters (no pagination limit)
3. Results are read from the Athena CSV output in S3 for memory efficiency
4. A transform function (fetched from a private GitHub repo) is applied to the data
5. An Excel file (.xlsx) is generated and uploaded to S3
6. Progress is tracked via the `GET /insights/reports/list` endpoint (processing → done/error)

**Supported endpoints:**

* `/insights/content_pulse/catalog`
* `/insights/content_pulse/top_ten/top_titles`
* `/insights/content_pulse/top_ten/new_entries`
* `/insights/content_pulse/top_ten/cross_market_performance`
* `/insights/content_pulse/price_evolution/current_prices`
* `/insights/content_pulse/price_evolution`
* `/insights/content_pulse/title_overview/distribution_history`
* `/insights/content_pulse/platform_status/table`
* `/insights/content_pulse/overview/popular`
* `/insights/content_pulse/content_overlap/assets`
* `/insights/content_pulse/content_overlap/historic/assets`
* `/insights/content_pulse/awards/database`
* `/insights/content_pulse/awards/titles`
* `/insights/content_pulse/awards/titles_table`
* `/insights/content_pulse/awards/person_awards`
* `/insights/content_pulse/awards/upcoming_events`
