Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Unable to get newly created Deployment Environments Variable

Patrick Tingne
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!
November 10, 2023

Hi All,

 

I'm trying to get the list of variables available on our Deployments Environments Variable. unfortunately, The newly created variable and its value does not show up. other existing variable are all showing on the output. 

Also tried to update the existing one and test if I could get the updated value and it works fine. 

Here's the api endpoint im using : 

'{base_url}/repositories/{workspace}/{repo_slug}/deployments_config/environments/{environment_uuid}/variables/'

There's no issue on uuid, were getting it fine. Is there something should be done before the variable get registered on the API of BB?

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 12, 2023

Hi Patrick,

I've just tested this on my end and was able to view my own deployment variables for my deployment environment regardless of whether or not they were secured or not. The variable registers instantly and will show on this endpoint.

If there is a large number of variables you may need to check subsequent results pages of that endpoint:

/2.0/repositories/{workspaceID}/{reposlug}/deployments_config/environments/{uuid}/variables?page=2

I would also suggest making sure the UUID is correct, you can view a list of environments and their associated UUID values with the following endpoint:

/2.0/repositories/{workspaceID}/{reposlug}/environments/

Cheers!

- Ben (Bitbucket Cloud Support)

Patrick Tingne
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!
November 13, 2023
?page=2

this was the only missing piece I needed. I can now get the correct data needed. thanks @[deleted] 

Like Sabine Mayer likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events