WE have users with dynamic IP addresses and have systems that manage them, is it possible to manage what IP addresses are in the whitelist via an API call rather than having to use the web based UI?
Hi Tom and welcome to the community!
I'm afraid that it is not possible to manage a workspace's allow-listed IPs via API in Bitbucket Cloud. This is only possible via the UI at the moment.
We have a feature request for providing an API endpoint to do that:
The request has been closed as it is not likely to be worked on in the near future. However, I would recommend adding a comment there to express your interest, as our product managers continue to monitor even closed requests.
If you have any questions, please feel free to let me know.
Kind regards,
Theodora
Yes, it is possible to manage the whitelist in Bitbucket via API calls. The Bitbucket API provides endpoints for managing IP whitelists.
You can use the Bitbucket REST API to retrieve and update the list of IP addresses in the whitelist for a repository or for the entire Bitbucket instance.
Here are the steps to manage the whitelist via API calls:
Retrieve the current whitelist for a repository or the entire Bitbucket instance using the following API endpoint:
GET /rest/api/latest/application-properties/feature/repository.whitelist
This will return a JSON object containing the current whitelist.
Modify the whitelist as needed. You can add or remove IP addresses by updating the JSON object returned by the previous API call.
Update the whitelist using the following API endpoint:
PUT /rest/api/latest/application-properties/feature/repository.whitelist
Provide the modified JSON object in the request body.
You will need to authenticate your API calls with the appropriate credentials. You can use OAuth or personal access tokens for authentication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.