Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more IRL and alternate request syntax #1065

Open
RoboSparrow opened this issue Sep 12, 2017 · 4 comments
Open

more IRL and alternate request syntax #1065

RoboSparrow opened this issue Sep 12, 2017 · 4 comments
Labels

Comments

@RoboSparrow
Copy link
Contributor

RoboSparrow commented Sep 12, 2017

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
Copy link
Contributor

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

@RoboSparrow
Copy link
Contributor Author

RoboSparrow commented Sep 12, 2017

The LRS I tested so far reject it all:

  • adl.lrs: 405
  • scormCloud: 400
  • lxHive: 400
  • learninglocker: 200, but expects query params to be retained in url

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
Copy link
Contributor

fugu13 commented Sep 12, 2017

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
Copy link
Contributor Author

RoboSparrow commented Sep 12, 2017

Two points in favour of clarifying this in the spec:

  • when automating aggregation on the client side you want to deal with one continuous syntax mode, i.e setting up the initial query and then let the aggregator recurse until more is empty.

  • An LRS may include the initial query into the more IRL (we're doing this at lxHive and so does learninglocker). This raises the problem of query length boundaries also here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants