Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

What scopes are available using the proxy at localhost:29418?

I am writing a pipe that creates a report using commit/{id}/reports endpoint. I also want to create a build status reflecting the status of the report (passing/failing). The report endpoint works with the proxy on port 29418, but the request to commit/{id}/statuses/build returns status code Forbidden with the following error in body:

{"data": {"key": "INSUFFICIENT_RIGHTS"}, "type": "error", "error": {"message": "Access denied. You must have write or admin access.", "data": {"key": "INSUFFICIENT_RIGHTS"}}}

There is no proper documentation regarding the proxy anywhere... What scopes are available through the proxy? Is my only option to create a OAuth consumer and use it instead of the proxy?

1 answer

@Amit Edelshtein there are two possible reasons:

- api endpoint you're using is not allowed to use with proxy

- user is not recognized when going through proxy. check user's permissions. Also, what authentication are you using? Check out how reports sub endpoints are used in one of our pipes (https://bitbucket.org/atlassian/checkstyle-report/src/66bc4e4048df4dd57cb111813871c992d0656ad5/src/main/java/com/atlassian/bitbucket/pipelines/checkstyle/report/Main.java#lines-136,

https://bitbucket.org/atlassian/checkstyle-report/src/66bc4e4048df4dd57cb111813871c992d0656ad5/src/main/java/com/atlassian/bitbucket/pipelines/checkstyle/report/Main.java#lines-134)

 

If you want actually to integrate with bitbucket code-insights where report is pushed, you may follow this way, like in our pipe https://bitbucket.org/atlassian/git-secrets-scan/src/69461ac7e1a17e14023a6fede3d9f9a51d64deec/pipe/pipe.py#lines-34

Also, check out if report plugin is turned on in your repo.

I guess, that perhaps it is that you want because reports url in official bitbucket api does not officially declare POST request https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bcommit%7D/reports

 

Cheers, Galyna

I appreciate your answer @Halyna Berezovska .

However, the report and annotations endpoints work fine for me using the proxy. The error I am getting is from commit/{id}/statuses/build endpoint when using the proxy.

So I assume the proxy is somehow limited, but I could not find documentation detailing what are the limits of the proxy - is it certain scopes? Certain APIs?

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

74 views 2 3
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