Hi,
I use to get a property total_count on the return json when calling /content/api/v2/blog-posts as per the documentation here:
https://developers.hubspot.com/docs/methods/blogv2/get_blog_posts
My logic relies on this property but it’s now missing. Is that a bug, api change, am I the only one missing this field? I’m wondering if it is safe to rely on this value.
Thanks,
Hi, @mlavigne.
Something does seem to have changed. The response I receive from the List blog posts endpoint no longer matches the JSON example here.
While I don’t receive a total_count field, as documented, I do see a total field at the bottom of the payload alongside the offset.
Do you see a total field returned?
Hi @IsaacTakushi,
Thanks for your reply. I do recieved the total field at the bottom of the response but it doesn’t match the number of return objects like the total_count did.
Today we have changed our logic to count the numbers of objects in the response instead of relying on the total_count field.
Thanks,
Hi, @mlavigne.
Thanks for the additional context. I’m glad you have a workaround for the moment.
@WendyGoh and I will confirm whether total should match what was formerly returned in total_count and update this thread accordingly.
Hi, @mlavigne.
The team confirmed that total should be used in place of total_counts and that the values should match. We will be updating the documentation accordingly.
If you’re seeing discrepancies between the number of objects returned and the total value, could you share an example response via direct message which exhibits the issue?
Thank you for the prompt reply @IsaacTakushi, much appreciated.