Multiple tag deletion requires "version" header, but it isn't present in tags response

18 views
Skip to first unread message

Stephan Hügel

unread,
Jun 30, 2016, 6:47:10 AM6/30/16
to zotero-dev
I'm implementing multi-tag deletion in Pyzotero, and the docs say that a version key is required for If-Unmodified-Since-Version. However, no version key is returned by a call to /tags, so there doesn't seem to be a way to add it. Can it be added to the API response, or is there a different way of getting it?

Dan Stillman

unread,
Jun 30, 2016, 6:59:34 AM6/30/16
to zoter...@googlegroups.com
On 6/30/16 6:47 AM, Stephan Hügel wrote:
I'm implementing multi-tag deletion in Pyzotero, and the docs say that a version key is required for If-Unmodified-Since-Version. However, no version key is returned by a call to /tags, so there doesn't seem to be a way to add it. Can it be added to the API response, or is there a different way of getting it?

For multi-object writes, If-Unmodified-Since-Version is checked against the current library version. You get that from Last-Modified-Version in a previous multi-object GET or a write request (single or multiple).

https://www.zotero.org/support/dev/web_api/v3/syncing#version_numbers

(For adding/updating other object types that have embedded versions, you have the option of ignoring If-Unmodified-Since-Version/Last-Modified-Version entirely and letting the 'version' JSON property do the work automatically, but that doesn't work for /tags or for DELETE requests in general.)

Stephan Hügel

unread,
Jun 30, 2016, 8:38:52 AM6/30/16
to zotero-dev
Ah, my bad, I didn't think to check the headers. Works perfectly. Thanks!
Reply all
Reply to author
Forward
0 new messages