The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Results when calling Bitbucket API https://api.bitbucket.org/2.0/repositories/{workspace}

ESCNV
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 4, 2022

I noticed that even when a workspace has been set to private, I can call the https://api.bitbucket.org/2.0/repositories/{workspace} w/o credentials and still get a response instead of getting a 401 or similar.

 

{"values": [], "pagelen": 10, "size": 0, "page": 1}

I get the above response and the pagelen key seems to accurately count the number of projects within the workspace.

I get that there really is not much information in the response but it does seem to reveal a number that I feel should be private. Could I be missing a setting somewhere or is this expected behavior?

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2022

G'day!

The pagelen value is by default 10, it is not actually showing the number of results pulled by the API query so rest assured that this information is not being revealed.
This can be increased higher by adding the pagelen value to the URL, you can try this yourself by appending "?pagelen=20" to the end of the query URL, without authentication it will result in:

{"values": [], "pagelen": 20, "size": 0, "page": 1}

Hope this makes sense.

Cheers!

- Ben (Bitbucket Cloud Support)

DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events