5

I'm running a very simple (and contrived) call of:

http://api.stackexchange.com/2.0/users/115730?site=stackoverflow&filter=total

I'm expecting a response of:

{"total":1}

But am getting a response of:

{"total":0}

Changing the filter to something else (default, etc) results in the expected information, so it's not a quota thing.

1
  • 2
    This a pretty major bug, the total field returns 0 even with a custom filter.
    – Jonathan.
    Jan 3, 2012 at 0:47

1 Answer 1

2

Well, this was a fun one.

Basically, a number of methods were figuring out that you weren't asking for any fields on an object type (like, say, users) and short-circuiting around database queries. Unfortunately, there are also some methods that relying on the database queries to populate total. This generally happened in the "query by id" methods.

So, I disentangled those methods so that short-circuiting won't happen when a method is expecting to figure out the total from the resulting data.

A fix has been deployed.

0

You must log in to answer this question.

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