-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Medium
-
Component/s: Repository - Settings General
-
1
-
Severity 2 - Major
-
27
Summary:
Manipulating the repository using the below API works except for the PUT method.
That is, it is possible to READ and DELETE a repo using its UUID, but the update fails.
The below API call using the team name or username and repository UUID works.
curl --request PUT --url https://api.bitbucket.org/2.0/repositories/{accountName}/{repoUUID} -H "Content-Type: application/json" -d '\{"is_private": true,"fork_policy": "no_public_forks"}' -u username:app_password
The below call with empty field and repository UUID does not work:
curl --request PUT --url https://api.bitbucket.org/2.0/repositories/%7B%7D/{repoUUID} -H "Content-Type: application/json" -d '\{"is_private": true,"fork_policy": "no_public_forks"}' -u username:app_password {"type": "error", "error": {"message": "No user with username \"{}\"."}}
The below documentation says we can use empty field and repository UUID to make API calls.
Workaround
Call API using /repositories/{username}/{repo_slug} instead of using /repositories/{}/{repo_slug}