[API-users] Usage of endOfRecords

Nozomi James Ytow nozomi at biol.tsukuba.ac.jp
Sat Dec 20 09:59:57 CET 2014


Hi,

I tried

http://api.gbif.org/v1/species/search?q=Puma&rank=GENUS&limit=20&offset=0

which returns JSON starting with

{"offset":0,"limit":20,"endOfRecords":false,"count":50,"results":[

I expect that there are 50 records to be returend against the query.  Howerver,

http://api.gbif.org/v1/species/search?q=Puma&rank=GENUS&limit=60&offset=0

returns 50 records as expected, but it says  as

{"offset":0,"limit":50,"endOfRecords":false,"count":50,"results":[

Shouldn't it be true, if the returned fragment represents end of records?
Or, shoud I check not only endOfRecords but also (limit > 0 && (offset + limit) < count)  ?
--
James









More information about the API-users mailing list