Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can we manage the whitelist via any sort of API calls?

Tom Southwood
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2023

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?

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 20, 2023

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

0 votes
Oday Rafeh
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 17, 2023

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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events