![](https://secure.gravatar.com/avatar/d3215af61d230dbd96a828d12d7ad117.jpg?s=120&d=mm&r=g)
Hi,
the /species/{int}/media endpoint seems to be broken. The result set is alway empty, even for the ID linked in the examples under http://www.gbif.org/developer/species . In December 2016, I was able to get plenty of Images for different bird-species through the API, but now this is not possible anymore. I need to do this because I am trying to train an AI used for image classification in context of my master's thesis.
Could somebody tell me if anything changed and I'm doing something wrong or I am right and the empty result really is caused by an error on the server-side?
Thanks you in advance, Dayzd
![](https://secure.gravatar.com/avatar/e387b2e6ec0c1b1f18a919ac9461ee2c.jpg?s=120&d=mm&r=g)
Hi,
I’m not sure about the species endpoint, but this might get you what you need:
http://api.gbif.org/v1/occurrence/search?taxon_key=%7Bint%7D&media_type=...
e.g http://api.gbif.org/v1/occurrence/search?taxon_key=212&media_type=StillI... gives you 682,964 bird occurrences with associated images.
/Daniel
On 19/07/2017, 13.12, "API-users on behalf of Sandy Cheeks" <api-users-bounces@lists.gbif.org on behalf of viper_gx@web.de> wrote:
Hi,
the /species/{int}/media endpoint seems to be broken. The result set is alway empty, even for the ID linked in the examples under http://www.gbif.org/developer/species . In December 2016, I was able to get plenty of Images for different bird-species through the API, but now this is not possible anymore. I need to do this because I am trying to train an AI used for image classification in context of my master's thesis.
Could somebody tell me if anything changed and I'm doing something wrong or I am right and the empty result really is caused by an error on the server-side?
Thanks you in advance, Dayzd
_______________________________________________ API-users mailing list API-users@lists.gbif.org https://lists.gbif.org/mailman/listinfo/api-users
![](https://secure.gravatar.com/avatar/38270e964a45066ea7ecea84b985120d.jpg?s=120&d=mm&r=g)
Hi Sandy, we have removed many datasets as the source of species images from our backbone. Especially wikipedia as the images did not always represent the species. You can still find these images when querying for the wikipedia record directly, e.g.:
http://www.gbif.org/species/113368808 http://api.gbif.org/v1/species/http://api.gbif.org/v1/species/113368808/media113368808http://www.gbif.org/species/113368808/media
The backbone taxon does not show that image: http://www.gbif.org/species/2494528
Now there are only 4 images of a single species left that depicts a bird :) http://api.gbif.org/v1/species/120620864/media
For other groups this is not so bad. But wikipedia was the major source for species images.
Best, Markus
On 19. Jul 2017, at 13:51, Daniel Noesgaard <dnoesgaard@gbif.orgmailto:dnoesgaard@gbif.org> wrote:
Hi,
I’m not sure about the species endpoint, but this might get you what you need:
http://api.gbif.org/v1/occurrence/search?taxon_key=%7Bint%7D&media_type=...
e.g http://api.gbif.org/v1/occurrence/search?taxon_key=212&media_type=StillI... gives you 682,964 bird occurrences with associated images.
/Daniel
On 19/07/2017, 13.12, "API-users on behalf of Sandy Cheeks" <api-users-bounces@lists.gbif.org on behalf of viper_gx@web.de> wrote:
Hi,
the /species/{int}/media endpoint seems to be broken. The result set is alway empty, even for the ID linked in the examples under http://www.gbif.org/developer/species . In December 2016, I was able to get plenty of Images for different bird-species through the API, but now this is not possible anymore. I need to do this because I am trying to train an AI used for image classification in context of my master's thesis.
Could somebody tell me if anything changed and I'm doing something wrong or I am right and the empty result really is caused by an error on the server-side?
Thanks you in advance, Dayzd
_______________________________________________ API-users mailing list API-users@lists.gbif.org https://lists.gbif.org/mailman/listinfo/api-users
_______________________________________________ API-users mailing list API-users@lists.gbif.org https://lists.gbif.org/mailman/listinfo/api-users
![](https://secure.gravatar.com/avatar/d3215af61d230dbd96a828d12d7ad117.jpg?s=120&d=mm&r=g)
Hello Markus and Daniel,
thank you for the fast replies. It's a pity that you had to remove that many records from the backbone.
When looking at the occurences, I need to ask two things:
a) Are the occurences curated in any form or could they also include pictures showing the wrong species?
b) I can only set a maximum limit of 200k on the endpoint Daniel mentioned, so I went on to /occurence/downloads. When I try to send this data via POST (Content-type: application/json):
{ "creator":"dayzd", "notification_address": ["viper_gx@web.de"], "predicate": { "type":"and",
"predicates":[{"type":"equals","key":"class_key","value":"212"},{"type":"equals","key":"media_type","value":"StillImage"}] } }
I get a response code of 400. When I leave the content type blank, I'd get a 415. I also tried with the value of "class_key" being an integer, but still no luck.
Can you tell me what I'm doing wrong?
Greetings, Dayzd
![](https://secure.gravatar.com/avatar/38270e964a45066ea7ecea84b985120d.jpg?s=120&d=mm&r=g)
Hi Sandy,
I think it is just taxon_key, not class_key as the keys are unique across all ranks.
Best, Markus
On 19. Jul 2017, at 14:59, Sandy Cheeks viper_gx@web.de wrote:
Hello Markus and Daniel,
thank you for the fast replies. It's a pity that you had to remove that many records from the backbone.
When looking at the occurences, I need to ask two things:
a) Are the occurences curated in any form or could they also include pictures showing the wrong species?
b) I can only set a maximum limit of 200k on the endpoint Daniel mentioned, so I went on to /occurence/downloads. When I try to send this data via POST (Content-type: application/json):
{ "creator":"dayzd", "notification_address": ["viper_gx@web.de"], "predicate": { "type":"and",
"predicates":[{"type":"equals","key":"class_key","value":"212"},{"type":"equals","key":"media_type","value":"StillImage"}] } }
I get a response code of 400. When I leave the content type blank, I'd get a 415. I also tried with the value of "class_key" being an integer, but still no luck.
Can you tell me what I'm doing wrong?
Greetings, Dayzd
![](https://secure.gravatar.com/avatar/d3215af61d230dbd96a828d12d7ad117.jpg?s=120&d=mm&r=g)
Hey Markus,
still, no luck.
{ "creator":"dayzd", "notification_address": ["viper_gx@web.de"], "predicate": { "type":"equals", "key":"taxon_key", "value":"212" } }
also does not work -> 400. Do I need to register my user anywhere else than on the GBIF website?
Greetings, Dayzd
![](https://secure.gravatar.com/avatar/e387b2e6ec0c1b1f18a919ac9461ee2c.jpg?s=120&d=mm&r=g)
Try TAXON_KEY and MEDIA_TYPE using CAPS…
/Daniel
On 19/07/2017, 15.21, "Sandy Cheeks" viper_gx@web.de wrote:
Hey Markus,
still, no luck.
{ "creator":"dayzd", "notification_address": ["viper_gx@web.de"], "predicate": { "type":"equals", "key":"taxon_key", "value":"212" } }
also does not work -> 400. Do I need to register my user anywhere else than on the GBIF website?
Greetings, Dayzd
![](https://secure.gravatar.com/avatar/d3215af61d230dbd96a828d12d7ad117.jpg?s=120&d=mm&r=g)
Hello again,
is it normal that the dataset still is not created? The last response on Wednesday was a 201 with a location header and a download key (0002462-170714134226665). But since then, the URL always returned a 404. How long does it approximately take to create a download for the 600k+ images?
Greetings, Dayzd
![](https://secure.gravatar.com/avatar/e387b2e6ec0c1b1f18a919ac9461ee2c.jpg?s=120&d=mm&r=g)
Hey Dayzd,
It seems the location URL is incorrect. It should be:
http://api.gbif.org/v1/occurrence/download/request/0005187-170714134226665
(I’ll follow up on this…)
To get a notification of when the download is ready, you need to set
"sendNotification": true
in your request.
Regards, Daniel
On 23/07/2017, 13.07, "Sandy Cheeks" viper_gx@web.de wrote:
Hello again,
is it normal that the dataset still is not created? The last response on Wednesday was a 201 with a location header and a download key (0002462-170714134226665). But since then, the URL always returned a 404. How long does it approximately take to create a download for the 600k+ images?
Greetings, Dayzd
participants (3)
-
Daniel Noesgaard
-
Markus Döring
-
Sandy Cheeks