It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to reply to a pull request comment via Bitbucket API 2.0? If so, how? Edited

Related to this question, I am using the Bitbucket 2.0 API to post a new pull request comment, but it is not clear (to me at least) how/if I can make the new comment a reply to a previous comment.

I have tried adding

 { "parent": { "id": <commentID> } }

and (what used to work in API 1.0)

{ "comment_id": <commentID> }

to my JSON data but both of these when done via CURL give me a response such as:

{"type": "error", "error": {"fields": {"content": "required key not provided",
"{ \"content\": { \"raw\": \"This is a reply comment\" }, \"parent\": { \"id\": \"NNNNNNNN\" }}":
"extra keys not allowed"}, "message": "Bad request"}}

I would think that the first example should work since if I query a PR comment that is a reply comment, the API shows it as having a key.

If there is some other required key then the error response isn't very helpful about what that should be.  And the API docs really offer no clue as to where the parent comment ID needs to be specified in the request body.


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Bitbucket Server 7.0 is here!

Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...

1,005 views 6 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you