Forums

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

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

Yogesh Rathor
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 13, 2024
  • 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.

1 answer

0 votes
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
November 13, 2024

Hi Yogesh,

you might get a better chance of someone replying by posting your question in https://community.developer.atlassian.com/

Most internal APIs are locked for apps, I'm not sure they can be used from the client (browser)

Have you tried this endpoint from your app's backend?

The request usually contains a payload like {"status_change":"no_status","node":"{commit_id}"}

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events