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

ZDU API for Bitbucket returns: ERROR 403:- Returned if the calling user does not have permission to

Thomas Beck
Contributor
August 29, 2023

Hello

I want to implement a rolling update procedure for my Bitbucket DC instanced.

My service user has system admin rights on my instance. When I try to use the

POST API to start the rolling update

r = requests.post(url + '/rest/zdu/start', auth=(usr, pw))

def post_request(url, req):
usr = zdu_shared.credentials.username
pw = zdu_shared.credentials.password
r = requests.post(url + '/rest/zdu/' + req, auth=(usr, pw))
if r.status_code == 200:
data = r.json()
elif r.status_code == 401:
print("ERROR 401:- Returned if user is not authenticated")
# r.raise_for_status()
exit(r.status_code)
elif r.status_code == 403:
print("ERROR 403:- Returned if the calling user does not have permission to view the content")
# r.raise_for_status()
exit(r.status_code)
elif r.status_code == 409:
print("ERROR 409:- Returned if the cluster is not in a valid state")
# r.raise_for_status()
exit(r.status_code)
else:
# r.raise_for_status()
exit(r.status_code)
return data

 Than I get ERROR 403

How can I use this API?

Which access rights must granted to the service user?

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.21.11
TAGS
AUG Leaders

Atlassian Community Events