Post Comments API | Community
Skip to main content

Post Comments API

  • April 26, 2023
  • 2 replies
  • 0 views

David47

Is there any way to pull all post comments in a Help Center in a single call, rather than by post ID? If not, are there any plans to add this capability?

2 replies

  • April 26, 2023

Hi David, you can't currently get all the post comments in one call but you could build a relatively short script that uses the List Posts and List Comments endpoints to get the same results. The logic would go something like this:

all_posts = get('/api/v2/community/posts')
for post in all_posts:
   post_comments = get('/api/v2/community/posts/{post['id']}/comments')
 all_comments.append(post_comments)

David47
  • Author
  • September 18, 2023

Wouldn't this be a perfect place to add side loading capabilities, similar to categories-sections-articles?