Hi Community,
Please help me, I am stuck...
I have a powershell script that extracts tickets using the JIRA API.
Works fine but I can only get the first 50 tickets. I found this page (https://confluence.atlassian.com/jirakb/changing-maxresults-parameter-for-jira-rest-api-779160706.html) about changing the "startAt" attribute in the query but I can't make it work.
With this code, I don't get any error message but it seems like my query is ignored because I get tickets from another project.
I alos tried using a hash table that I convert to JSON with the same result...
Here is the code :
$jql = "{`"jql`": `""+("project=CRAP",`"startAt`":50,`"maxResults`":50}"
$url = ('https://myinstance.atlassian.net/rest/api/2/search?{0}' -f $jql)
$getFromJql = Invoke-WebRequest -Uri $url -Headers $Headers -Method GET -UseBasicParsing
Thanks in advance,
Mathieu
Hello @Mathieu Roos ,
Welcome to community !
You can try to change these values "startAt`":50,`"maxResults`":50"
to "startAt: 1, maxResults`":50
Then "startAt: 51,`"maxResults:101 Basically it a indexing and pagination technique.
Suggested on Feature request:
You may reading more about indexing along for the pagination in the document and feature request above. Hope you would help you.
Have a nice day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.