You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Trying to get a list of 11,450 Jira Issues (3 fields) with the fewest number of requests possible (because the endpoint is being called by Salesforce which limits REST Callouts to 100/hour).
curl --request POST \
--url 'https://utilant.atlassian.net/rest/api/3/search' \
--user 'USER:PASSWORD' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
"jql": "updatedDate>=2021-01-01 AND issuetype!=Test",
The above example looks like it would take 12 x REST Callouts to get 11,450 Jira Issues but it actually takes 115. Jira responds as if maxResults was set to 100 in its paginated reply.
Salesforce then blocks me when I make my 101st request. Checkmate.
Jira's documentation says, "To manage page size, Jira may return fewer items per page where a large number of fields are requested. The greatest number of items returned per page is achieved when requesting
I need 3 fields (none of which are large).
In answer to the main question you have here, Atlassian changed the API a few years ago to limit the maximum number of returned results to 100 (until then it used to be 1000), so the parameter maxResults is more applicable if you're wanting results in chunks smaller than 100, not larger. To reiterate, you cannot get more than 100 results per API call. I realise that doesn't help you with Salesforce!
For your other questions :
If this is a one-off (or seldom run) exercise, a solution (whilst not ideal) would be to run the first 100 API calls, then wait until the next hour and run the rest.
@Warren - thanks for the response. Hope Atlassian can improve the documentation a bit more as this had me running in circles for a while (or loops of 100 records).
It's something I have to do monthly to clean up synchronized data. Guess I'll have to apply a different strategy.