Hi,
I am using Jira APIs (https://ict4dprojectservices.atlassian.net/rest/api/2/search?jql=) to get information out of the system and have the following questions.
1. Max result set size is 100, how can I increase the size.
2. I am not able to get comments related to issues, using APIs.
3. How can I get the attachments for the issues?
Thanks,
Vipin
@vipin_gupta Welcome to the community!
Here is answer as per your question,
fields=comment&fields=summary
fields=comment&fields=attachment
Thank you for the prompt reply, very useful.
Another question regarding startAt parameter.
I am using URL
https://ict4dprojectservices.atlassian.net/rest/api/2/search?jql=order%20by%20created%20DESC&maxResults=100&startAt=0&fields=comment&fields=attachment&fields=summary
I am getting below message.
This means I am getting 498 issues. So when I will set startAt parameter as 5, I should get empty response. But that is not the case, I am getting data with startAt parameter as 5
https://ict4dprojectservices.atlassian.net/rest/api/2/search?jql=order%20by%20created%20DESC&maxResults=100&startAt=5&fields=comment&fields=attachment&fields=summary
Please advice how to use startAt parameter so that code can end the loop.
'total' in response here means total number of issue that your query satisfy.
So, for maxResults=100&startAt=0 query your response,
for maxResults=100&startAt=5
You can take 'total' as maximum size of array and 'startAt' as starting index from where you are fetching sub array.
Thanks DPK. This is so helpful.
It looks like you're new here. Sign in or register to get started.