Count total blog articles in one specific category level
Hi All,
i am currently working on a custom component which can count all the blog articles in one specific category level. I can not find any related REST API to do that.
What I have workaround solution is to use two REST API call to acheive that.
1. First rest API call is used the category ID to get all the blogs ID under this category.
<#list rest("/categories/id/${rootCategory}/blogs?restapi.response_style=view").blogs.blog as blog>
2. Second rest API call is used the blog.id from first call and then make a call to get message count
rest("/blogs/id/${blog.id}/messages/count").value?number />
and then sum up the total number of articles .
Does anyone know a better way to do that?
thank you.
Cheers,
Qing
How about this:
/categories/id/[id]/topics/style/blog/count
For example, the number of blog posts in Lithosphere's Customer category would be:
http://lithosphere.lithium.com/restapi/vc/categories/id/Customers/topics/style/blog/count