would like know is it possible to have maxResults matching the total i'm pulling data from Jira using REST API, refer to screen shot below.
@Mabutho_MncubeThe simple answer to this is you can't.
As per API documentation the maximum number of issue you can fetch from Jira using api is set to 1000. So that is the maximum limit.
To by-pass this issue, you have to call API multiple times with start index defined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure if you resolved this issue but I used the following code to accomplish a similar goal.
```
URL = "[JIRA HOST]/rest/api/2/search?jql=project=[KEY]&fields=attachment"
with requests.get(URL, auth=HTTPBasicAuth(USERNAME, PASSWORD)) as content:
total = int(content.json()["total"])
max_results = total if total > 100 else 100
MAX_URL = "&".join([URL, f"maxResults={max_results}"])
(MAX_URL = https://[JIRA HOST]/rest/api/2/search?jql=project=[KEY]&fields=attachment&maxResults=4585)
```
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@John Russell can you elaborate more on that code you pasted? I tried plugging it in and it didn't work
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.