<div dir="ltr"><div>Okay, thanks for the update. <br></div><div><br></div><div>Scott<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Feb 8, 2018 at 1:33 PM Markus Döring <<a href="mailto:mdoering@gbif.org">mdoering@gbif.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes Scott, they all accept just one value.<br>
The only exception is actually datasetKey if it is used together with a name parameter. In that case only a set of dataset keys is allowed. Not exactly intuitive, but thats how the interface was designed:<br>
<br>
PagingResponse<NameUsage> list(Locale locale, UUID datasetKey, String sourceId, Pageable page);<br>
<br>
PagingResponse<NameUsage> listByCanonicalName(Locale locale, String canonicalName, Pageable page, UUID ... datasetKey);<br>
<br>
Markus<br>
<br>
<br>
> On 8. Feb 2018, at 19:28, Scott Chamberlain <<a href="mailto:myrmecocystus@gmail.com" target="_blank">myrmecocystus@gmail.com</a>> wrote:<br>
><br>
> Hi Markus,<br>
><br>
> Thanks very much for your help on this.  That seems like a good solution.<br>
><br>
> Does the only 1 instance of a parameter per request apply to the other parameters on that route as well? <a href="https://www.gbif.org/developer/species#nameUsages" rel="noreferrer" target="_blank">https://www.gbif.org/developer/species#nameUsages</a>  name, sourceId, language<br>
><br>
> Best, Scott<br>
><br>
> On Thu, Feb 8, 2018 at 2:11 AM Markus Döring <<a href="mailto:mdoering@gbif.org" target="_blank">mdoering@gbif.org</a>> wrote:<br>
> Hi again,<br>
><br>
> I just checked code and it was done intentionally as our API interface is defined for all or just one dataset key:<br>
> <a href="https://github.com/gbif/gbif-api/blob/master/src/main/java/org/gbif/api/service/checklistbank/NameUsageService.java#L82" rel="noreferrer" target="_blank">https://github.com/gbif/gbif-api/blob/master/src/main/java/org/gbif/api/service/checklistbank/NameUsageService.java#L82</a><br>
><br>
> I propose to throw an IllegalRequest in case of more than one datasetKey for the time being.<br>
> If you want this to be changed please log an API issue or enhancement request in the portal.<br>
><br>
> Cheers,<br>
> Markus<br>
><br>
> > On 8. Feb 2018, at 11:04, Markus Döring <<a href="mailto:mdoering@gbif.org" target="_blank">mdoering@gbif.org</a>> wrote:<br>
> ><br>
> > Hi Scott,<br>
> > indeed it only picks up one of the parameters. Looks like an oversight and probably one that is existing elsewhere too then ;)<br>
> > Ive logged an issue: <a href="https://github.com/gbif/checklistbank/issues/54" rel="noreferrer" target="_blank">https://github.com/gbif/checklistbank/issues/54</a><br>
> ><br>
> > Markus<br>
> ><br>
> ><br>
> ><br>
> >> On 7. Feb 2018, at 22:37, Scott Chamberlain <<a href="mailto:myrmecocystus@gmail.com" target="_blank">myrmecocystus@gmail.com</a>> wrote:<br>
> >><br>
> >> Hi folks,<br>
> >><br>
> >> Seems like the `/species` route is possibly misbehaving in certain cases. A user of rgbif reports <a href="https://github.com/ropensci/rgbif/issues/287" rel="noreferrer" target="_blank">https://github.com/ropensci/rgbif/issues/287</a> unexpected results. The same calls but with curl:<br>
> >><br>
> >> curl  '<a href="https://api.gbif.org/v1/species?datasetKey=73605f3a-af85-4ade-bbc5-522bfb90d847&datasetKey=d7c60346-44b6-400d-ba27-8d3fbeffc8a5" rel="noreferrer" target="_blank">https://api.gbif.org/v1/species?datasetKey=73605f3a-af85-4ade-bbc5-522bfb90d847&datasetKey=d7c60346-44b6-400d-ba27-8d3fbeffc8a5</a>' | jq .results\[].datasetKey | wc -l<br>
> >>       10<br>
> >><br>
> >> curl  '<a href="https://api.gbif.org/v1/species?datasetKey=73605f3a-af85-4ade-bbc5-522bfb90d847" rel="noreferrer" target="_blank">https://api.gbif.org/v1/species?datasetKey=73605f3a-af85-4ade-bbc5-522bfb90d847</a>' | jq .results\[].datasetKey | wc -l<br>
> >>       10<br>
> >><br>
> >> curl  '<a href="https://api.gbif.org/v1/species?datasetKey=d7c60346-44b6-400d-ba27-8d3fbeffc8a5" rel="noreferrer" target="_blank">https://api.gbif.org/v1/species?datasetKey=d7c60346-44b6-400d-ba27-8d3fbeffc8a5</a>' | jq .results\[].datasetKey | wc -l<br>
> >>        7<br>
> >><br>
> >> We'd expect the first curl request to return 17 results given the results of the datasetKey's individually. Not sure what is going on there. This route does appear to accept multiple instances of the same parameter, but not sure why the top curl call there doesn't return 17 results?<br>
> >><br>
> >> Best, Scott<br>
> >> _______________________________________________<br>
> >> API-users mailing list<br>
> >> <a href="mailto:API-users@lists.gbif.org" target="_blank">API-users@lists.gbif.org</a><br>
> >> <a href="https://lists.gbif.org/mailman/listinfo/api-users" rel="noreferrer" target="_blank">https://lists.gbif.org/mailman/listinfo/api-users</a><br>
> ><br>
> > _______________________________________________<br>
> > API-users mailing list<br>
> > <a href="mailto:API-users@lists.gbif.org" target="_blank">API-users@lists.gbif.org</a><br>
> > <a href="https://lists.gbif.org/mailman/listinfo/api-users" rel="noreferrer" target="_blank">https://lists.gbif.org/mailman/listinfo/api-users</a><br>
><br>
<br>
</blockquote></div>