Forum Discussion

Jk07's avatar
Jk07
Adept
2 years ago

Get All Labels using API v1 call.

How can I get all the labels in the community using the Community API v1 call?  
  • AmanMalhotra's avatar
    2 years ago

    Hi Jk07 ,

    You can get all the community labels using below APIv1 call:

    https://[Community Domain]/restapi/vc/labels?page=1&page_size=1000

    where you can change the page_size limit parameter or change the page parameter to get other labels available on other pages.

    For example, if you want to get all labels of a community having a total label count of 3800 labels then you need to hit below 4 API calls.

    https://[Community Domain]/restapi/vc/labels?page=1&page_size=1000
    https://[Community Domain]/restapi/vc/labels?page=2&page_size=1000
    https://[Community Domain]/restapi/vc/labels?page=3&page_size=1000
    https://[Community Domain]/restapi/vc/labels?page=4&page_size=1000

    Kindly give kudos and mark this as an accepted solution if this post helped you in any way.