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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.