CMI5 API


Introduction

The CMI5 API has a single sub-API which is the CMI5 Token Delivery API.

Getting access to the API

The CMI5 API is always enabled globally.

It is fully accessible to all the clients which have the cmi5/tokens permission enabled.

The API endpoints rely on the store endpoint of each client. In this documentation, we will designate the base endpoint by <store-endpoint>. To get the store endpoint of a client:

  • Go to the Access > API Consumers > Clients page.
  • Click on the (i) icon of a client.
  • The endpoint is indicated next to the Store endpoint labels.

CMI5 Token Delivery API

Creating a CMI5 token

Use the POST method on <store-endpoint>/cmi5/tokens with the following JSON props:

Param Description
activity_id Required IRI. The CMI5 activity identifier.
agent Required JSON encoded xAPI agent. The agent of the learner which is launching the CMI5 activity.
origin Required string. The domain of the LMS which is hosting the CMI5 activity.

This request returns a JSON content with the endpoint and token properties, such as:

{
    "endpoint": "http://trax3.test/trax/api/gateway/clients/default/stores/default/xapi/",
    "token": "NTJlY2FhNzItYmFjOS00NWVhLWJlYjItMzczMTMwNWMyZTdiOjNhZDQ2YWIwLTIwY2EtNDZjNS1iY2RlLWQxMTVjNWVmOGM2NQ==",
}