xAPI and Activity Streams have a lot in common. Many know that Activity Streams was the foundation for some of the core concepts in the xAPI, like the “I did this” statement structure. We based xAPI on Activity Streams because it’s a brilliant model. By tying xAPI into another emerging spec there’s huge potential for compatibility and data that can be pulled in to do greater things.
Since statements are probably the most visible and easy to grasp part of the Experience API, it’s easy to understand why so many draw the comparison. But, with Activity Streams, there wasn’t quite enough there for the learning community, so we needed to add a lot more to fulfill our requirements.
The Little Differences
The Experience API builds on Activity Streams’ event descriptions by adding a number of things to statements. Like:
-
The xAPI actor is defined differently, we include ways to identify an actor from many different systems in different ways. We also have the capability for the actor to be a team.
-
We added an object for ‘result’ to better collect outcomes of activities in a learning context.
-
We added ‘context’ so you can record activities done in context. This is a modification of targets in Activity Streams, targets would say “I did this to…” Adding context allows us to say “I did this with…”
The Big Differences
Outside of statements, xAPI is drastically different from Activity Streams. The four APIs (Statement, State, Agent Profile, and Activity Profile) have no parallels in the Activity Streams specification. The concept and rules for a learning record store are new to xAPI as well.
The Fun Part
The specification for Activity Streams has a great list of well defined verbs and activity types that we can use in xAPI statements. For the sake of good data, you’re better off using a definition that’s already being used than creating your own.
We did trot over and ask the Activity Streams working group how they would like us to reference their verbs and object types in xAPI statements. Will Norris explained this is the best way to do it:
Use this as the root for the schema:
http://activitystrea.ms/schema/1.0/
Then append the verb or object name defined in that schema, like so:
http://activitystrea.ms/schema/1.0/access
http://activitystrea.ms/schema/1.0/game
Here is where you will find the full Activity Streams Registry. The object types are great for defining activity types in xAPI statements. And the verbs are, well, good for verbs.
There it is. xAPI and Activity Streams are pretty well aligned on JSON objects, but we added some bells and whistles. The rest of the xAPI spec is built specifically for storing and transferring records of learning experiences, it has little to do with Activity Streams.