Having looked at the Activity State API and Agent Profile API aspects of the Document API, we’re now looking at how to use the Activity Profile API.
As with the Agent Profile API, the Activity Profile API component of the xAPI allows you to store some additional information about an activity in a profile, that can later be queried and used in fairly simple things like leaderboards, or more complex things like language maps.
In this post, we’ll take a quick look at how to query and delete Activity Profiles using an API querying tool such as Postman.
Querying the Activity Profile xAPI
If you’re not familiar with Postman, you may find it useful to follow along with this video walkthrough:
Creating an Activity Profile
To create a activity profile, you can use a request similar to the one demonstrated below.
“favourite”: “It’s a Wonderful Life”,
“cheesiest”: “Mars Attacks”
Retrieving a Activity Profile
To get a profile for an activity, you can use the Activity Profile API as demonstrated below.
Retrieving All Activity Profiles
You may want to retrieve all of the profiles associated with an activity. The request below demonstrates how that can be done via the Activity Profile API.
Deleting an Activity Profile
Finally, you may want to forget about the profile or remove an incorrect profile. This can be achieved with Activity Profile API as demonstrated in the request below.
For more practical xAPI advice and support, download our free Technology Manager’s 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