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

buildWithParameters: return a JSON string when client request it through content-type header

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.460 on Debian Squeeze
    • Similar Issues:

      Description

      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.

        Attachments

          Issue Links

            Activity

            rborer Reynald Borer created issue -
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            absukl_almbrand Sune Keller made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            corfr Bertrand Roussel made changes -
            Status Reopened [ 4 ] In Progress [ 3 ]
            corfr Bertrand Roussel made changes -
            Assignee Bertrand Roussel [ corfr ]
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            andrewk Andrew Kujtan made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            danielbeck Daniel Beck made changes -
            Link This issue is related to JENKINS-22865 [ JENKINS-22865 ]
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Resolved [ 5 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 144012 ] JNJira + In-Review [ 190858 ]

              People

              Assignee:
              corfr Bertrand Roussel
              Reporter:
              rborer Reynald Borer
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: