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

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/constit... publishers: https://api.gbif.org/v1/network/3aee7756-565e-4dc5-b22c-f997fbd7105c/organiz... 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=3ae... 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@lists.gbif.org> on behalf of Holetschek, Jörg <J.Holetschek@bgbm.org> Sent: Wednesday, March 24, 2021 11:50 AM To: hosted-portals@lists.gbif.org <hosted-portals@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..., 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@lists.gbif.org https://lists.gbif.org/mailman/listinfo/hosted-portals

Hi Morten, thanks for the quick reply... that was exactly what I needed! Best wishes, Jörg Von: Hosted-Portals <hosted-portals-bounces@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@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/constit... publishers: https://api.gbif.org/v1/network/3aee7756-565e-4dc5-b22c-f997fbd7105c/organiz... 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=3ae... 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@lists.gbif.org<mailto:hosted-portals-bounces@lists.gbif.org>> on behalf of Holetschek, Jörg <J.Holetschek@bgbm.org<mailto:J.Holetschek@bgbm.org>> Sent: Wednesday, March 24, 2021 11:50 AM To: hosted-portals@lists.gbif.org<mailto:hosted-portals@lists.gbif.org> <hosted-portals@lists.gbif.org<mailto:hosted-portals@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..., 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@lists.gbif.org<mailto:Hosted-Portals@lists.gbif.org> https://lists.gbif.org/mailman/listinfo/hosted-portals
participants (2)
-
Holetschek, Jörg
-
Morten Høfft