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

Bamboo agent lifecycle automation help

Enrique Ramirez March 16, 2019
Hi !!

I am working on automating the lifecycle Of a bamboo agent by using their restful apis. One of the step is to assign an agent to specific job using the following api end point:

I am having difficulties figuring out how to retrieve the entity id is from bamboo. My understanding is that this variable represents the unique id of the job.

I have looked everywhere in bamboo for this number but without any luck.

I was hoping somebody could help me shed some light on this.

1 answer

0 votes
Rafael Pinto Sperafico
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, 2019

Hi @Enrique Ramirez ,

Yes, you are correct when saying the entityId is the id for what you have described in assignmentType, so if you have selected JOB (as in your case), the entityId 3637249 must represent the Job's id.

There is a Suggestion APIs for Jobs should show the Job id filed waiting to be implemented. If possible, I would encourage you to comment on the link mentioned, as well as voting and becoming a watcher so you can keep up to date with changed to it.

In the meantime, you could get the Job id by running SQL statement against Bamboo's database:

# build_type, can be either CHAIN, CHAIN_BRANCH or JOB where:
# CHAIN relates to a plan
# CHAIN_BRANCH relates to a branch
# JOB relates to a job

select build_id
, build_type
, full_key
from build
where full_key like 'PROJ-PLAN%';

Kind regards,

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events