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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,795
Community Members
 
Community Events
185
Community Groups

List all bamboo agent capabilities via rest

How can I list the capabilities for a bamboo agent using the rest api?

I was thinking that rest/api/latest/agent/<agent-id>/capability should work but there is no result.

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.
Mar 31, 2023

Hey @Paul Moors

That endpoint should work. Here's an example:

$ curl -s -H "Accept: application/json" -uuser:pass -X GET 'https://bamboo.mydomain.net/rest/api/latest/agent/56066049/capability' | jq
[
  {
    "key": "system.docker.executable",
    "value": "/bin/docker",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.git.executable",
    "value": "/bin/git",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK 1.8",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK 1.8.0_362",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  },
  {
    "key": "system.jdk.JDK",
    "value": "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.362.b09-2.el9_1.x86_64",
    "source": "AUTO_DETECTION"
  }
]

Check this other Community question for a KB article that shows how to export it in a consumable format:

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

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

The information is indeed very helpful, except that I get a 404 error when using that endpoint as described

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 03, 2023

Hi @Paul Moors 

Bamboo REST API will return 404 if it can't find the Agent id. Check the URL you are using and replace it with your Agent id.

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

I use one of the agent-id's that are being returned when using endpoint rest/api/latest/agent. See below.

For example:

2023-04-03 14_11_29-Window.png

Is that the correct id which I'm using?

Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 03, 2023

That's correct if you want to get information from the Local Agent.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events