-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Jenkins 1.460 on Debian Squeeze
Right now, every call on the buildWithParameters URL will always redirect to the job page on success. If this API is queried through an Ajax call, it should return a JSON output of the current job instead. This can easily be detected based on the Content-Type http header sent by the client.
This is useful for example if one wants to trigger a parametrized build from jQuery, and parse the result. Right now, jQuery will always get back the HTML page of the job, which makes it hard to do any error handling.
- is related to
-
JENKINS-22865 buildWithParameters doesn't redirect to the build page
-
- Reopened
-
I'm having trouble with the JSON results when scheduling several concurrent builds from a Groovy Postbuild script in another job.
The returned JSON content does not indicate anything about the scheduled build, the queueItem object is sometimes null, and the nextBuildNumber is not reliable when scheduling multiple builds at the same time.
The JSON returned would be infinitely more useful if it contained information about the scheduled build.