How do I set startAt and maxResults in curl request?

I'm using curl to search for issues in JIRA

This is my command:

curl -D- -u user:pass -X GET -H "Content-Type: application/json"

The problem is that i only get 50 issues. I want to set the startAt and maxResults parameters but can't seem to get it right. Can anyone help?

1 answer

1 vote
Gaston Valente Community Champion Jul 26, 2017

Hi Araiz,

This is the way:



I tried that, and it says 'startAt' and 'maxResults' is not recognized as an internal or external command.

Do you have an idea what what I might be doing wrong?

The query works with:


Gaston Valente Community Champion Jul 26, 2017

I'm copying the code i place in the answer and works.

try with a simple query to check for a syntax problem:


@Gaston Valente hi i tried that and the problem i get is that if i set startAt=0 and maxResult=50 i get 50 issues in return but then when i change it to startAt=50 and maxResult=100 i get 100 issues. when i do this in a loop it blocks the connection at one point i guess because the data becomes too large. Do you have any idea why i can"t set the startAt to a percise value ?

Gaston Valente Community Champion Jul 17, 2018

You need to specify startAt=50 and maxResults=50

That will bring the 50 records after the first 50

  • startAt defines the offset
  • maxResults define the returned records count after the offset

startAt=0 and maxResults=50 returns the first 50 records

startAt=50 and maxResults=50 returns the following 100 records after the first 50

you need to keep track of the returned record count in each call and adjust the startAt value

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,016 views 4 9
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you