Storyline Tincan and State API issue
Jan 14, 2015
By
Kien Vu
Hi there,
We are developing a LRS system and try to test Articulate Storyline Tincan content.
However, we are having an issue with state API.
Articuatle Storyline 2 send state to LRS state API as a string. However, in the xAPI specs, it states that the document to send to state API need to be a JSON format.
https://github.com/adlnet/xAPI-Spec/blob/master/xAPI.md#docapis
Could you please explain the reason for sending this a string or do I misunderstood the xAPI specs?
Regards,
Kien
10 Replies
Hi Kien!
I'd certainly recommend to the Articulate developers that they use a JSON document to store their bookmarking data. There's certain LRS requirements in the spec that allow values within bookmarking data to be individually updated if a JSON object is used, and I imagine that a JSON object would make things easier for developers wanting to access this data as part of a Storyline plugin or something.
It's not a requirement of the spec to do so though and a plain text string is absolutely allowed. In fact, any type of document can be stored including media, office documents, PDFs, even things like Open Badges.
It's also worth noting that building an LRS is hard. There are a number of commercial and open source LRS that will likely be cheaper than building one yourself. Email me andew.downes@tincanapi.com if you'd like to chat about these in more detail.
Hi Andrew,
Thank you for this.
In the xAPI specs, session 7.3 Document APIs, it states that:
"If the original document exists, and the original document or the document being posted do not have a Content-Type: of "application/json", or if either document cannot be parsed as JSON Objects, the LRS MUST respond with HTTP status code 400 Bad Request, and MUST NOT update the target document as a result of the request."
From this, I understand that the document need to be a JSON format, otherwise return 400 Bad request.
Could you please explain a bit more for us about this?
I tried read the specs many times but I could not see any place that it mentions about any type of document can be accepted for document API.
Thank you for your suggestion regarding using other LRS.
Cheers,
Kien
Hi,
The important part of that quote for this question is the "If" at the start. This is specific behaviour if the Document is a JSON object and doesn't apply if the Document is not. This section also only relates to Documents stored using the POST method, whereas presumably (hopefully!) Storyline will be using PUT.
The part of the spec that makes clear that documents can have any type is the table in section 5.1 which lists the type of the document contents as "Arbitrary binary data". See https://github.com/adlnet/xAPI-Spec/blob/a752217060b83a2e15dfab69f8c257cd86a888e6/xAPI.md#miscdocument
Does that help clarify?
Andrew
Hi,
I am also in the process of developing an LRS and I passed the xAPI conformance test.
However, I had exactly the same issue when trying to play Articulate content.
Andrew, you are right when you say that documents can have any type.
However, my understanding of the spec is that the content-type in the request header should match with the content you really send to the LRS.
The problem is that Storyline set the content-type to "application/json", but the content is not a JSON content.
This may be considered as an inconsistency by the LRS and may result in an Error 400.
Greetings, Sébastien.
The mismatch between Content-Type and content within some PUT methods is a known issue. It'll be fixed in the next software update for Storyline. We'll update this thread when that happens. Thanks!
Awesome news!
Great news! Thanks Justin.
Hi All!
Articulate Storyline 2 Update 5 is now available for download. It includes WCAG 2.0 support, several new accessibility features, better HTML5 performance, and bug fixes. Click here for details:
Thanks Emily!
No problem Andrew! We are glad to have this released!
This discussion is closed. You can start a new discussion or contact Articulate Support.