---
title: CSV Exports
url: https://docs.kaltura.com/docs/rich-media-cms-apis/analytics/analytics-csv-exports
---

## CSV Exports

### report.getUrlForReportAsCsv

Generates a downloadable CSV export URL. The URL is valid for a limited time.

**Parameters**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `reportTitle` | string | Yes | Title included in the CSV header |
| `reportText` | string | Yes | Description text included in the CSV header |
| `headers` | string | Yes | Comma-separated column headers for the CSV |
| `reportType` | int | Yes | KalturaReportType integer ID (see [Report Types Reference](/docs/rich-media-cms-apis/analytics/analytics-report-types)) |
| `reportInputFilter[objectType]` | string | Yes | Always `KalturaEndUserReportInputFilter` |
| `reportInputFilter[fromDate]` | int | Yes | Start date as Unix timestamp in seconds |
| `reportInputFilter[toDate]` | int | Yes | End date as Unix timestamp in seconds |
| `responseOptions[objectType]` | string | No | `KalturaReportResponseOptions` |
| `responseOptions[delimiter]` | string | No | Field delimiter. Default: `,` (use `\|` for consistency) |

```bash
CSV_URL=$(curl -s -X POST "$KALTURA_SERVICE_URL/service/report/action/getUrlForReportAsCsv" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "reportTitle=Content+Performance" \
  -d "reportText=Generated+report" \
  -d "headers=Entry+ID,Entry+Name,Plays,Minutes+Viewed" \
  -d "reportType=38" \
  -d "reportInputFilter[objectType]=KalturaEndUserReportInputFilter" \
  -d "reportInputFilter[fromDate]=$FROM_TIMESTAMP" \
  -d "reportInputFilter[toDate]=$TO_TIMESTAMP" \
  -d "responseOptions[objectType]=KalturaReportResponseOptions" \
  -d "responseOptions[delimiter]=|" | tr -d '"')

# Download the CSV
curl -o report.csv "$CSV_URL"
```

### report.getCsvFromStringParams

For specialized reports (IDs 4021, 6000-6002, 3006-3008) that use semicolon-delimited parameters instead of the standard filter object.

**Parameters**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | int | Yes | Report ID: `4021` (User Reactions), `6000` (KME Room Data), `6001` (Attendee Data), `6002` (Breakout Sessions), `3006` (Added to Calendar), `3007` (Session Viewership), `3008` (Attachment Clicked) |
| `params` | string | Yes | Semicolon-delimited key=value pairs (format varies by report ID, see examples below) |
| `excludedFields` | string | No | Comma-separated column names to exclude from output |

#### User Reactions Report (ID 4021)

Per-user engagement data for virtual events. Requires `virtualeventid:&lt;EVENT_ID&gt;` KS privilege.

```bash
curl -X POST "$KALTURA_SERVICE_URL/service/report/action/getCsvFromStringParams" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=4021" \
  -d "params=from_date=$FROM;to_date=$TO;entry_ids=$KALTURA_ENTRY_ID;virtualeventid=$EVENT_ID"
```

**Columns returned:** `email`, `combined_live_engaged_users_play_time_ratio`, `download_attachment`, `add_to_calendar`, `raise_hand`, `mic_on`, `cam_on`, `clap_clicked_count`, `heart_clicked_count`, `think_clicked_count`, `wow_clicked_count`, `smile_clicked_count`, `total_reactions_activity`, `answered_polls`, `messages_sent_group`, `qna_threads`

#### KME Room Data (ID 6000), Attendee Data (ID 6001), Breakout Sessions (ID 6002)

```bash
# Room data
curl -X POST "$KALTURA_SERVICE_URL/service/report/action/getCsvFromStringParams" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=6000" \
  -d "params=from_date=$FROM;to_date=$TO"

# Attendee data (id=6001), Breakout sessions (id=6002) — same pattern
```

Use the `excludedFields` parameter to optionally exclude columns and reduce payload size.

#### Enriched Reports (IDs 3006, 3007, 3008)

Reports enriched with user metadata (first name, last name, company):

| ID | Name | Key Columns |
|----|------|-------------|
| 3006 | Added to Calendar | `entry_id`, `user_id`, `email`, `count_add_to_calendar_clicked`, `first_name`, `last_name`, `company` |
| 3007 | Session Viewership | `user_id`, `email`, `entry_id`, `entry_name`, `media_type`, `view_time`, `play`, `first_name`, `last_name`, `company` |
| 3008 | Attachment Clicked | `user_id`, `email`, `entry_id`, `attachment_id`, `attachment_title`, `download_attachment_clicked`, `first_name`, `last_name`, `company` |

```bash
curl -X POST "$KALTURA_SERVICE_URL/service/report/action/getCsvFromStringParams" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=3007" \
  -d "params=from_date_id=$FROM_DATE;to_date_id=$TO_DATE;timezone_offset=-240"
```

Parameters are semicolon-delimited: `from_date_id`, `to_date_id`, `timezone_offset`.
