From the course: xAPI Foundations

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Building and sending a query

Building and sending a query

From the course: xAPI Foundations

Start my 1-month free trial

Building and sending a query

- [Instructor] As a quick refresher, when you're building your xAPI queries, you can only query by certain parts of the xAPI statements. Those are the agent ID, the verb ID, the activity ID, the statement ID, and you can query for statements that came before or after a given timestamp or even between two timestamps. You can mix and match as many of those elements as you'd like, but you can only use each of them once. So for example, you could not issue a query for any statements that had one of two different verbs. You'd have to issue one query for the first verb ID and then another query for the second. If the LRS found any statements that match the query, it will return an object containing an array of statements. You can then use a loop to walk through each of the statements and pull out the data you need. If you want to query by verb or activity, those are pretty straightforward. You would just use the IRIs that are in the ID field. For example, if you wanted to know all the…

Contents