Generating Key For Web API
The docs for the web API suggest that it is acceptable to generate your own key for new items before syncing them to the server (as long as you are keeping track of all the keys to avoid collisions). I want to make use of this feature as without it I would have to do a great deal of bookeeping to first sync any parent objects I want to create before I can fill in the parent key on any children I want to create.
However, I was unable to find any documentation about what properties the key must satisfy. Is it anything that matches [A-Z0-9]{8} or does it need to be of a certain form or what?
Any Thoughts,
Peter
However, I was unable to find any documentation about what properties the key must satisfy. Is it anything that matches [A-Z0-9]{8} or does it need to be of a certain form or what?
Any Thoughts,
Peter
You know if you want https://api.zotero.org/users/{userid}/items/{itemkey}/children what you would fill in to {itemkey}.
The question is if I am using the API to create multiple items at once and I want to fill the key into the JSON data I'm uploading rather than wait for a key to be generated for me what is a valid key, i.e., in my JSON dictionary I need to set key => somenewuniquevalue what are the restrictions on that?
By the looks of the code here the key should be [A-Z2-9]{8}.
Also, questions regarding development for Zotero are better suited for the zotero-dev mailing list (it is okay to continue the thread here if you have further questions regarding this).
Is it really [A-Z2-9]{8} not [A-Z0-9]{8}? Why?
I really appreciate the info.
$allowedKeyChars = "23456789ABCDEFGHIJKLMNPQRSTUVWXYZ";
0, 1, and O aren't allowed to keep the keys more human-readable, though we might relax that restriction at some point.