Support #22298
closedList of records under a particular group
100%
Description
I'm trying to investigate an issue with a mismatch as regards GRSF records with scientific advice.
The Knowledge Base report 651, while GRSF VRE reports 577.
My question is if and how I can retrieve the IDs or URLs of those records that fall under this group (see screenshot attached).
I would like to do so in order to investigate what happens with the missing ones, without traversing through the results page and clicking them one by one.
@francesco.mangiacrapa@isti.cnr.it do you have any ideas about how to retrieve them? Could you provide me with that list of records IDs or URLs?
Files
Updated by Francesco Mangiacrapa over 3 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Hi Yannis,
I'm adding @luca.frosini@isti.cnr.it as watcher.
In order to get the list of records under a particular group or another filtering option, you can use the gCat service with filtering options as documented at https://wiki.gcube-system.org/gcube/GCat_Service#Filtering_options
In your case the query is (you need to replace the placeholder [GRSF_PUBLISHER_TOKEN] with the proper gcube-token
of "grsf.publisher" user in the "GRSF_ADMIN" VRE):
https://api.d4science.org/catalogue/items?q=organization:grsf_admin&fq=groups:scientific-advice&gcube-token=[GRSF_PUBLISHER_TOKEN]
if you want to count them, you need to add count=true
in the query string.
The results are list of items, by default 10 items for page are returned. You can get paginated results by using the query parameters limit and offset (see more at https://wiki.gcube-system.org/gcube/GCat_Service#List_Items)
Lastly, for each item (name) returned you can perform the read operation per item (see at https://wiki.gcube-system.org/gcube/GCat_Service#Item_Collection)
E.g. for item name = fb9c253b-2916-38c5-bf3a-857ec18cf1a5, you need to perform:
https://api.d4science.org/catalogue/items/fb9c253b-2916-38c5-bf3a-857ec18cf1a5&gcube-token=[GRSF_PUBLISHER_TOKEN]
to read/get the item requested.
Updated by Yannis Marketakis over 3 years ago
- Status changed from Feedback to Closed
Magic :-)
Exactly what I wanted. Thanks a lot Francesco
Updated by Francesco Mangiacrapa over 3 years ago
Just one last comment, Yannis, just to be sure...
At the moment, the gCat service does not implement the business logic (https://gcube.wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF#Metadata, e.g. creating automatically tags, or adding grsf_record to groups, etc.) provided by grsf-service publisher/updater (https://gcube.wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF#GRSF_Publication_Web_Service), so you must to use gCat in the GRSF_ADMIN or GRSF VRE only for reading operations.
Updated by Yannis Marketakis over 3 years ago
Thanks for clarifying this @francesco.mangiacrapa@isti.cnr.it .
Indeed, I need to use it for retrieving the IDs (not for updating).