Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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.

share|improve this question
2  
This a pretty major bug, the total field returns 0 even with a custom filter. –  Jonathan. Jan 3 '12 at 0:47
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
Excellent, thank you! :) –  Dave DeLong Jan 4 '12 at 0:01
add comment

You must log in to answer this question.

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