Hello I have read the doc, and google around, but I have found no solution so far to the problem of triggering a build via an http call and getting back a build number (eg json-encoded) instead of a 302 redirect to the page listing project status.
I can call http://jenkins-server/job/my_project/build?delay=0sec, but I get redirected to an html page that I have to scrape to understand if a new build is undergoing - and I am not even sure to be able to trap any error messages that would be in there. I tried doing GET calls to both http://jenkins-server/job/my_project/build/api/json and http://jenkins-server/job/my_project/api/json/build, to no avail. Is this possible at all?