It is impossible to download complete list of loci belonging to scheme via API if page size < total number of loci

Issue #298 resolved
Keith Jolley created an issue

It seems impossible to use the API to retrieve a list of loci belonging to a scheme if I use page sizes smaller than the number of loci in the scheme (and if I attempt to get all loci for wgMLST then the server just returns an error, so I can’t do that). For example if I call:

https://enterobase.warwick.ac.uk/api/v2.0/ecoli/cgMLST/loci?limit=500 then I get 500 unique loci. The next page (http://enterobase.warwick.ac.uk/api/v2.0/ecoli/cgMLST/loci?limit=500&offset=500) downloads 500 loci, but many of these are repeats from the first page (so after two pages I have only retrieved 551 unique loci).

If I use a page size of 500 records, and follow the next page link to retrieve the next batch, then in total I can only download 678 locus names for the E. coli cgMLST scheme. This seems to be related to the API page offset issue I reported last year (#233) and the repeating records issue (#226) that is marked resolved but isn’t.

Comments (1)

  1. Log in to comment