Subcollections in API
Hi, there is currently no way to obtain all items in subcollections of a specified collection in the API. In the Zotero interface, we can see these by using the 'recursiveCollections' setting in the configs.
This could be achieved by adding a
<userOrGroupPrefix>/collections/<collectionKey>/collections/children/items
setting or something like that in the API which would return all items in children of a collection.
Another approach would be to add an entry:
<zapi:collection>Collection_ID_here</zapi:collection>
in the ATOM results for each entry. So, when we make a request to
https://api.zotero.org/groups/GROUPID/items/
We would be able to identify which items belong to which collections. Note that this is currently impossible.
These features would be extremely useful to us and would, for example, prevent us from making 100 API requests to obtain the newest entries for the 100 subcollections in one of our collection.
Thanks!
This could be achieved by adding a
<userOrGroupPrefix>/collections/<collectionKey>/collections/children/items
setting or something like that in the API which would return all items in children of a collection.
Another approach would be to add an entry:
<zapi:collection>Collection_ID_here</zapi:collection>
in the ATOM results for each entry. So, when we make a request to
https://api.zotero.org/groups/GROUPID/items/
We would be able to identify which items belong to which collections. Note that this is currently impossible.
These features would be extremely useful to us and would, for example, prevent us from making 100 API requests to obtain the newest entries for the 100 subcollections in one of our collection.
Thanks!
This discussion has been closed.
(Also, better to post API questions to zotero-dev.)