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' \
--data '{
"jql": "updatedDate>=2021-01-01 AND issuetype!=Test",
"maxResults": 1000,
"fields": [
"issuetype",
"summary",
"customfield_10090"
],
"startAt": 0,
"expand": ["names"]
}'
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.
{"expand":"schema,names","startAt":0,"maxResults":100,"total":11450,"issues":[...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 id or key only."
I need 3 fields (none of which are large).
Questions:
- Is there a way to reduce my page size? A fair amount of superfluous info is in the response to my query. Selecting any fields other than key or id limit the response to 100 records.
- Is there a different call I could make to get this info?