Request a build via REST api
Accepted answer
Luca, can you provide more details about your use case? Does it have to be via REST or could you use the Java client API too? The REST interface that supports the Build web UI does support issuing build requests, including overriding / removing build properties (but not configuration element properties). Changing the build definition is also possible, but I'm guessing you only want to do that per-request.
Try looking at the HTTP request issued when you request a build via the web UI, using Firebug or whatever your favourite web debug tool is. e.g. if I request a build for definition with id "somedefinition", and adding one property and removing another, it should do a POST with:
url: <repo>/resource/virtual/build/requests
headers: Accept: text/json, Content-Type: text/json;charset=UTF-8
body: {"definition":"somedefinition","allowDuplicateRequests":true,"newOrModifiedProperties":[{"kind":"com.ibm.team.build.property.string","name":"addedProperty","value":"some value","description":"","isRequired":false,"isGenericEditAllowed":true}],"deletedProperties":[{"name":"deletedPropertyName"}]}
2 other answers
Hi Luca,
This is discussed in another thread ... https://jazz.net/forum/questions/26893/build-rest-api?redirect=%2Fforum%2Fquestions%2F26893%2Fbuild-rest-api.
The story Nick references is resolved now, but it's unclear to me if an API was ever documented. I'll get Nick to chime in here.
Scott
This is discussed in another thread ... https://jazz.net/forum/questions/26893/build-rest-api?redirect=%2Fforum%2Fquestions%2F26893%2Fbuild-rest-api.
The story Nick references is resolved now, but it's unclear to me if an API was ever documented. I'll get Nick to chime in here.
Scott
You can also use this one: https://jazz.net/forum/questions/135858/how-to-perform-particular-action-using-rest-api-in-clm-applications