It might have to do with the offset. Endpoints are developed by different teams and they behave differently when the offset would either overflow, go above some apparent maximum value, or result in an out of bounds in the response.
As to why you are getting the same team twice, I’m not sure. I tried the same request and I got two different teams:
Unfortunately, without having a reliable way to page through the teams with a cursor or without a total field and with offset being very finicky, I cannot think of a good way to reliably get all unique teams.
@Ribesg I’d be curious if you can reproduce this. I get the same results as @Six.
For this particular endpoint (and many others across our API), you simply poll the API until you get an empty object back. I hit that at offset 3093 for /teams/.
@DallasNChains yes you get an expected amount of results, but how many distinct teams do you get?
At the time, when I wrote the post, we only got ~2500 teams (around 3100 results with a lot of duplicates).
The links I provided pointed to the first occurence of a team and the last one. As the API seem to return then in an order both random and changing, you obviously can’t reproduce.
Here’s something you can 100% reproduce: get all teams, 100 by 100, then count the amount of distinct teams you have. Right now you should get 3092 objects representing only 2512 teams; and this does not mean there are only 2512 teams, this means we missed 580 teams entirely. Trying this again a few hours later, the order will be different, and the ~2500 teams it will return will be slightly different, but there are teams that we know exists which were never returned by this endpoint (yet).
This problem has already been reported and ignored here.
@Ribesg I have had this issue for a while now. The random output order and the duplicates can ultimately be dealt with, but the fact that “many” teams are never returned, as I mentioned in the post you just linked, is indeed a bit more frustrating.
@Ribesg Just to set expectations, I changed roles inside the company, so my presence is pretty light around here. We’re hiring my backfill, but it’ll be a bit. I’ve poked a few folks about this endpoint, but the ownership of the endpoint is in flux. I’ll update when I can.
Thanks for the explanation, I’ll try to keep this post up (without pinging you). It would be nice to have a public issue tracker instead of having to up a post here to prevent it from autoclosing.
The autoclosing after a month is a problem when people able to answer are not available.