Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-30217

The response of building parametered build via remote api is broken

XMLWordPrintable

      When triggering a new build without parameters via remote api, we can get a the queued item url for retrieving the build detail later. It works fine.

      ➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithoutParameter/build" -D -

      HTTP/1.1 201 Created

      X-Content-Type-Options: nosniff

      Location: http://localhost:8080/queue/item/5/

      Content-Length: 0

      Server: Jetty(winstone-2.8)

      However the Location header won't return the queued item url when triggering a build with parameters via remote api. There is no way to make sure we can retrieve the build detail information.

      ➜ rest git:(master) curl -X POST "http://localhost:8080/job/TestBuildWithParameter/build" --data-urlencode json='{"parameter": [

      {"name": "abc", "value": "123"}

      ]}' -D -
      HTTP/1.1 201 Created
      X-Content-Type-Options: nosniff
      Location: http://localhost:8080/job/TestBuildWithParameter/
      Content-Length: 0
      Server: Jetty(winstone-2.8)

            huybrechts huybrechts
            zxkane Meng Xin Zhu
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: