[annotator-dev] Store endpoint question
Rick
rmercer33 at gmail.com
Thu Nov 27 04:48:41 UTC 2014
Hi All,
I've been struggling to understand how the store API's are called in
annotator 1.2.9
I found that when a POST endpoint returns {"id":"xyz"} the PUT and DELETE
endpoints are called with the expected pattern, /api/annotator/:id.
When POST returns {"_id":"xyz"}, then the PUT and DELETE endpoints are
called with the pattern /api/annotator.
So, now I know to have POST return {"id":"xyz}.
But, in the case where I attempt to update an annotation that has been
loaded from the store using the store plugin loadFromSearch option, the PUT
does not use the /api/annotator/:id pattern.
I hope this is clear.
I'm using mongodb. Mongo creates an id called '_id' and there is no 'id'
field in the annotation and I wonder if this is why the /api/annotator/:id
pattern is not used for PUT.
Does the annotation require and 'id' field?
Thanks for your input on this.
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/annotator-dev/attachments/20141126/e448fcd3/attachment-0003.html>
More information about the annotator-dev
mailing list