Project

General

Profile

Actions

Support #22298

closed

List of records under a particular group

Added by Yannis Marketakis over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Start date:
Oct 26, 2021
Due date:
% Done:

100%

Estimated time:
VREName:

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

grsf_SA.png (140 KB) grsf_SA.png Yannis Marketakis, Oct 26, 2021 11:01 AM
Actions #1

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.

Actions #2

Updated by Yannis Marketakis over 3 years ago

  • Status changed from Feedback to Closed

Magic :-)

Exactly what I wanted. Thanks a lot Francesco

Actions #3

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.

Actions #4

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).

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)