Incorrect paging for Fashion Transparency Index

+Status
In Discussion
+*when created
Tuesday, August 02, 2022 09:39 AM UTC
 
 

Hi,

I'm examining Fashion Transparency Index information for companies via the API - supposedly a page of 20 items at a time. However, my request for the first 20 items returns far more - apparently all the companies. And the paging information in the results has a URL for the next 20. That, again, returns all the companies - not the next 20 companies.

This is causing a loop in my software which used to retrieve all the results 20 items at a time to repeat infinitely.

This is my inital request URL:

https://wikirate.org/Fashion_Transparency_Index+Company.json?api_key=MYAPIKEY&offset=0limit=20

The result contains what seems to be all the companies, not the first 20. And it includes the entry:

 "paging": {
    "next": "https://wikirate.org/Fashion_Transparency_Index+Company.json?filter%5Bname%5D=&item=name&limit=20&offset=20"
  }

Since there is a "next" entry, my software is retrieving what turns out to be all the entries again. And so on, ad infinitum.

 

Is there a bug or have I missed a change in the API ? I can't seem to find "offset" in your documentation (any more).

Tim Kindberg.....2022-08-02 09:39:38 UTC

Whoops, there is a stray "w" at the end of the first URL which is a result of an imprecise copy: it's not there in the URL as dereferenced.

Tim Kindberg.....2022-08-02 09:41:51 UTC

I have a fix for this en route. Those items are explicit lists, rather than searches, and will soon not have item paging.

Ethan McCutchen.....2023-11-02 18:44:59 UTC