As more and more people start using the xAPI we’re increasingly being asked about how xAPI can be used beyond reporting; things like how to connect different tools and how to incorporate a Learning Record Store (LRS) into their learning technology stack – or learning ecosystem, as we prefer to call it.

In particular, we often get asked about how the xAPI can be used to launch elearning content.  

We get asked so often in fact (and feel that it’s such a great benefit) that we included a level object that covers this very subject in our recent LearnxAPI MOOC.

But, alas, if you’re not on that course – and maybe even if you are – it’s likely that you still have questions.  

In this post, I hope to provide some answers. It does get a little technical in places (we are talking about the xAPI here!), but here goes…

Firstly, what does it mean to “Launch” content?

In simple terms, launching content is what happens when a Learning Provider (such as an LMS) provides users with access to content, via a link for example.

When users then accesses the content, it is the content itself that uses the xAPI, rather than the Learning Provider.

When users then access the content, it is the content itself that uses the xAPI, rather than the Learning Provider

Why would the content want to use the xAPI?

By using the xAPI itself, many Learning Providers can easily reuse the content without having to also design and implement the xAPI integrations that are specific to the content.

Instead, the xAPI integrations are usually implemented by an authoring tool, like Adapt or Storyline. Which is important if you want to avoid vendor lock-in.

For example, if you decided to change Learning Provider, you can still use your existing content without losing the valuable xAPI integrations that power your analysis and reporting.

By using the xAPI itself, many Learning Providers can easily reuse the content without having to also design and implement the xAPI integrations that are specific to the content.

How does Learning Content Use the xAPI?

Whilst the content can attempt to use the xAPI itself, there is still some work for the Learning Provider in order to provide (deliver) the xAPI-enabled content.

For example, the Learning Provider usually needs to provide the content with the following details:

  • The xAPI actor i.e. who/what has launched the content
  • The xAPI context that the content has been launched in (such as a course)
  • The LRS connection details, which typically include an endpoint and authentication details

Once the content has been provided with these details, it can use the xAPI like anything else.

Sometimes these details are actually packaged into the content (via a JSON file, for example), but often they may be passed via URL parameters, like this:

Once the content has been provided with these details, it can use the xAPI like anything else. Sometimes these details are actually packaged into the content (via a JSON file, for example), but often they may be passed via URL parameters

There are however some security issues to be aware of, like providing authorisation details via URL parameters.

To resolve this issue, the ADL created the xAPI Launch Algorithm, which…

  • ensures that the content does not receive direct access to the LRS
  • enforces some restrictions on the xAPI integrations

So instead of connecting to the LRS directly, content instead connects to a Launch Server using temporary access tokens that are restricted to allowing statements for a specific actor.

To resolve security issues, connects to a Launch Server using temporary access tokens that are restricted to allowing statements for a specific actor

How Do You Use The Launch Algorithm?

If you’re a Learning Provider, you probably want to know how you use the Launch Algorithm…

There are essentially three steps for the Learning Provider:

1. Firstly, the Learning Provider receives an HTTP request to launch content from a user’s browser

2. The Learning Provider then sends a HTTP request to create a launch on the Launch Server, which responds with a temporary access token. (When creating the launch, the Learning Provider provides the xAPI actor and context to be used in statements.)

3. Finally, the Learning Provider redirects the user to the launch content and provides the Launch Server endpoint and access token in the URL parameters.

Diagram of how to use the launch algorithm

How Does Content use the Launch Algorithm?

When the content is initially opened in the browser, it needs to send a HTTP request to initialise the launch on the Launch Server.

The HTTP request needs to utilise the Launch Server endpoint and access token that were provided in the URL parameters.  And the Launch Server, then responds to the HTTP request with the xAPI endpoint, actor and context.

With those details, the content can then utilise the xAPI endpoint in the usual way; with the xAPI actor and context provided in all statements.

When the user is finished with the content, the content sends a final HTTP request to the Launch Server to terminate the launch which then invalidates the access token.  For example, if a user closes the browser window through which they are accessing the content.

Diagram of how content uses the launch algorithm

And Finally: How do you get a Launch Server?

So you’ve got your LRS – and you’ve got your Learning Provider and content using the Launch Algorithm, but… how do you actually get a Launch Server?

The ADL have kindly provided a demonstration of how a launch server can be implemented alongside their description of the algorithm.

However, at HT2 Labs we like to save people time (as well as money) so we’ve created our own implementation which we host for our Enterprise LRS SaaS clients.

Hopefully that’s answered all of the questions that you had about launching learning content that uses the xAPI.

If not, we’re here to help – just get in touch.

If you’re interested in learning more about the xAPI, download our comprehensive xAPI Guide.