I am trying to do a dedicated assigment between a external agent and a plan/job or whatever, using the bamboo rest api.
I found in the Documentation this.
should be AGENT or IMAGE
executor id. Id of agent or elastic image.
should be PROJECT, PLAN, JOB, ENVIRONMENT, DEPLOYMENT_PROJECT
entity id. Identifier of project, plan, job, deployment project or environment.
I am wondering what entityId really is and where i can find it from eacht Plan, job ..
Its waiting for a long so, jobkey or plankey will not work.
Also on the get
What the heck should entityType be?
The rest api seems to be not very good documented :-(
Any help would be much appriciated.
The entityID is the ID used to identify the project/plan/job in the Bamboo database. That is a design issue that blocks this API to be used only through a sequence of rest APIs.
There are some improvement requests related to this issue already reported:
select title, project_key, project_id from the project;
select title, full_key, build_id from build where build_type='CHAIN';
select title, full_key, build_id from build where build_type='JOB';
There are also internal discussions to change the agent assignment REST endpoint to make it use only project/plan/job keys which would make things a lot easier.
The API will work completely through APIs if you need to assign deployments/environments.
To get the de IDs you need to call:
Regarding the executorID, you can get it from:
Steps to do the agent assignment
curl -X GET -u <USER>:<PASSWORD> "<BAMBOO_URL>/rest/api/latest/agent"
curl -X GET -u <USER>:<PASSWORD> "<BAMBOO_URL>/rest/api/latest/deploy/project/all"
curl -X POST -u <USER>:<PASSWORD> "<BAMBOO_URL>/rest/api/latest/agent/assignment?executorType=AGENT&executorId=<EXECUTOR_ID>&assignmentType=<ASSIGNMENT_TYPE>&entityId=<ENTITY_ID>"
I hope that helps.
G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...
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