Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-12725

The /rest/api/1.0/projects/PROJECT_KEY/repos/REPO_SLUG/browse API does not include a "nextPageStart" attribute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 6.10.4, 7.6.1, 7.9.0
    • Fix Version/s: 7.14.0
    • Component/s: API - REST
    • Labels:

      Description

      Issue Summary

      The GET /rest/api/1.0/projects/PROJECT_KEY/repos/REPO_SLUG/browse API, which is documented to be a paged API does not return a "nextPageStart" attribute when more than one page of response exists (the response contains "isLastPage": false).

      Steps to Reproduce

      1. Commit a file to a repo, with 10 lines, e.g.
        line 1
        line 2
        line 3
        line 4
        line 5
        line 6
        line 7
        line 8
        line 9
        line 10
        
      2. Call the API and pass a "limit=5" parameter, e.g.
        curl -u <USER> GET <BITBUCKET_URL>/rest/api/1.0/projects/<PROJECT_KEY>/repos/<REPO_SLUG>/browse/<FILE>?limit=5
        
      3. Check output:
        {
            "lines": [
                {
                    "text": "line 1"
                },
                {
                    "text": "line 2"
                },
                {
                    "text": "line 3"
                },
                {
                    "text": "line 4"
                },
                {
                    "text": "line 5"
                }
            ],
            "start": 0,
            "size": 5,
            "isLastPage": false
        }
        

        The first 5 lines are returned and isLastPage attribute is "false". But it does not include a nextPageStart attribute.

      Expected Results

      The JSON response will include the nextPageStart attribute, as documented in the Paged APIs section of the REST API documentation.

      Actual Results

      The nextPageStart attribute is not included.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              khughes@atlassian.com Kristy
              Reporter:
              jmariano@atlassian.com JP Mariano
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Backbone Issue Sync