Import XAPI is an import component in workflows of LearnSphere to make your work around querying and analyzing xAPI data from Learning Record Store fast and easy.
1.1 Use
Below, we assume you have already accessed the workflows interface of LearnSphere and own the authentication information of LRS (URL, Username/Key, and Password/Secret).
- Drag the Import XAPI component into the workspace to begin.
- Click the gear symbol, and the Import XPAI interface display.

- Fill the basic authentication information of LRS in Import XAPI interface: URL, Username, Password.
- Choose Filter (use Learning Locker as the example)
There are a number of filters avialable that function to help us filter the same group of xAPI data, they are:
For example, a verb "matchAnswer" can be queried by its id "https://umiis.github.io/ITSProfile/System/matchAnswer" in Learning Locker.
SaveKCScore -- https://umiis.github.io/ITSProfile/verbs/SaveKCScore
Evaluate -- https://umiis.github.io/ITSProfile/System/Evaluate
......
For example, the actor Liang Zhang can be queried by its mbox "mailto:lzhang13@memphis.edu".
The time should come from the timestamp of xAPI statement in Learning Locker, e.g 2019-05-03T21:28:48.099Z.
Same time format and rules with filterBySince.
The activity id from xAPI statements of Learning Locker.
For example,
"activities": [
"https://et0.x-in-y.com"]
The activity id is "https://et0.x-in-y.com".
The registration id can be used,which usually displays in the tail section of xAPI statement in Learning Locker.
For example, registration id is "51a6f860-1997-11e3-8ffd-0800200c9a66"
The FilterValue should be the indentified value of some corresponding filter function in xAPI statement. For example, FilterValue for filterByVerb is the verb id, which you can find from the xAPI statement of LRS.
This function help us to query the specified statement by statement id.
These filters can also be chained together to created more complex queries, such as:- filterByVerb_filterBySince
- filterByVerb_filterByUntil
- filterByActor_filterBySince
- filterByActor_filterByUntil
For example:
filterByVerb_filterBySince ---- filterValue: "https://umiis.github.io/ITSProfile/verbs/transition,2019-06-04T16:17:26.484Z";
filterByActor_filterBySince ---- filterValue: "mailto:keithshubeck@gmail.com,2019-06-04T16:17:26.484Z".
- Determine the QueryPath and name headers.
The QueryPath refers to the list of keys at all levels targeted to the queried value within xAPI statements.
Example 1
"actor": {
"objectType": "Agent",
"name": "Landon Lindsay",
"mbox": "mailto:landonlindsay5272@example.com"
},
If you query name, the query path should be "actor,name".
Example 2
"context": {
"extensions": {
"http://autotutor.x-in-y.com/AT": {
"timeTaken": 20048,
"timeNow": "2019-05-20T18:28:50.569Z",
"timeStart": "2019-05-20T18:28:30.521Z",
"SKOTitle": "BEETLE:BEETLEQ6",
"UserStudent": "Landon",
"fullname": "Landon Lindsay",
"user": "landonlindsay5272@example.com"
}
}
}
If you query timeTaken, the query path should be "context,extensions,http://autotutor.x-in-y.com/AT,timeTaken".
Note:
- When the QueryPath string includes symbol like "&", ";" ,and number, like "https://umiis&46;github&46;io/ITSProfile/Extensions/grouping", use the "." to replace the signs. Then this QueryPath should become like "https://umiis.github.io/ITSProfile/Extensions/grouping".
The headers can be named whatever that you/models need, for which you may refer DataShop format requirements.
Also textfields of both QueryPath and Headers are addable automatically in the panel once previous one is filled (except the first one).
- Determine the Limit to number of xAPI statements.

EXAMPLE 1 Basic Query Case
Url: http://lrs.x-in-y.com/data/xAPI/
Username: ********************
Password: ********************
Filter: filterByVerb
FilterValue: https://umiis.github.io/ITSProfile/verbs/SaveKCScore
QueryPath01: verb,display,en-US
Headers01: Action
QueryPath02: actor,name
Headers02: Student ID
QueryPath03: context,extensions,http://autotutor.x-in-y.com/AT,timeTaken
Headers03: Time
Limit: 25
Results:

EXAMPLE 2 How Many Person [did] this (a verb) in last 24 hours?Here we use the verb "matchAnswer".
Url: http://lrs.x-in-y.com/data/xAPI/
Username: ********************
Password: ********************
Filter: filterByVerb_filterBySince
FilterValue: https://umiis.github.io/ITSProfile/System/matchAnswer,2019-06-04T20:24:26.931Z
QueryPath01: actor,name
Headers01: Student Name
QueryPath02: verb,display,en-US
Headers02: Action
QueryPath03: context,extensions,http://autotutor.x-in-y.com/AT,timeTaken
Headers03: Duration
QueryPath04: id
Headers04: Statement Id
QueryPath05: timestamp
Headers05: Time
Limit: null
Results: See Attached File
EXAMPLE 3 [individual] interact with [SKO] in the last week.
Url: http://lrs.x-in-y.com/data/xAPI/
Username: ********************
Password: ********************
Filter: filterBySince
FilterValue: 2019-05-28T16:17:26.484Z
QueryPath01: actor,name
Headers01: Student Name
QueryPath02: verb,display,en-US
Headers02: Action
QueryPath03: context,extensions,http://autotutor.x-in-y.com/AT,timeTaken
Headers03: Duration
QueryPath04: timestamp
Headers04: Time
Limit: null
Results: See Attached File