Export Single Plan as Spec Through REST

XMLWordPrintable

      It would be extremely useful to have the ability to, through a REST call, get the specs of a specific plan.

      Workaround

      Use the same action Bamboo is using in the UI and scrape the HTML for the contents of the text area with id exportItem_value:

      <textarea id="exportItem_value" name="exportItem" class="hidden aceDataModel" data-editor-ref="exportItem_ref">SPECS-CONTENT-HERE</textarea>
      

      Here's a quick example curl:

      BAMBOO_USER=bamboo
      BAMBOO_PASSWORD=bamboo
      BAMBOO_BASE_URL=https://bamboo
      PLAN_KEY=EXP-PLAN
      curl --silent --user $BAMBOO_USER:$BAMBOO_PASSWORD "$BAMBOO_BASE_URL/exportSpecs/plan.action?buildKey=$PLAN_KEY" | xmllint --html --xpath '//textarea[@id="exportItem_value"]/text()' - 2>/dev/null
      

              Assignee:
              Aidan Goldthorpe
              Reporter:
              Jonathan Joseph
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: