Forum Discussion
Hi vasim5188
I think you are looking for this REST API
This will return all tags used in the blog whose ID is specified in the call.
Thanks,
Nico
- vasim518811 years agoContributor
Hi NicoB ,
Thank you for your reply.
But, by using "http://community.lithium.com/community-name/restapi/vc/blogs/id/[id] /tagging/tags/all" url I am getting few tags. I am not able to retrieve all the tags.
- NicoB11 years agoLithium Alumni (Retired)
Hi vasim5188
the reason why you are getting few tags is because Lithium by default only gives you the first 25 results.
If you happen to have more than 25 tags used for a specific blog, then you have to use the pagination approach.
First of all you determine how many tags you have:
http://community.lithium.com/community-name/restapi/vc/blogs/id/[id]/tagging/tags/all/count
Then you should calculate how many pages you want to query for:
pages = count / [tags per page]
And then, for each page you can run;
http://community.lithium.com/community-name/restapi/vc/blogs/id/[id]/tagging/tags/all/count?page=[NUMBER]&page_size=[NUM TAGS PER PAGE]
I hope this helps.
Thanks,
Nico
Related Content
- 2 months ago
- 5 days ago
- 3 years ago