[Hosted-Portals] Number of datasets, organisations and images to be found in a hosted portal

Holetschek, Jörg J.Holetschek at bgbm.org
Wed Mar 24 11:26:32 UTC 2021


Hi Morten,

thanks for the quick reply... that was exactly what I needed!

Best wishes,
Jörg

Von: Hosted-Portals <hosted-portals-bounces at lists.gbif.org> Im Auftrag von Morten Høfft
Gesendet: Mittwoch, 24. März 2021 12:02
An: Helpdesk, discussion and announcements for the GBIF hosted portals <hosted-portals at lists.gbif.org>
Betreff: Re: [Hosted-Portals] Number of datasets, organisations and images to be found in a hosted portal

Hi Jörg

Networks are a bit special as they cannot be searched for through normal dataset search.
They have their own endpoint

dataset: https://api.gbif.org/v1/network/3aee7756-565e-4dc5-b22c-f997fbd7105c/constituents?limit=0
publishers: https://api.gbif.org/v1/network/3aee7756-565e-4dc5-b22c-f997fbd7105c/organization?limit=0
See also https://www.gbif.org/developer/registry#networks

Number of occurrences with images (not the same as number of images - that number isn't available)
http://api.gbif.org/v1/occurrence/search?mediaType=StillImage&networkKey=3aee7756-565e-4dc5-b22c-f997fbd7105c&limit=0
See also https://www.gbif.org/developer/occurrence#search

Remember to set the limit to zero - there is no reason to download the results to the user's browser when all we care about is the count.

You can also see https://hp-colombian-biodiversity.gbif-staging.org/ for inspiration and how to implement it<https://github.com/gbif/hp-colombian-biodiversity/blob/b147c9f7ca2cd8872e90f65420a62000bce55f41/_data/home.yml#L18>.

Hope that helps
Best
Morten

________________________________
From: Hosted-Portals <hosted-portals-bounces at lists.gbif.org<mailto:hosted-portals-bounces at lists.gbif.org>> on behalf of Holetschek, Jörg <J.Holetschek at bgbm.org<mailto:J.Holetschek at bgbm.org>>
Sent: Wednesday, March 24, 2021 11:50 AM
To: hosted-portals at lists.gbif.org<mailto:hosted-portals at lists.gbif.org> <hosted-portals at lists.gbif.org<mailto:hosted-portals at lists.gbif.org>>
Subject: [Hosted-Portals] Number of datasets, organisations and images to be found in a hosted portal

Dear all,

for the entry page, I'm trying to create an overview of the data to be found in our portal (which is based on a network filter): number of occurrences, datasets, publishers and image, similar to the table you can see here: https://hp-theme.gbif-staging.org/.

I managed to get the number of occurrences by using https://api.gbif.org/v1/occurrence/search?networkKey=3aee7756-565e-4dc5-b22c-f997fbd7105c, but I failed for the number of datasets/publishers. Apparently the search request for datasets and institutions doesn't support the "network" parameter. And I'm completely lost for the number of multimedia documents provided for the occurrences - is there any API call for that?

Thanks and Cheers,
Jörg



_______________________________________________
Hosted-Portals mailing list
Hosted-Portals at lists.gbif.org<mailto:Hosted-Portals at lists.gbif.org>
https://lists.gbif.org/mailman/listinfo/hosted-portals
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gbif.org/pipermail/hosted-portals/attachments/20210324/596cba7b/attachment-0001.html>


More information about the Hosted-Portals mailing list