I’m trying to get a list of all repositories under the project “NEW” on my bitbucket server on prem
curl -D- -u sysadmin:password -X GET -H “Content-Type: application/json” https://localhost:PORT/rest/api/latest/repos?projectkey=NEW
where sysadmin has admin access to the repository NEW.
Problem is that it returns random repositories from other projects and a couple of recent repos from my project.
If you send a “projectKey” parameter you will receive all repositories subject to your page size, since “projectKey” is not a valid parameter and so it’s ignored. Whereas “projectkey” (all lowercase) is a valid parameter. Also, the “projectkey” parameter (all lowercase) will also be ignored and return you all repositories on Bitbucket 7.x or older.