Uploaded image for project: 'Jira Platform Cloud'
  1. Jira Platform Cloud
  2. JRACLOUD-94632

The nextPageToken parameter not works on the initial request for the JQL enhanced search (GET) API endpoint

XMLWordPrintable

      Issue Summary

      The JQL enhanced search (GET) REST API endpoint uses the nextPageToken parameter for pagination.

      The documentation states that "The first page has a nextPageToken of null", but when passing thes null value to the nextPageToken parameter on the first request, the following error message is thrown:

      {
          "errorMessages": [
              "The provided next page token is invalid or expired."
          ],
          "errors": {}
      }   

      Steps to Reproduce

      1. Make a valid REST API request to the /rest/api/3/search/jql REST API endpoint and pass the "nextPageToken=null" query string parameter.

      Expected Results

      The REST API returns the "first page" data content for the request.

      Actual Results

      The request returns a 400 Bad request status response containing the following payload:

      { "errorMessages": [ "The provided next page token is invalid or expired." ], "errors": {} }  

      Workaround

      Use the POST /rest/api/3/search/jql REST API endpoint and pass the "nextPageToken" : null value in the payload as in the example below:

      {
        "jql": "project = project_name",
          "nextPageToken" : null
      } 

              Unassigned Unassigned
              412df9a4736e Alisson Dalmago
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: