Forums

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

Is there an easy way to access the BitBucket Rest API from Pipelines

Ashvin Narayanan
Contributor
February 24, 2019

Tried searching for this but couldn't find any resources.

Is there a way to access the Rest API from a Pipelines script without the need for authentication to the API?

Because the way I see it, the build runners run within BitBucket and you've configured the scripts yourself for which you would've needed appropriate permissions anyway. So there's no need for further authentication (or is there?).

My specific use-case: I need to comment on a Pull Request being created with code-coverage results, for which I need to access the Rest API from the Pipelines script.

1 answer

1 accepted

0 votes
Answer accepted
StannousBaratheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2019

Hi @Ashvin Narayanan 

Authentication is still required to access the Bitbucket API within Pipelines. You can easily do this however by setting up an App password (see https://confluence.atlassian.com/bitbucket/app-passwords-828781300.html) and adding that password as a secure environment variable (see https://confluence.atlassian.com/bitbucket/variables-in-pipelines-794502608.html) in Pipelines for use within your build script.

Ashvin Narayanan
Contributor
February 27, 2019

Yup that's how I've got it setup at the moment. Just seems like redundant authentication.

Like • Seth Miller likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, out of office, loom, confluence, async collaboration, meeting recaps, remote teamwork, team alignment, knowledge sharing, AI-powered notes, productivity tools, workforce continuity, teamwork collection

Put your meeting notes on autopilot with Loom + Confluence

AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.

Learn more
AUG Leaders

Atlassian Community Events