API: Get Status (and access URLs) of a Release

The Usage API is a (limited) TinCan API used to report usage statistics to Elucidat. The same TinCan statements can be sent to your own LRS simulateously if you choose to use that option.

You must see if there are any active sessions (registrations) for the specified user. This will return a registration (session) id which is required for any subsequent calls. This is illustrated below.

This API is designed to be used from Javascript by an unauthenticated user, so it can only use Basic Authentication. Elucidat do not support GET methods to retrieve arbitrary user data.

Authentication credentials are generally only valid for 24 hours.

See Supported xAPI verbs in Elucidat for the full list of xAPI statements.

 

Javascript

$.ajax({
url: 'https://api.elucidat.com/usage/state',
type: 'GET',
dataType: "json",
data: {
activityId: "https://learning.elucidat.com/course/606efd6593024-60700c170ae6b",
agent: JSON.stringify( {
"mbox": "mailto:nick.cooke@elucidat.com",
"name": "Nick Cooke",
"objectType": "Agent"
} )
},
beforeSend: function (xhr) {
xhr.setRequestHeader ("Authorization", "Basic NjAzM2Q2NzUwYzRlYzpTbmRQU0ZZeVVGUXJRMlZRUm5SallXNDVNR1ppTnprM2VGaElaak5ST1ZaUWEzb3lPRTlISzFGeGNFY3lWelZaVml0Tk4yMUhSa054VGxGMmVucE1Semx2TVZSd2RrRkdVbmwyWVZoNWVURXhZMWszU3pOd2FYaFljSEJ5TXpaaFVYWmpUME5zU0dKUlN6QTk=");
xhr.setRequestHeader ("X-Experience-API-Version", "1.0.0");
},
success: function(response, textStatus, xhr) {
// take the registration, and save it for subsequent calls
if (response.registration)
registration = response.registration;
},
error: function(xhr) {
console.log("Error calling API, status code " + xhr.status + ", message: " + xhr.responseText);
}
});

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

Request support
Access support that’s tailored to you by getting in touch with our Support Team.
Send us feedback
Do you have a new feature request, or want to tell us about something that works well (or not so well) for you? Get in touch!