How to send extra data as IDs?

15 views
Skip to first unread message

Marian Diaconu

unread,
May 31, 2018, 3:57:21 AM5/31/18
to xAPI Video CoP
Hi all! I want to ask a question about xApi if possible. I would like to store, toghether with the statement some IDs, like organizationID or communityID, because I have users that can belong to more than an organization or community. Is this possible with xApi and LL? So far I couldn't find a key that could store these informations. For ecample if I store it in attachment like this:

statement.attachment = { 'sessionId' : this.sessionId};

LL sends me this error:

{"errorId":"37a93d90-12c6-47f9-b49d-69e07f58f125","warnings":["Unknown keys (attachment) set in 'statements.0'"]}

What could I do in your opinion? Thanks

Pankaj Agrawal

unread,
May 31, 2018, 4:44:43 AM5/31/18
to Marian Diaconu, xAPI Video CoP
Depending on what the extra information is related to, you can add the information, in either of:
object.definition.extensions
context.extensions
result.extensions

You can see some examples below in the xAPI Spec document: 


Also note that even if it is in the extensions property in above specific properties of statement. The identifier for your information needs to be an IRI.

For commonly used/published extensions instead of building your own IRI, you can refer to this directory:


Regards,

Pankaj Agrawal

--
You received this message because you are subscribed to the Google Groups "xAPI Video CoP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xapi-video-cop+unsubscribe@googlegroups.com.
To post to this group, send email to xapi-video-cop@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xapi-video-cop/16257045-d33a-4b6e-b21d-0126974e7f02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marian Diaconu

unread,
Jun 7, 2018, 5:01:14 AM6/7/18
to xAPI Video CoP
Thanks Pankaj Agrawal! Yes I am doing So. But What do you think about storing extra data in this way:

For Example:
I have videos that belongs to organization, community and course.  So the statements would be related to those data structures.

I could generate the statement.context.registration as an UUID and store internally, like in a DB table, the association
  registrationId <--> (organizationId, communityId, courseId, videoId)
And when I want to query the LRS I should first query my internal DB in order to understand which registrationId I need to use, and then query the LRS only by sending the specific registrationId and it should give me back the statements that i am interessed to.

What do you think about that? Is this a good approach or should I change it?

Pankaj Agrawal

unread,
Jun 7, 2018, 1:55:24 PM6/7/18
to Marian Diaconu, xAPI Video CoP
Marian

Could be possible solution, but depends on how these are related: organizationId, communityId, courseId, videoId

Also if registration value doesn't change for a user/video combination, you need to understand that as per Video Profile, the past progress on the video will be carried over to the new attempts of that video. 

If it is of any use, you could probably also add organizationId, communityId to Context Extension, and  courseId to grouping extension. 











Regards,

Pankaj Agrawal

--
You received this message because you are subscribed to the Google Groups "xAPI Video CoP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xapi-video-cop+unsubscribe@googlegroups.com.
To post to this group, send email to xapi-video-cop@googlegroups.com.

Marian Diaconu

unread,
Jun 8, 2018, 4:09:09 AM6/8/18
to xAPI Video CoP

Hi Pankaj Agrawal,


Thanks a lot for your answer. This kind of confrontation I was looking for. 
The real relationship between that entities is rappresented by this hand made diagram.

So I have users that belongs to an organization and they can be registered into a community, and of course courses. 
I like your insights, but I would like to be sure that what I am going to do is compliant with the CoP


Reply all
Reply to author
Forward
0 new messages