Skip to main content
View as Markdown

Report Response Format - Analytics

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:

FieldFormatDescription
headerPipe-delimitedColumn names: "object_id|entry_name|count_plays|sum_time_viewed"
dataSemicolon-separated rows, pipe-delimited columns"1_abc123|My Video|150|3600;1_def456|Other Video|75|1800"
totalCountIntegerTotal rows available (for pagination)

Example response:

{
"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:

[
{
"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:

# 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