xAPI

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. Alternatively you can use OAuth by creating a bearer token, however, when using the xAPI via a server Basic auth should be sufficient and when using the xAPI via a client we recommend using the ADL launch algorithm with an xAPI launch server.

Route

Description

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.

1 2 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.

1 2 3 4 5 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.

Learning Locker and the Squirrel logo are trademark of Learning Pool 2020 | Learning Locker is licensed under GPL 3.0.