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

REST API endpoint should have consistent prefix

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • core
    • None

      the endpoint prefix is sometimes inconsistent even when we deal with the same class/object

      for example, the /computer object. To get the information on /computer, you normally invoke the restful call like this:

      https://jenkins.mydomain.com/computer/foobar/api/json

      To take it offline

      https://jenkins.mydomain.com/computer/foobar/toggleOffline?offlineMessage="taking it disconnected via jenkins.go as part of the maintenance"

      But when we are talking about writing restful api lib for Jenkins and the endpoint inconsistency is making developers writing case-by-case basis. And could very well end up with something broken without printing verbose message in the log:

      https://jenkins.mydomain.com/computer/foobar/toggleOffline?offlineMessage="taking it disconnected via jenkins.go as part of the maintenance"/api/json

            Unassigned Unassigned
            samxiao Sam Xiao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: