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

Problem with getting plan results beyond max-result number

    • Icon: Bug Bug
    • Resolution: Low Engagement
    • Icon: Medium Medium
    • None
    • 3.2.2
    • REST API
    • standalone, linux/centos 5.5, jdk 1.6.0_25

      Whatever range I provide to results via

      expand=result[n:m]
      

      I cannot get results older than 25 last results. Still, I can get particular result providing it's number. Examples:

      https://bamboo.hurra/rest/api/latest/result/SEM-TOD?expand=results[23:25]

      <results expand="results"><results expand="result" size="657" max-result="25" start-index="0"><result id="25658441" number="647" lifeCycleState="Finished" state="Successful" key="SEM-TOD-647"><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD-647"/></result><result id="25658437" number="646" lifeCycleState="Finished" state="Failed" key="SEM-TOD-646"><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD-646"/></result></results><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD"/></results>
      

      https://bamboo.hurra/rest/api/latest/result/SEM-TOD?expand=results[25:26]

      <results expand="results"><results expand="result" size="657" max-result="25" start-index="0"/><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD"/></results>
      

      https://bamboo.hurra/rest/api/latest/result/SEM-TOD?expand=results[25:]

      <results expand="results"><results expand="result" size="657" max-result="25" start-index="0"/><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD"/></results>
      

      https://bamboo.hurra/rest/api/latest/result/SEM-TOD?expand=results[-27:-26]

      <results expand="results"><results expand="result" size="657" max-result="25" start-index="0"/><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD"/></results>
      

      Still, single result for any particular request below this limit works OK:

      https://bamboo.hurra/rest/api/latest/result/SEM-TOD-649

      <result restartable="false" continuable="false" id="25658449" number="649" lifeCycleState="Finished" state="Successful" key="SEM-TOD-649" expand="changes,metadata,artifacts,comments,labels,jiraIssues,stages"><link rel="self" href="https://bamboo.hurra/rest/api/latest/result/SEM-TOD-649"/><planName>bamboo-tod</planName>....
      

          Form Name

            [BAM-10050] Problem with getting plan results beyond max-result number

            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 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

            Any update on that? How can I get all plan keys for a specific project if I can't use either max-result(or "max-results") or start-index when already using "?expand=" ?

            Marcin Kwiecien added a comment - Any update on that? How can I get all plan keys for a specific project if I can't use either max-result(or "max-results") or start-index when already using "?expand=" ?

            D K added a comment -

            D K added a comment - Workaround doesn't seem to work for expanding vcsRevisions in latest build result https://bamboo.host/rest/api/latest/result/PLAN_KEY/latest.json?expand=vcsRevisions&max-result= 50 https://bamboo.host/rest/api/latest/result/PLAN_KEY/latest.json?expand=vcsRevisions&max-results=50  

            Marek Went (Inactive) added a comment - - edited

            You may find up do date REST documentation here: http://docs.atlassian.com/bamboo/REST/3.3-SNAPSHOT/
            This is doc build based on code javadoc.

            Work in progress, but at least you can find all additional parameters.

            Marek Went (Inactive) added a comment - - edited You may find up do date REST documentation here: http://docs.atlassian.com/bamboo/REST/3.3-SNAPSHOT/ This is doc build based on code javadoc. Work in progress, but at least you can find all additional parameters.

            TO see all results (not only finished) you have to add includeAllStates parameter. Then you will see also inProgress builds

            Yep max-results vs. max-result is old, well preserved mistake...

            Marek Went (Inactive) added a comment - TO see all results (not only finished) you have to add includeAllStates parameter. Then you will see also inProgress builds Yep max-results vs. max-result is old, well preserved mistake...

            Workaround works fine - for others trying use it, don't get confused - query param is called 'max-results', besides in XML it's 'max-result'

            Piotr Piątkowski added a comment - Workaround works fine - for others trying use it, don't get confused - query param is called 'max-results', besides in XML it's 'max-result'

            Great, will check this. BTW - is there any way to get also results being in progress? The only way I found is to get last result, then increment it's number and get them one by one, until I get 404 not found - but this is of course not optimal.

            Piotr Piątkowski added a comment - Great, will check this. BTW - is there any way to get also results being in progress? The only way I found is to get last result, then increment it's number and get them one by one, until I get 404 not found - but this is of course not optimal.

            There are some problems with such indexing indeed.
            As a workaround, you can use start-index and max-results parameters. It allows you to start reading at arbitrary index and override 25 results limit (of course more than 25 would have bigger performance penalty).

            Marek Went (Inactive) added a comment - There are some problems with such indexing indeed. As a workaround, you can use start-index and max-results parameters. It allows you to start reading at arbitrary index and override 25 results limit (of course more than 25 would have bigger performance penalty).

              Unassigned Unassigned
              d734c6282f75 Piotr Piątkowski
              Affected customers:
              6 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: