Get Number of blog comments from blog title in telligent 8.5 version

I am able to get the title of blog, now I want number of comments on particular blogs dynamically.

As per the api blog id and blogpostid is required

"api.ashx/v2/blogs/{blogid}/posts/{blogpostid}/comments.xml (or .json)"

Now how to get the blogid and blogpostid from blog title.

I am getting froum or blog post title from the below code.

success: function(response) {
TotalCount = response.TotalCount;
if(response.SearchResults.length > 0){
$('#sticky_header').append('<div id="relevant_new_ questions"><div>Select relevant threads below:</div></div><div class="new_question"><a href="javascript:void(0)" id="skip-search" aria-label="Click here to post new Question" title="Click here to post new Question" >Click here to continue</a></div>');
$('#sticky_turnoff').append('<div class="turn-off-suggestions"><a id="skip-turnoff" title="Turn off suggestions" aria-label="Turn off suggestions">Turn off suggestions</a></div>');

if(v.ContentType =='forumreply' || v.ContentType =='forum' ){
var threadid = v.ThreadId;
var APiendPoint = `api.ashx/v2/forums/threads/${threadid}/replies.json`
/*else if (v.ContentType =='blog)'{

var APiendPoint = `api.ashx/v2/blogs.json` 

}*/     (but it is not working)


var ContentId = v.ContentTypeId;
var APiendPoint = `api.ashx/v2/comments.json?ContentTypeId=${ContentId}`


var ContentId = v.ContentTypeId;

//url: + `api.ashx/v2/comments.json?ContentTypeId=${ContentId}`,
url: + APiendPoint,

Parents Reply Children
No Data