Problem in HTML link in JSON result of API query

Hi,

If you launch an HTTP query like this:

https://api.zotero.org/users/123456/items/ABCDEDFG/tags?key=ABCDEDFG123456789

Where IDs are of coruse fakes for the demonstration, you get this result:

{
tag: "element",
links: {
self: {
href: "https://api.zotero.org/users/123456/tags/element",
type: "application/json"
},
alternate: {
href: "http://zotero.org/users/123456/tags/element",
type: "text/html"
}
},
meta: {
type: 0,
numItems: 76
}
}

Unfortunately, the HTML link "http://zotero.org/users/123456/tags/element" does not work .

If you want to use it, you needs to make another query that returns a block containing "library" data, then you can get back the user name and replace in the url above with that name, and now it's work:

https://www.zotero.org/user_name/items/tag/element

2 possible resolutions to fix this problem:
- the Web/HTTP server reroutes well the url"http://zotero.org/users/123456/tags/element"
- The JSOn API returns the well url: "https://www.zotero.org/user_name/items/tag/element"

Thanks.
Sign In or Register to comment.