9

I am looking for the Bamboo REST API which give us all recent Build Activity of an Application within a time-frame like all build of Last_7_Days, Last_1_Day, Last_30_Days etc. Similar to the report we get in Bamboo UI for Build Activity of a Plan. In Bamboo Report we have three section Chart, Data Table and Builds. We have REST API for Chart. But I still couldn't found any REST API to get the Build Activity. Report format attached for reference. enter image description here

I tried Bamboo Chart API but its giving output as a chart image. Does anyone know any Bamboo REST API to fetch Build Activity of an Application?

I will appreciate your help. Thanks

Roopendra
  • 7,674
  • 16
  • 65
  • 92

1 Answers1

6

As you have found there are no direct REST APIs for build activity by time period.

I'd use the build REST API (https://developer.atlassian.com/bamboodev/rest-apis/bamboo-rest-resources#BambooRESTResources-BuildService%E2%80%94AllBuilds) and XLST to filter the results by time period.

K Scandrett
  • 16,390
  • 4
  • 40
  • 65
  • 1
    Thanks for your response. I couldn't understand `XLST to filter the results by time period`? can you please explain bit more. – Roopendra Oct 10 '16 at 08:31
  • XLST can be used to transform/filter XML (https://en.wikipedia.org/wiki/XSLT). Here is an example for filtering the given XML on the left to show only those priced above $10 - http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_if – K Scandrett Oct 10 '16 at 08:41
  • In the example above it applies the filter: . You could apply the same idea for your date ranges – K Scandrett Oct 10 '16 at 08:42
  • 2
    Thanks for the explanation :) That's is I am already doing with help of python script. I am getting API output in Json format and while iterating over json. I am comparing `buildStartedTime` with date range. – Roopendra Oct 10 '16 at 09:04