Skip to main content

xAPI setAgentProfile - cannot overwrite


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?

Did this post help you find an answer to your question?

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings