dustin_miller
10/01/2021, 11:13 PMpage
0-based index for requests, and returns a maximum of 100 items.
Unfortunately, if there are less than 100 items, and you pass a page
querystring param that should return 0 rows, it merrily returns the complete set of records.
For example, this request (using ClickUp’s Apiary Mock endpoint, so you can run it as-is) returns a list of valid workspaces for the ClickUp Team with a team_id
of `512`:
curl <https://private-anon-1ab3e1ce0e-clickup20.apiary-mock.com/api/v2/team/512/space>
Note that there are only two workspaces in the response. With a maximum of 100 records per-page, adding a page
querystring param should return zero records. However, If I add a page
querystring param (per the API docs) to return the “next” page of records…
curl <https://private-anon-1ab3e1ce0e-clickup20.apiary-mock.com/api/v2/team/512/space?page=1>
I get back the same two entries.
This is true for live API requests, also.
Is there a recommended approach for dealing with APIs like this? That is, other than submitting a request to ClickUp to fix their API, which I have already done. 😄