Learning Analytics Documentation

xAPI data can be written directly to the LRW using standard xAPI approach.

The endpoint is:

Authentication uses basic authentication.  
Each application should have a client set up in Learning Locker, and use these credentials.
The following code example shows posting an xAPI statement in python, where 'statement' is a properly formed xAPI statement.
Note the header - this must contain 'X-Experience-API-Version': '1.0.0'
def postStatement(self,statement,xapiusername,xapipassword):
url = 'https://jiscv2.learninglocker.net/v1/data/xAPI/statements'
base64string = base64.encodestring('%s:%s' % (xapiusername, xapipassword)).replace('\n', '')
headers = {'content-type': 'application/json', 'Authorization': 'Basic ' + base64string,
'X-Experience-API-Version': '1.0.0'}
response = requests.post(url, statement, headers=headers)