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
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.
- 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.
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
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/report.ashx | Retrieves data from a specific Brainshark report. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
path | string | Required. The navigational path to the report. Example: /Brainshark Reports/Presentation Reports/Viewing Details by Presentation |
output | string | Specifies the format of the returned data. Values: csv, namevalue. Default: csv |
begin_date | string (date-time) | Filters records created or viewed on or after this date. Format: YYYY-MM-DD |
end_date | string (date-time) | Filters records created or viewed on or before this date. Format: YYYY-MM-DD |
selColumnList | string | A comma-separated list of specific columns to return. If omitted, all default columns for the report are returned. |
category_id | integer | Optional. Filters results to content in a specific folder. |
customfilter | string | Optional. XML filter string to apply custom criteria. See Custom Filters. |
recurse_categories | integer | Set to 1 to include content from subfolders of the specified category_id. |
presentation_list | string | A comma-separated list of Presentation IDs to include. |
author_group_id | integer | Filters to presentations authored by members of a specific group. |
viewer_group_id | integer | Filters viewings to members of a specific group. |
viewer_user_id | integer | Filters viewings to a specific user ID. |
include_previews | boolean | When true, includes preview viewings in results. |
Show_q_and_a | boolean | When true, includes Q&A response data in results. |
Show_Poll_Details | boolean | When true, includes poll response details in results. |
Show_Survey_Details | boolean | When true, includes survey response details in results. |
perpage | integer | Maximum 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
- JavaScript
- Python
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>"
const params = new URLSearchParams({
sid: '23161106',
sky: '2022e6a14cd04ff2594ad83af0f13e8',
uid: '2752230',
path: '/Brainshark Reports/Enhanced Learning Reports/Learning Activity',
category_id: '4146923',
begin_date: '2021-05-12',
customfilter:
'<filter><op n="AND"><op n="EQ"><field n="enrollment_status" dt="SelectList" dn="Course Completion Status"/><val>Completed</val></op></op></filter>',
});
const response = await fetch(`https://www.brainshark.com/brainshark/webservices_mobile/report.ashx?${params}`);
const data = await response.json();
console.log(data);
import requests
url = "https://www.brainshark.com/brainshark/webservices_mobile/report.ashx"
params = {
"sid": "23161106",
"sky": "2022e6a14cd04ff2594ad83af0f13e8",
"uid": "2752230",
"path": "/Brainshark Reports/Enhanced Learning Reports/Learning Activity",
"category_id": "4146923",
"begin_date": "2021-05-12",
"customfilter": '<filter><op n="AND"><op n="EQ"><field n="enrollment_status" dt="SelectList" dn="Course Completion Status"/><val>Completed</val></op></op></filter>'
}
response = requests.get(url, params=params)
print(response.json())
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 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:
- Navigate to the desired report in the Report Catalog.
- Observe the breadcrumb navigation (e.g.,
Brainshark Reports > Administration Reports > Activity Summary). - Construct the path by replacing the
>with a/and removing leading/trailing spaces.
Common Paths
| Report Title | Path |
|---|---|
| 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 Name | Description |
|---|---|
View_DateTime | The date and time the viewing occurred. |
View_Viewing_Time | Total time spent viewing the presentation (in seconds). |
View_Total_Slides_Viewed | The number of unique slides viewed. |
Viewer | The name or identifier of the viewer. |
View_Completed | Indicates if the viewer reached the completion criteria. |
View_Score_dyn | The 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
| Operator | Description |
|---|---|
EQ | Equals (=) |
BW | Begins with |
CT | Contains |
GE / LE | Greater than or equal to / Less than or equal to |
NE | Does 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:
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
selColumnListto improve performance and reduce payload size. - Date Handling: Always provide a
begin_dateandend_dateto scope your queries and ensure faster processing. - Page Size: Use
perpageto limit the size of each result set and prevent timeout errors.
If an optional parameter is not used, Brainshark defaults to ALL for that specific filter.
Was this page helpful?