Unable to Call Internal API for Publishing Pending Comments in Bitbucket Cloud Plugin

  • I’m using the Atlassian Connect framework for the plugin development.
  • The issue specifically arises when attempting to hit the internal API endpoint for publishing pending comments.

AP.require(‘request’, function (request) {

request({

url: ‘!api/internal/repositories/{workspace_name}/{repo_slug}/pullrequests/2/review’,

type: ‘POST’,

contentType: ‘application/json’,

data: JSON.stringify({

node: ‘{commit_id}’

})

});

});

  • I got 404 Not Found as response.
  • “scopes”:[“account”,“repository”,“pullrequest”,“pullrequest:write”] are provided in atlassian-connect.json descriptor.
  • are there any known restrictions or permissions that might affect calling internal APIs.