Thanks Jesse, According to the docs the /build method should always redirect over to a /queue/item URL:
*"To programmatically schedule a new build, post to this URL <http://localhost:8080/job/create1_epgujwymwu/build>. If the build has parameters, post to this URL <http://localhost:8080/job/create1_epgujwymwu/buildWithParameters> and provide the parameters as form data. Either way, the successful queueing will result in 201 status code with Location HTTP header pointing the URL of the item in the queue. By polling the api/xml sub-URL of the queue item, you can track the status of the queued task. Generally, the task will go through some state transitions, then eventually it becomes either cancelled (look for the "cancelled" boolean property), or gets executed (look for the "executable" property that typically points to the AbstractBuild object.)"* However I've noticed that when the build has parameters it can redirect to Job's URL (not a queue), e.g something that looks like this: *http://localhost:8080/job/my_job <http://localhost:8080/job/my_job>* and not like this: *http://localhost:8080/queue/item/1234 <http://localhost:8080/queue/item/1234>* I'm using 1.574 Sal On 2 Aug 2014 01:48, "Jesse Glick" <[email protected]> wrote: > On Wed, Jul 30, 2014 at 5:15 PM, Salim Fadhley <[email protected]> > wrote: > > What'd really want is a change to the /build and /buildWithParmeters so > that > > instead of just returning an HTTP status code, I'd like to see some more > > detailed status. It ought to be able to identify the queue item or > ongoing > > build that was generated as a result of attempting to start the job. > > It already returns the queue item information, which allows you to > track the item through to an actual build (if it is ever scheduled). > The “Perform a build” section of the documentation page found from the > “REST API” link on a job’s index page gives details. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/_vYBkV3hVtU/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
