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

Export Single Plan as Spec Through REST

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      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
      

            agoldthorpe Aidan Goldthorpe
            eee6c295384c Jonathan Joseph
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: