The CMI5 API has a single sub-API which is the CMI5 Token Delivery 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:
Access > API Consumers > Clients page.(i) icon of a client.Store endpoint labels. 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==",
}