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

Can I make an API call to bamboo to rename my Agent

William Flow September 13, 2022

Hi All

   So I have written an Ansible Playbook that creates a EC2 instance then makes that a Bamboo Agent, in my playbook I make an API call to my bamboo server that authorizes the new agent and enables it, but the name of the agent is the hostname it gets from aws so I wanted to know since i can't change the host name in my playbook for aws, is there a bamboo api call that i could do that with?

1 answer

1 accepted

0 votes
Answer accepted
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2022

Hello @William Flow

Assuming you are running Remote Agents on an EC2 instance and not Elastic Agents which are Ephemeral by nature, you can use the following API call to modify the Agent's name:

curl --request PUT \ 
--url 'http://{baseurl}/rest/admin/latest/config/agents/{agentId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"id": 131073,
"type": "local",
"name": "Default Agent",
"description": "This is a description",
"enabled": true,
"link": "https://baseurl/rest/admin/latest/agent/131073"

The agentId can be obtained from <bamboo-agent-home>/bamboo.cfg.xml


Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events