Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA JQL result set limited to 50

Hello, I am executing a JQL using REST API call from within a VBA macro. Here is my code ...

 

sJQL = "https://somewebsite.com/issues2/rest/api/latest/search?jql=project%20%3D%20SISBTXTRPR%20AND%20issuetype%20%3D%20Story%20ORDER%20BY%20key%20ASC"

 

With JiraService


.Open "GET", sJQL, False
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Accept", "application/json"
.SetRequestHeader "Authorization", "Basic " & UserPassBase64
.Send ""

Set JSONObj = JsonConverter.ParseJson(JiraService.ResponseText)

For i = 1 To 100
ActiveSheet.Cells(i, 1) = JSONObj("issues")(i)("key")
Next i 

End With

 

The result set is always limited to 50. How could I overcome this? Please help!

 

1 answer

0 votes

Hi,

You need to pass 'maxResults' parameter to your query, like so:

https://yourjira.com/rest/api/latest/search?maxResults=500

Also, please take a look at this ticket

Thank you, I will try this way also. However, I was able to submit a request to the REST API using URI as below:

  

sJQL = "https://somewebsite.com/issues2/rest/api/latest/search?jql=project%20%3D%20SISBTXTRPR%20AND%20issuetype%20%3D%20Story%20ORDER%20BY%20key%20ASC&startAt=0&maxResults=50"

 

And then I wrote a piece of logic to paginate for the next 50. So, the next URI would be "startAt=50&maxResults=50"

sJQL = "https://somewebsite.com/issues2/rest/api/latest/search?jql=project%20%3D%20SISBTXTRPR%20AND%20issuetype%20%3D%20Story%20ORDER%20BY%20key%20ASC&startAt=50&maxResults=50"

 

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you