1

When querying to find associated accounts for a list of account ids, some ids in the results appear to be missing many of the associated sites. I have only observed this in multi-page responses. For example, if I query:

/2.2/users/1144996;6913068;6453670;1751488;73042;1840350/associated?page=2&pagesize=100

in the response, account 1840350 contains only these sites and reputations:

Bioinformatics Stack Exchange                        123
Coffee Stack Exchange                                248
History of Science and Mathematics Stack Exchange    101
Open Source Stack Exchange                           101
Pets Stack Exchange                                  101
Worldbuilding Stack Exchange                         101
elementary OS Stack Exchange                         101

but if I query for only account 1840350, using:

/2.2/users/1840350/associated?page=1&pagesize=100

Then I see that 1840350 is active on 35 sites, with 7180 reputation on Biology Stack Exchange and 1513 on Photography.

I presume this is a bug that has to do with the implementation of paging.

1 Answer 1

1

No, this is not a bug.

When paging, you must remember and then combine the results from all pages.

So if you fetch:

...then combine the results you get all 36 sites that the user has joined.

This matches his network accounts page, once you add back in Area 51 (which is not in the API).

2
  • Oops. Spot on. I was accidentally clobbering data from the previous page in my code. Commented Oct 29, 2017 at 23:30
  • Yeah, We all do stuff like that. Part of why it's a valid question. Commented Oct 29, 2017 at 23:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .