What are xAPI and Webhook?
xAPI and the Webhook are ways to transfer data from one software to another - similar to Lessonly's API. The difference is xAPI/Webhook can be thought of as a “push” delivery method, while the API is a "pull" method.
In more layman's terms - "... Neighbor A and Neighbor B share sugar back and forth. When Neighbor A goes over and knocks on Neighbor B's door asking for sugar this would be an API request (pull). However, if Neighbor B bought sugar over by throwing it over the fence to Neighbor A this would be the xAPI/webhook method (push)."
What Data is Sent Over for xAPI and Webhook?
Both xAPI and the Webhook send data over from one third-party system to Lessonly. More specifically, they send what are called events. This means any time the listed events occur it is shot over to another system in real-time.
The events sent over for the webhook and xAPI are:
In-Person Training Session Attended
How to Implement xAPI?
To enable this feature, please reach out to the Support team at email@example.com and they can enable the webhook/xAPI on the backend.
Once confirmed this has been enabled, follow the below steps:
1. Select on the gear icon in the upper right-hand corner of the Lessonly screen.
2. Select Settings.
3. Navigate to the API and Webhook tab.
Depending on which solution is being implemented, select the New Subscription button for Webhook or xAPI.
Lessonly's xAPI can handle multiple set-ups. The reporting webhook, user action webhook, and xAPI can all be used simultaneously.
4. After selecting either xAPI and Webhook, the user is presented with the below screen.
5. Input the Payload URL (this is where the events are sent), the token to authenticate, and the version.
The Payload URL can be found in the chosen LRS.
“/statements” must be added to the end of the URL when dropped into the corresponding field.
For example, let’s say the URL is https://sandbox.watershedlrs.com/api/organizations/9541/lrs.
In the final version, the URL would look like https://sandbox.watershedlrs.com/api/organizations/9541/lrs/statements
6. Next, create the token. In order to do so, the token needs to use a base64 encoder. Lessonly recommends using this site: https://www.base64encode.org/
The LRS provides a Key and Secret column to aid in the encoding process. Grab the keys from the LRS and type/paste them into the grey box. The format of the encoding is key:secret
Be sure to enable the "Perform URL safe encoding (uses Base64URL format) checkbox located above the "ENCODE" button.
For example, if the key is "1234" and the secret is "5678." Then the format would be "1234:5678." Then select encode.
7. Then copy and paste the token into the token field on the Lessonly side.
9. Once input, refer back to the LRS and refresh the page. Events should then begin to populate.
If events have not been sent to the URL in over a day or errors are occurring reach out to Lessonly Support.
What is the Difference Between xAPI and Webhook? (generally speaking)
The primary difference between xAPI and a webhook is the output of the data. xAPI is an eLearning specification making it possible to collect data about the wide range of experiences a person has within online and offline training activities. A webhook is not specified to eLearning outcomes and can be used to send any type of event information.
Said another way, in order for a client to gather data through Lessonly's xAPI they must have an LRS (Learning Record Store). An LRS is is a data storage system serving as a repository for learning records collected from connected systems where learning activities are conducted. If a client does not have an LRS they cannot gather data through Lessonly's xAPI.
If you have any questions please reach out to Support at firstname.lastname@example.org.