If you’re just getting started with the xAPI, there are a few things that you need to know when setting up your learning record store (LRS), and in particular, how to setup basic xAPI statements using the Actor > Verb > Object triplet.
In this post, we’ll be looking at the ‘Actor’ element – what it is, how it’s used and what correctly programmed statement anatomy looks like.
Understanding the Actor Element of an xAPI Statement
So, first things first – an actor can be one of two things: an Agent or a Group.
Agents can be identified in 4 different ways:
The mbox is basically the user’s email address. For example:
“name”: “John Smith”,
mbox_sha1sum is an encrypted version of the email address. For example:
The openid is the URL. For example:
The account element has both a name (which is like a user identifier) and a homepage which is usually the URL of the website that the activity is taking place on. For example:
Group actors can be either identified or anonymous.
As with agent actors, a group can also be identified by the above 4 elements – in which case it is an ‘Identified Group’. For example:
“member”:  }
Both group types can have members: if the group is not an ‘Identified Group’, it is an ‘Anonymous Group’ and must have at least 1 member. For example:
An Example Actor Statement Summary
If you’re wondering what a complete Actor statement looks like, here it is:
So to recap, an actor can be one of two things: an Agent or a Group. You’re probably going to use an Agent for the most part. An Agent can be 4 different ways: mbox, mbox_sha1sum, openid, or an account; but we’d recommend using an account.
Next up, we’ll be taking a look at the Verb Element of an xAPI Statement.
For more practical tips and advice about the xAPI, download our Technology Managers Guide to xAPI
Starting as a placement student in 2014, Ryan re-joined the Learning Locker team after graduating from Oxford Brookes University where he won the John Birch prize for the highest grade average in the University.
From his minimalist desk, Ryan leads the Learning Locker team and consults with people on all things xAPI to conscientiously craft products and services that sustain and evolve training and performance.
When he’s not swimming or injuring himself on the cricket field, Ryan enjoys playing funny (and usually inappropriate) games with his family.
Get started by telling us what you need and one of our team will be in touch very soon.
+44 207 101 9383
US +1 857 284 1420
+44 345 074 4114*
US +1 844 238 5577
* call charges vary depending on your provider