Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

is there any rest api to list all comments for a particular PR?

amarsha.ng November 6, 2019

I dont know the hosting , My company is using the bitbucket.

I want to test it with postman and if any authentication requires please suggest that also.

1 answer

1 accepted

0 votes
Answer accepted
Leo
Community Champion
November 6, 2019

Hi @amarsha.ng

if you are on server

You can use this API call >>> rest/api/latest/projects/{Project Key}/repos/{RepoSlug}/pull-requests/{PullRequest-ID}/activities

And then extract comments from that result

or if you want to fetch comments for particular file you need to go with Path  parameter

>>> rest/api/latest/projects/{Project Key}/repos/{RepoSlug}/pull-requests/{PullRequest-ID}/commnets?path={file path}

 

hope this gives you some idea

 

BR,

Leo

amarsha.ng November 6, 2019

can i check this from postman?

Leo
Community Champion
November 6, 2019

I guess you can. FYI, you'll have to append your bitbucket base URL before rest api call which I provided

amarsha.ng November 6, 2019

Thanks , Its working

Suggest an answer

Log in or Sign up to answer