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

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

ESCNV 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

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)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events