xAPI HTTP Interface

Learning Locker’s HTTP interface conforms to the xAPI specification. The xAPI defines how to record learning experiences for analysis and serves as a guide to maximise interoperability between services that provide learning experiences.

The table below describes the routes that the HTTP interface provides, all of the URLs are relative to http://www.example.org/data/xAPI where http://www.example.org is the URL of your Learning Locker instance. To access this interface, you must additionally supply your Basic Auth details with each request in the Authorization header. Your Basic Auth details can be found under Settings > Clients.

Route Description
GET /about Retrieves information about the LRS.
PUT /statements Stores a single statement.
POST /statements Stores a single statement or multiple statements.
GET /statements Retrieves statements.
PUT /activities/state Creates or overwrites a state document.
POST /activities/state Creates or merges a state document.
GET /activities/state Retrieves a single state document or multiple state identifiers.
DELETE /activities/state Deletes a single state document or multiple state documents.
GET /activities Retrieves a fully described activity.
PUT /activities/profile Creates or overwrites a profile document.
POST /activities/profile Creates or merges a profile document.
GET /activities/profile Retrieves a single profile document or multiple profile identifiers.
DELETE /activities/profile Deletes a single profile document.
GET /agents Retrieves all of the agents used by a person.
PUT /agents/profile Creates or overwrites a profile document.
POST /agents/profile Creates or merges a profile document.
GET /agents/profile Retrieves a single profile document or multiple profile identifiers.
DELETE /agents/profile Deletes a single profile document.

GET /about

This route returns a JSON encoded object containing information about the LRS. A request to this route would look something like the request below.

GET http://www.example.org/data/xAPI/about
Authorization: YOUR_BASIC_AUTH

A request like the one above, will respond with a 200 response with a response body like the JSON below, which contains an array of the xAPI versions supported by your Learning Locker instance.

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Experience-API-Version: 1.0.3

{ "version": ["1.0.1"] }

For more information, view the GET /about route in the xAPI specification.