Closed cubeghost closed 3 years ago
Hello! Looks like you've discovered a bug here. We've been updating this endpoint a lot lately to make it more efficient (and potentially add some new filtering options), and it looks like this field got broken in the process. We'll update this issue when we've rolled out a fix. Thanks for reporting!
thanks for the update!
Hey @cubeghost -- can you check on this now? I believe we should have a fix in place for this as of about an hour ago.
@cyle looks good! 🎉
Hi there!
While investigating a recent increase in rate limiting errors, I found that my requests to
/v2/blog/{blog}/posts?tag=
were coming back with an incorrecttotal_posts
value. Instead of reflecting the number of posts with the given tag, it's the total number of posts on the blog. When passing just thetype
query param, it behaves correctly.A lot of older API applications use this field for pagination- in my case, the incorrect value is causing the pagination logic to make as many API calls as there are pages on a given blog, often causing rate limiting errors. I'd like to migrate to using
_links
anyway since it provides more consistency across endpoints, but regardless, this seems like an unexpected behavior.Example: https://api.tumblr.com/v2/blog/cubeghost.tumblr.com/posts?tag=gif There are only 4 posts in this tag, but
total_posts
is 364, the total number of posts on the blog.