Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,415
Community Members
 
Community Events
185
Community Groups

401 error when access on repos with bitbucket-build-statistics pipeline

Hi we want to use the bitbucket-build-statistics pipeline to monitor our repos 

but it did not work  ✖ 401 Client Error: Unauthorized for url: https://api.bitbucket.org/2.0/repositories/{workspace}?pagelen=100&fields=next,values.full_name

I am wondering if this is because we do not have the admin right to use the api in this workspace? 

Been trying to use my Username and App password.

Thank you. 

 

2 answers

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 10, 2022

@Will Chan hi. You can check your authorization process locally with simple python script:

import requests
import json


def api_call():
response = requests.get(
url,
auth=(username, password)
)

print(json.loads(response.text))


if __name__ == '__main__':
api_call()

username is the name from https://bitbucket.org/account/settings/ Username

password is your generated app password from https://bitbucket.org/account/settings/app-passwords/.

Regards, Igor

The workspace name should match the username used to access to access the repository. causing only a search of repository with the username to be successful, but attempts to save the repository returned 404 error my website longest snap streak is same error I fixed it the same way.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events