---
title: Report Response Format
url: https://docs.kaltura.com/docs/rich-media-cms-apis/analytics/analytics-response-format
---

## Report Response Format

All `report` service responses use **pipe-delimited strings** (parsed by splitting on `|` for columns and `;` for rows).

### Table Response

`report.getTable` returns:

| Field | Format | Description |
|-------|--------|-------------|
| `header` | Pipe-delimited | Column names: `"object_id\|entry_name\|count_plays\|sum_time_viewed"` |
| `data` | Semicolon-separated rows, pipe-delimited columns | `"1_abc123\|My Video\|150\|3600;1_def456\|Other Video\|75\|1800"` |
| `totalCount` | Integer | Total rows available (for pagination) |

Example response:

```json
{
  "header": "object_id|entry_name|count_plays|sum_time_viewed",
  "data": "1_abc123|My Video|150|3600;1_def456|Other Video|75|1800",
  "totalCount": 2,
  "objectType": "KalturaReportTable"
}
```

### Totals Response

`report.getTotal` returns the same format as a table but with a single row (no semicolon separators).

### Graphs Response

`report.getGraphs` returns an array of `KalturaReportGraph` objects:

```json
[
  {
    "id": "count_plays",
    "data": "2025-06-01|45;2025-06-02|62;2025-06-03|38",
    "objectType": "KalturaReportGraph"
  },
  {
    "id": "sum_time_viewed",
    "data": "2025-06-01|1200;2025-06-02|1850;2025-06-03|980",
    "objectType": "KalturaReportGraph"
  }
]
```

Each graph has an `id` (metric name) and `data` (semicolon-separated `label|value` pairs).

### Parsing Pattern

To parse pipe-delimited report data into structured rows:

```bash
# Parse header into column names
IFS='|' read -ra COLUMNS <<< "$HEADER"

# Parse each row
IFS=';' read -ra ROWS <<< "$DATA"
for ROW in "${ROWS[@]}"; do
  IFS='|' read -ra FIELDS <<< "$ROW"
  echo "Entry: ${FIELDS[0]}, Plays: ${FIELDS[2]}"
done
```
