Hello, recently I have been in a collaboration at work to create a Py script that calls the JIRA API to do some automation.
A short summary of the script:
This script combined with Windows scheduler could essentially mean that I never have to manually create a folder or perhaps even file for work again, so I've been excited.
One thing however, I wanted to triple check that doing something like this would just involve ONE API call only. Our IT admin expressed some valid concern about this script stress testing our server if too many calls are made by too many people.
The code can be found here if a look is desired:
https://pastebin.com/Gps3SvhR
Hi @Matthew Schrader - so looking at your code, I only can only see one API call:
issues = jira.search_issues(f'assignee={username} AND status = "Open"')
Jira's API doesn't spawn or require multiple calls unless your users have more than 100 open issues assigned to them. In that case, you're going to have to implement pagination, which will require more API calls. One for every 100 issues. (You will need to set the maxResults=100.)
One thing that would recommend is using the fields parameter to ensure that you are only pulling fields you need: ["reporter", "summary", "description", "created"]
This should optimize the call and make it as efficient as possible:
WARNING: I'm not very good at Python :-} so you might need to read the docs and try a few things to get the fields bit to work. They say you can also use a comma-separated string:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.