Closed TylerDixon closed 2 years ago
There's definitely a lot of confusion around PUT vs POST for documents so we need more clarity.
In the particular case you mention, I the LRS is expected to store the document if it does not exist. I wouldn't expect PUT/ POST requests to the document API to ever return 404.
Per the 2/1/17 call, clarify with response codes as needed for distinctions between PUT and POST.
Looking at 2.2 Document Resources section, there is talk of using
POST
to merge, andPUT
to replace all together, but I can't find any specific details in there that say what to do in the case of aPOST
(orPUT
).There is a line stating:
Content (PUT | POST): The document to be stored or updated.
, but describing both methods on the same line like this still feels non-specific and confusing.I would assume for
POST
, the correct case is "create if doesn't exist" (respond204
), but I could seePUT
could going either way, failing or not failing (204
or404
).