Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3986

Stash REST API does not consistently provide a nextPageStart on paginated resources

    XMLWordPrintable

Details

    Description

      To reproduce do the following :

      1. Make a request for commits within range through a browser.

      1. Log in to a stash server
      2. make the following request (must be a request that has multiple pages)
        https://<stash-server>/rest/api/1.0/projects/<projectKey>/repos/<repoSlug>/commits?since=<since git ref>&unti=<until git ref>&start=0
      3. The result response json will have the nextPageStart field set as described in the documentation.

      2. Make the same request using curl

      1. curl ' https://<stash-server>/rest/api/1.0/projects/<projectKey>/repos/<repoSlug>/commits?since=<since git ref>&unti=<until git ref>&start=0' -u <username>
      2. the response json does not have the nextPageStart field set as described in the documentation.

      Expected Outcome :

      All requests for resources that are pagenated should contain the nextPageStart field to facilitate the processing of pagenated responses. This should also be the case when using the groovy HTTPBuilder library or curl.

      Actual Outcome :
      Requests made through a browser (chrome tested) does have the same out as is shown in the documentation. But requests made via a script using curl or HTTPBuilder library does not have the nextPageStart field even for pagenated responses.

      The request that this was seen with is documented here : https://developer.atlassian.com/static/rest/stash/2.8.2/stash-rest.html#idp2683120

      Attachments

        Issue Links

          Activity

            People

              jhinch jhinch (Atlassian)
              cb7374dc4886 Yash Vyas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: