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

Result resource shows incorrect size of build results

      https://answers.atlassian.com/questions/43340519/how-to-fetch-all-builds-of-a-bamboo-plan-from-rest-api

      I am trying to fetch all builds of a plan from Bamboo rest API. but its giving me only 25 builds.

      API URLhttps://localhost:8085/rest/api/latest/result/PROJECTKEY-PLANKEY.json

      As per the official documentation

      The number of resources in returned lists is limited to 25, unless you specify max-result.

      Hence for workaround, I thought I can fetch build size in first api call and pass size in second api call as max-results parameter. So that it will give me all builds for a plan. But first API call ( with max-results=1) giving me size 1 whereas same is working for fetching size of the projects.

      API call to get the build size: (Not Working)

      https://localhost:8085/rest/api/latest/result/PROJECTKEY-PLANKEY.json?max-results=1

      output: size=1, max-result=1 (Whereas plan has 33 builds)

      expected output: size=33, max-result=1

      https://localhost:8085/rest/api/latest/result/PROJECTKEY-PLANKEY.json?max-results=PASS-SIZE-HERE

      Working API to get the Project Size:

      https://localhost:8085/rest/api/latest/project.json?max-results=1

      output: size=30, max-result=1

      My question here, Can we fetch all BUILDS of a PLAN? as by default its only fetching 25 builds.

            [BAM-17961] Result resource shows incorrect size of build results

            Atlassian Update - 9 April 2025

            Hi,

            At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products.

            This bug is being closed due to a lack of engagement in the last four years, including no new watchers, votes, or comments; this inactivity suggests a low impact.

            Please note the comments on this thread are not being monitored.

            You can read more about our bug fix policy here and how we prioritize bugs.

            To learn more about our recent investments in Bamboo Data Center, please check our public roadmap.

            Kind regards,
            Bamboo Data Center

            Ishwinder Kaur (Inactive) added a comment - Atlassian Update - 9 April 2025 Hi, At Atlassian, our goal is to ensure we’re providing the best experience for our customers. With our new Data Center strategy, Atlassian's focus is on security, compliance, and performance and is a key driver in prioritizing bugs. Closing the bugs that do not fall into those categories will allow us to focus on the ones in the most current versions of our products. This bug is being closed due to a lack of engagement in the last four years , including no new watchers, votes, or comments; this inactivity suggests a low impact. Please note the comments on this thread are not being monitored. You can read more about our bug fix policy here and how we prioritize bugs. To learn more about our recent investments in Bamboo Data Center, please check our public roadmap . Kind regards, Bamboo Data Center

            Just stumbled over this and identified the following workaround:

            Workaround

            Using an arbitrary large number (say 1,000,000) that is greater than the actual result set seems to return the actual '$results.size':

            This returns the actual $results.size=x for me, allowing a proper request for the entire result set in turn.

            Steffen Opel [Utoolity] added a comment - Just stumbled over this and identified the following workaround: Workaround Using an arbitrary large number (say 1,000,000) that is greater than the actual result set seems to return the actual '$results.size': Get the size of the result set via 'max-results=1000000' https://localhost:8085/rest/api/latest/result/PROJECTKEY-PLANKEY.json?max-results=1000000 This returns the actual $results.size=x for me, allowing a proper request for the entire result set in turn.

            While not a duplicate, BAM-10050 seems related ...

            Steffen Opel [Utoolity] added a comment - While not a duplicate, BAM-10050 seems related ...

            Atlassian, is there an update on this issue?

            Shawn Sanders added a comment - Atlassian, is there an update on this issue?

              Unassigned Unassigned
              achystoprudov Alexey Chystoprudov
              Affected customers:
              10 This affects my team
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: