How to get blog post comments with nested comments/replies?

I'm using this code but only getting comments that don't have "ParentCommentId"

var host = new ClientCredentialsRestHost("admin", """, _clientId, _clientSecret);

var response = host.GetToDynamic(2, "comments.json", false, new RestGetOptions
     PathParameters = new System.Collections.Specialized.NameValueCollection { { "ContentId", contentId }, { "IncludeChildren", "true" } }

community url updated
[edited by: Navneet Singh at 1:21 PM (GMT 0) on Wed, Nov 20 2019]
Parents Reply Children
  • I have tested both options and they appear to be working fine.

    The Comments endpoint with IncludeChildren = true returns all the comments, not just those with no ParentCommentId.


    The Threaded Comment endpoint with the ContentId and ContentTypeId specified returns the same set of comments, but in a threaded format.