Is it possible to retrieve an item via the connector API
I want to use citations in a google-docs to extract metadata from citations in zotero-standalone.
Is there a way to take a link in the google-docs like this:
"https://www.zotero.org/google-docs/?2N0jCL"
and convert that to something I can use to retrieve the reference from zotero-standalone via the connector as JSON, for example (fictional API call):
curl 127.0.0.1:23119/connector/getItem/2N0jCL
If this was possible it would be extremely easy to do what I want. I've spent all morning trying to figure this out but have got nowhere.
Thanks
AM
Is there a way to take a link in the google-docs like this:
"https://www.zotero.org/google-docs/?2N0jCL"
and convert that to something I can use to retrieve the reference from zotero-standalone via the connector as JSON, for example (fictional API call):
curl 127.0.0.1:23119/connector/getItem/2N0jCL
If this was possible it would be extremely easy to do what I want. I've spent all morning trying to figure this out but have got nowhere.
Thanks
AM
Upgrade Storage
That random string at the end isn't tied to the Zotero database in any way, so that wouldn't help you retrieve data. You can expose the actual item key in the text by converting the document to a transfer document, as explained on Moving Documents Between Word Processors. To retrieve data, the supported option would be to use the web API. Otherwise you'd have to use the local BBT endpoints.
But I'm not really clear what you're trying to accomplish here. Can you say more (again, ideally on the dev list)?
I'll explain myself for posterity.
I have a research paper written in google docs, with zotero references, but I'm converting it to LaTeX for submission to the journal.
I want to automate that as much as possible, and have the BBT citation keys appear in the exported LaTeX.
I couldn't figure out how to achieve this, so I thought, well if I can just query zotero with each reference I should be able to get the citation keys and do an automated search-replace. But I learn here that it isn't possible with the google-docs references.
As you say, the transfer document has the actual item keys, so in the future I can use this, zoom through the document, lookup each item key and put in the citation key (assuming I can look this up via the BBT json API). The web API doesn't have the BBT citation keys right? So it needs to come from the local connector.
In anycase, I'll not clutter this forum up with more technical information in that case, and will return to zotero-dev when I return to the matter at hand the next time it confronts me.
Thanks
AJSM