Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update bamboo project variable in a task

I have a project variable to store an AWS access key. After rotate access key in task, I want to update the project variable with the new access key, is it possible? The variable is used in deployment projects to access to AWS resources.

1 answer

0 votes

Plan execution can't update Project variable

Thanks the answer.

Is there any way to update Project variables in AWS Lambda?

There's no REST API for project variable update available yet, but you can craft curl command to update it with multiform HTTP POST request

Like Steffen Opel _Utoolity_ likes this

Thanks @Alexey Chystoprudov
I tried to find about the multiform HTTP POST request  but I counts't do it.
Could you give the information of multiform HTTP POST request to update?

Try something like this

curl -u user:password 'http://BAMBOO_URL/project/admin/ajax/updateProjectVariable.action?projectKey=PRJKEY' \
  -H 'x-atlassian-token: no-check' \
  -H 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \
  --data-raw ‘variableId=VARIABLE_ID&variableKey=myvar&variableValue=test2&bamboo.successReturnMode=json&confirm=true' 
Like Jae Hun Lee likes this

Thanks, @Alexey Chystoprudov,

Could I use a personal access token instead of using -u user:password?

Unfortunately PAT doesn't work for non REST calls. 

By the way this feature is available by REST API since 8.1.1, see

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

66 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you