REST API for agent assignment should support application/json content type

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Agents, REST API
    • None
    • 0
    • 1

      Summary

      /agent/assignment - Bamboo REST API documentation

      We are able to receive the response in the application/json format, but we can't make the request to the server using content in this format.

      Request with parameters in line (works)

      Request
      curl -u <user>:<passwd> \
           -X POST "http://localhost:8085/bamboo/rest/api/latest/agent/assignment?executorType=AGENT&executorId=196609&assignmentType=DEPLOYMENT_PROJECT&entityId=3637249"
      
      Response
      {"nameElements":["QA and DEV"],"description":"","executableType":"DEPLOYMENT_PROJECT","id":3637249,"executableId":3637249,"executableTypeLabel":"Deployment project","executorType":"AGENT","executorId":196609,"capabilitiesMatch":true}
      

      Request using "Content-Type: application/json" (fails)

      Request
      curl -u <user>:<passwd> \
             -H "Content-Type: application/json" \
             -d '{"executorType":"AGENT","executorId":"196609","assignmentType":"DEPLOYMENT_PROJECT","entityId":"3637249"}' \
             -X POST http://localhost:8085/bamboo/rest/api/latest/agent/assignment
      
      Response
      {"errors":["executorType query parameter is mandatory"],"fieldErrors":{}}

      More ...

      As noticed in https://www.reddit.com/r/atlassian/comments/b1s1x2/bamboo_agent_assignment_automation/ we expect numerical ids for executable while we don't expose neither plan or job ids in our REST API. This API shall accept plan/job keys as well.

              Assignee:
              Unassigned
              Reporter:
              Daniel Santos (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: