Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-13948

DELETE /rest/api/latest/queue/PLAN-KEY-BUILDNUMBER Throws Method not found 405

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Low
    • None
    • 5.2
    • None
    • None

    Description

      According to https://developer.atlassian.com/display/BAMBOODEV/Bamboo+REST+Resources#BambooRESTResources-BuildQueueService

      I should be able to delete things from the queue using the api.
      However, it appears that the DefaultServlet is getting in the way and looking for the actual resources on disk.

      Before mucking around with configs, this is the symptom.
      POST something to the queue (I am sure it's queued).
      $ curl -X POST http://rjames:monkeys@localhost:8085/rest/api/latest/queue/WIL-BT

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><restQueuedBuild buildResultKey="WIL-BT-341" buildNumber="341" planKey="WIL-BT"><triggerReason>Manual build</triggerReason><link rel="self" href="http://localhost:8085/rest/api/latest/result/WIL-BT-341"/></restQueuedBuild>rjames@ma-dt-rj:bamboo-test
      

      DELETE it from the queue.
      $ curl -X DELETE http://rjames:monkeys@localhost:8085/rest/api/latest/queue/WIL-BT-341

      <html><head><title>Apache Tomcat/7.0.40 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - Method Not Allowed</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Method Not Allowed</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.40</h3></body></html>
      

      I think this is because of the doDelete method in the catalina DefaultServlet container. Because...
      If I set readonly=false and post a new job, then create a file matching the uri, I can get the server to actually delete the file via the DELETE request(!!!!), but the PLAN-KEY-BUILD is still there.

      This leads me to believe that the DefaultServlet is not passing the request through... or however this works.
      I really don't know how the internals of java servlet containers work so well...

      But... regardless, it would be great if the API worked as documented.

      thanks!

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              5bce2257ba2e Randy James
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: