How to trigger a full Bitbucket rescan?
You can schedule a rescan of all data in your Bitbucket instance with a single REST call like this:
curl -u admin -X PUT https://{bitbucket.server}/rest/security/latest/status/total_rescan
where
admin
is your Bitbucket admin user (you’ll be prompted for a password), and{bitbucket.server}
is the URL of your Bitbucket server.
You can monitor progress of scanning on the Global Dashboard page.
Please note that if you have a large Bitbucket instance, all existing branches in all projects and repositories will be scanned, which may be very resource-intensive and take a long time to complete.
For full documentation of this API, including changing the number of scans run in parallel, see REST API for Mass Scanning.