Skip to main content

I am trying to use the AgentProfile feature. I am using TinCanJS (https://github.com/RusticiSoftware/TinCanJS

I am trying to store some settings on the agent profile, doing something like: t.setAgentProfile("key21","value",{callback:showAgentProfile})

I can call setAgentProfile with a key, and the first time it works, but when trying to change the value, I get a 409, with error message of: “Resource already existing. Use the 'If-Match' header”. The xAPI spec specifies a lastSHA1 parameter, but adding either ‘*’ or the etag value obtained from getAgentProfile does not work.

I can see a PUT request is generated (to a URL like https://myserver/lrs-api/agents/profile?profileId=blah&agent=blah... ) , and the if-match header is being sent, but the lrs still returns an error.

I have figured out a workaround (delete the profile first, and then set it), but it could produce errors, hoping somebody has encountered this problem before?

Be the first to reply!

Reply