API for updating the supported build engine for a specific build definition
Accepted answer
Install the EWM SDK: https://rsjazz.wordpress.com/2024/02/09/ewm-rational-team-concert-extensions-workshop-changes-for-7-0-3/ all classes related to build are in packages com.ibm.team.build.
Comments
Thank you Ralph Schoon for your response. I have figured out api to update build engine and build definition and also written script for the same.
Would have been nice if you shared what you found.
1 vote
3 other answers
These are the documented and public supported APIs: https://jazz.net/wiki/bin/view/Deployment/ELMProductAPILanding
The example is more around build results, but should provide a hint where to search for examples around build definitions.
-
Update Build Definition URL
This api is used to update build definition. To update build definition payload , header and other required changes must be as follows.
Header:
User-agent - Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36 Edg/89.0.774.77
accept - text/json
Content-Type - application/x-www-form-urlencoded; charset=UTF-8
X-Jazz-CSRF-Prevent - JSESSIONID cookie in /jazz path
Data - Encode data using function urllib.parse.urlencode(data) in python. - You can view payload from jazz.net web client -> Build Definition -> Edit build definition -> Try to change something that does not have impact on other data [In my jazz id I have not permissions for update so I have tried to update description which eventually fail but can see payload] -> Go to developer tool -> network tab -> click on update build definition url -> payload
- Note - One need to reformat build schedule
To update the supported build engine for a specific build definition in IBM Engineering Workflow Management (EWM), formerly known as Rational Team Concert (RTC), you can utilize the EWM SDK or the Plain Java Client Libraries. Unfortunately, there isn't a publicly documented REST API for build management tasks like modifying build definitions.