I have more than 100 repositories in BitBucket. I want to subscribe to all notifications to all respositories. I can do it one by one (go to each respository -> '...' option -> manage notifications -> select all notifications)
but maybe someone know a way to do it to all resposiories of a project. Can someone help me? Thanks for your time. Jon


If you're using Bitbucket Server, one way to do this is fetch all the repository names and loop through them and send a request to
watchall the repos. This query can be further filtered with query parameters defined in the api docs.https://developer.atlassian.com/server/bitbucket/rest/v811/api-group-repository/#api-api-latest-repos-get
https://developer.atlassian.com/server/bitbucket/rest/v811/api-group-repository/#api-api-latest-projects-projectkey-repos-repositoryslug-watch-post
DATAas an array of objects with keysprojectandrepo. These are the path variables required to create a newwatchrequestPOSTa request to.../watchPOST, theX-Atlassian-Tokenheader is required because Atlassian api checks for CSRF validation and will send an error, if omitted. This should only be used for cli requests. https://confluence.atlassian.com/cloudkb/xsrf-check-failed-when-calling-cloud-apis-826874382.htmlthere is one small issue on Atlassian's side when using the api. The
Manage Account > Watched repositoriesdoesn't seem to update after this operation. If you view the actual repository, you will see theWatchingicon is updated.I filed a bug with them https://support.atlassian.com/requests/CA-2562481/