Advanced Data Search

Watershed is powered by moments of activity called interaction statements (or xAPI statements). Sources ranging from mobile apps to learning management systems are connected to Watershed, and as users perform actions in these sources, interaction statements are sent into Watershed. Data Search shows every interaction statement that has been sent to your Watershed account and allows you to perform complex searches to find specific ones you're looking for. It is a great tool to troubleshoot data issues.

This guide covers Advanced Data Search. Please read Data Search to understand how to get to Data Search and configure the simple settings first.

Who can use this feature?
 User Types
Only Global Admins use Data Search.
Available on Essentials and Enterprise plans.
Experts can use data search.

Advanced Search

Advanced Search gives you some lesser used search options that can help you narrow down to very specific statements you need. 6 additional options come with Advanced Search: Statement IDRegistration ID, Related, Format, Report Filter, and Query. Use the Refresh button to search for values you add to one or more of the options (including options from Simple Search).

Statement ID

Use the Statement ID search to find an individual statement. This is useful for troubleshooting with a team.

Registration ID

This searches the context.registration for statements. A registration is a single person taking a single course in an LMS (like a session).


These flags are associated with behavior as laid out in the xAPI specification and will find people related to users you search for if the Related Agents box is checked and related activities if the Related Activities box is checked.


Format determines the format of the xAPI statements displayed in the search results.

  • default - displays the data as it is used for reporting. This is useful when looking at the underlying data when working on report configuration. When default format is used, an additional checkbox labelled Include hierarchy info in results will appear above the interaction stream. Checking this box will also include person and group data associated with each interaction statement.
  • exact - displays the data exactly as it was received by Watershed's LRS. This is useful when debugging a data source.
  • ids - displays ids format as defined by xAPI. This might be useful for debugging a data source that outputs xAPI statements with large definitions.
  • canonical - displays the canonical format as defined by xAPI. Currently this is the same as the default format, except it is not possible to include hierarchy info.

Report Filter

Paste in the Advanced Configuration from a report filter to search for all statements that would be used to get the data for the report.


See below for more information about queries.

Custom Queries

In the Queries section of Advanced Search, you can search for statements using a concise query language.


Filter Expressions

You can filter statements using a number of different value tests:

  • Equals: actor.mbox = ''
  • Not equals: context.registration != 'b7fea80e-1685-4513-be92-59ddd13091f7'
  • In: context.platform in ('Mac', 'Windows')
  • Not In: not in ('Activity Provider 1', 'System 2')
  • Range: result.score.scaled <= 0.8

Regular Expression Values

In the above filter expressions, you can use either literal quoted values or regular expression (regex) values. To use regular expression values, surround the value with / characters and don't use quotes.

  Please note: Regular expressions can only be used with string values, not numbers or booleans.

The following operators work as follows in regular expression values:

. Match any single character
+ Match one or more of the preceding pattern
* Match zero or more of the preceding pattern
? Match zero or one of the preceding pattern
{x, y} Match between x and y of the preceding pattern
(pattern) Group a pattern, to use preceding operators on
| Combine patterns in an OR operator, ex. (abc|123)
[xy] Match character x or y
[x-y] Match any character between x and y
[^x-y] Match any character except those between x and y
[^xy] Match any character except x or y


Match statements with test activity IDs in the domain: = /*/

Match statements with specific test activities in domain: = /[123]/

Match statements involving the word test in the ID: = /.*test.*/

Match statements involving all actors using '' or '' emails:

actor.mbox in (/, /

Or you can achieve the same result with regex alternatives:

actor.mbox = /.+@example.(com|org)/

 Hint: You can also use regex in simple search fields, but you are required to escape / characters. This example will search for verbs starting with "" and ending in "/completed".mceclip1.png

Composing Expressions

Some examples of how to compose expressions:

AND actor.mbox = '' AND = ' activities/test1 '
OR  result.completion = true OR result.score.raw > 10
!(timestamp < '2017-01-01')
Nesting  (actor.mbox = '' AND result.score.raw > 10) OR timestamp > '2017-01-01'


Results can be pages from the query expression:

Single sort
actor.mbox = '' order by stored descending
Multi sort result.score.scaled > 0.8 order by result.score.scaled desc, timestamp asc


Results can be paged from the query expression:

result.score.scaled = 1.0 limit 10
Limit and offset result.score.scaled = 1.0 limit 50,10

Full query language specification

query := [] [] []
filter :=  AND  |  OR  | () | !(filter) | 
sorting := order by [, ]*
sort-expression := [-] [asc | desc]
paging := limit [,]
filter-expression :=  | 
compare-expression :=  *[=|!=|<|>|<=|>=] *
in-expression :=  [not] in ([,<value])
field := 
value := /regex/ | 
word := * | '*' | "*"
Was this article helpful?
0 out of 0 found this helpful

If you can't find what you need or you want to ask a real person a question, please contact customer support.