adlnet / xAPI-Spec

The xAPI Specification describes communication about learner activity and experiences between technologies.
https://adlnet.gov/projects/xapi/
898 stars 404 forks source link

more IRL and alternate request syntax #1065

Open RoboSparrow opened 6 years ago

RoboSparrow commented 6 years ago

Hi, I have a question in regards to statement aggregation and alternative request syntax

All xAPI requests issued MUST be POST.

This requirement includes more IRLs from StatementResult responses?

Example:

POST https://lrs.adlnet.gov/xapi/statements/more/ca717872ff5d526bfdd1f9af67e68590?method=GET

with body

Content-Type=application%2Fjson&Authorization=Basic%20dG9tOjEyMzQ%3D&X-Experience-API-Version=1.0.2

would be a valid xAPI request?

(currently returns 405, method not allowed)

garemoko commented 6 years ago

I would expect the alternate request syntax to be supported for 'more' requests.

RoboSparrow commented 6 years ago

The LRS I tested so far reject it all:

It would be great to include more behaviour into the alternate section as it seems the LRS handle it differently. This complicates aggregation on the client side.

fugu13 commented 6 years ago

There's a bit of confusion here due to confusing wording in the spec. When the spec says

All xAPI requests issued MUST be POST.

That doesn't mean a client using the alternate request syntax must use POST (and the alternate request syntax) all the time, that means when you want to use the alternate request syntax you must use POST.

When you're handed a more link, that's considered an opaque link from the LRS that is suitable for GET requests. If you make a POST-burrowed GET to the Statements resource, you should still do a normal GET when following the more link.

RoboSparrow commented 6 years ago

Two points in favour of clarifying this in the spec: