Skip to main content
||

Reports

The Reporting API allows you to programmatically retrieve data from Brainshark's extensive reporting catalog. You can emulate any standard Brainshark presentation or learning report by specifying the report path, columns, and custom filters.

What you'll learn:

  • Query presentation and learning reports
  • Filter by date ranges and custom criteria
  • Select specific columns for export
TL;DR

Use report.ashx with a path parameter to retrieve any standard Brainshark report. Add selColumnList to filter columns and begin_date/end_date for date ranges.

Prerequisites
  • An authenticated session (sid, sky, uid) — see Authentication
  • Admin privileges for most reports

Retrieving Report Data​

Use this endpoint to fetch report data in a structured format.

info

Brainshark reporting information is returned in a modified CSV/JSON style. Each row of data is a separate JSON element, and the column headers are provided in the first row as a comma-separated list.

Request​

MethodEndpointDescription
GET/brainshark/webservices_mobile/report.ashxRetrieves data from a specific Brainshark report.

Parameters​

ParameterTypeDescription
sid, sky, uid-Standard session identifiers.
pathstringRequired. The navigational path to the report. Example: /Brainshark Reports/Presentation Reports/Viewing Details by Presentation
outputstringSpecifies the format of the returned data. Values: csv, namevalue. Default: csv
begin_datestring (date-time)Filters records created or viewed on or after this date. Format: YYYY-MM-DD
end_datestring (date-time)Filters records created or viewed on or before this date. Format: YYYY-MM-DD
selColumnListstringA comma-separated list of specific columns to return. If omitted, all default columns for the report are returned.
category_idintegerOptional. Filters results to content in a specific folder.
customfilterstringOptional. XML filter string to apply custom criteria. See Custom Filters.
recurse_categoriesintegerSet to 1 to include content from subfolders of the specified category_id.
presentation_liststringA comma-separated list of Presentation IDs to include.
author_group_idintegerFilters to presentations authored by members of a specific group.
viewer_group_idintegerFilters viewings to members of a specific group.
viewer_user_idintegerFilters viewings to a specific user ID.
include_previewsbooleanWhen true, includes preview viewings in results.
Show_q_and_abooleanWhen true, includes Q&A response data in results.
Show_Poll_DetailsbooleanWhen true, includes poll response details in results.
Show_Survey_DetailsbooleanWhen true, includes survey response details in results.
perpageintegerMaximum number of results to return per page.

Example request​

The following example retrieves the Learning Activity report with these filters:

  • Folder: Content in folder ID 4146923
  • Date range: Enrollments starting on or after May 12, 2021
  • Status: Only completed courses
curl -G "https://www.brainshark.com/brainshark/webservices_mobile/report.ashx" \
--data-urlencode "sid=23161106" \
--data-urlencode "sky=2022e6a14cd04ff2594ad83af0f13e8" \
--data-urlencode "uid=2752230" \
--data-urlencode "path=/Brainshark Reports/Enhanced Learning Reports/Learning Activity" \
--data-urlencode "category_id=4146923" \
--data-urlencode "begin_date=2021-05-12" \
--data-urlencode "customfilter=<filter><op n=\"AND\"><op n=\"EQ\"><field n=\"enrollment_status\" dt=\"SelectList\" dn=\"Course Completion Status\"/><val>Completed</val></op></op></filter>"

Example response​

The response is returned in a modified CSV/JSON format. The first element contains the column headers as a comma-separated string, followed by data rows:

[
"Student_Name,Student_Email,Course_Title,Enrollment_Date,Completion_Date,Score,Status",
{
"Student_Name": "John Smith",
"Student_Email": "jsmith@example.com",
"Course_Title": "Product Training 101",
"Enrollment_Date": "27009360",
"Completion_Date": "27012960",
"Score": "85",
"Status": "Completed"
},
{
"Student_Name": "Jane Doe",
"Student_Email": "jdoe@example.com",
"Course_Title": "Product Training 101",
"Enrollment_Date": "27010800",
"Completion_Date": "27015120",
"Score": "92",
"Status": "Completed"
}
]
Date format

Date values like Enrollment_Date and Completion_Date are returned as minutes since January 1, 1970 (Unix epoch in minutes, not seconds).

To convert to a readable date:

  • JavaScript: new Date(27012960 * 60 * 1000) → 2021-05-12T00:00:00.000Z
  • Python: datetime.fromtimestamp(27012960 * 60, tz=timezone.utc) → 2021-05-12 00:00:00+00:00

Finding Report Paths​

To determine the path for any Brainshark report, follow these steps in the Brainshark user interface:

  1. Navigate to the desired report in the Report Catalog.
  2. Observe the breadcrumb navigation (e.g., Brainshark Reports > Administration Reports > Activity Summary).
  3. Construct the path by replacing the > with a / and removing leading/trailing spaces.

Common Paths​

Report TitlePath
Viewing Details by Presentation/Brainshark Reports/Presentation Reports/Viewing Details by Presentation
Viewing Summary by Viewer/Brainshark Reports/Presentation Reports/Viewing Summary by Viewer
Course Enrollment/Brainshark Reports/Learning Reports/Learning Administration Reports/Course Enrollment
Learning Activity/Brainshark Reports/Enhanced Learning Reports/Learning Activity
Activity Summary/Brainshark Reports/Administration Reports/Activity Summary
User Data/Brainshark Reports/Administration Reports/Data Download/User Data

Response Fields & Columns​

When requesting a report, you can specify which columns to return using the selColumnList parameter. Below are some of the most commonly available columns for presentation and viewing reports.

Common Viewing Columns​

Column NameDescription
View_DateTimeThe date and time the viewing occurred.
View_Viewing_TimeTotal time spent viewing the presentation (in seconds).
View_Total_Slides_ViewedThe number of unique slides viewed.
ViewerThe name or identifier of the viewer.
View_CompletedIndicates if the viewer reached the completion criteria.
View_Score_dynThe score achieved if the presentation contains questions.

Custom Filters​

You can narrow your results by passing a customfilter parameter containing a structured XML-like filter string.

Filter Operators​

OperatorDescription
EQEquals (=)
BWBegins with
CTContains
GE / LEGreater than or equal to / Less than or equal to
NEDoes not equal (<>)

Example filter strings​

Filter by completion status:

<filter>
<op n="EQ">
<field n="enrollment_status" dt="SelectList" dn="Course Completion Status"/>
<val>Completed</val>
</op>
</filter>

Filter by completion date:

note

When filtering by Completion_Date, use CompletionDate (no underscore) in the filter field name.

<filter>
<op n="EQ">
<field n="CompletionDate" dt="Date" dn="CompletionDate"/>
<val>2023-06-12 10:00:00</val>
</op>
</filter>

Combine multiple filters with AND:

<filter>
<op n="AND">
<op n="EQ">
<field n="enrollment_status" dt="SelectList" dn="Course Completion Status"/>
<val>Completed</val>
</op>
<op n="GE">
<field n="CompletionDate" dt="Date" dn="CompletionDate"/>
<val>2023-01-01 00:00:00</val>
</op>
</op>
</filter>

Best Practices for Reporting​

  • Minimal Data: Only request the specific columns you need using selColumnList to improve performance and reduce payload size.
  • Date Handling: Always provide a begin_date and end_date to scope your queries and ensure faster processing.
  • Page Size: Use perpage to limit the size of each result set and prevent timeout errors.
tip

If an optional parameter is not used, Brainshark defaults to ALL for that specific filter.

Was this page helpful?