How to Know the list of REST API Calls triggered on each Search or view issue.
/rest/api/latest/issue/PROJ-1234
or
rest/api/latest/search?jql=filter=10015
Hi Sivarama,
There's no published list - it changes between Jira versions and with whatever apps you have installed, so you have to observe it.
Quickest way is the browser. F12, Network tab, tick "Disable cache", filter to Fetch/XHR, then hard-reload the issue. No server access needed, but it only shows what the browser asks for - anything Jira calls server-side never appears there.
The complete picture is in the Tomcat access log. The AccessLogValve is defined in your server.xml and writes to $JIRA_INSTALL/logs/access_log.yyyy-MM-dd. Worth checking it's actually enabled on your instance rather than assuming it is.
Filtering that log by timestamp is fiddly, so I mark the line count first and then read only what came after:
LOG=$JIRA_INSTALL/logs/access_log.$(date +%F)
BEFORE=$(wc -l < $LOG)
# hard-reload the issue in your browser and let it finish
tail -n +$((BEFORE+1)) $LOG | grep rest | sort | uniq -c | sort -rn
Two things in that log format cost me time, so worth passing on.
A dash means an empty value, not part of the path. If a line looks like it ends in "resources-", that's the path with an empty query string, nothing more.
And the unit of %D depends on your Tomcat version. The Tomcat docs say "Time taken to process the request in millis. Note: In httpd %D is microseconds. Behaviour will be aligned to httpd in Tomcat 10 onwards." So Tomcat 9 gives you milliseconds and Tomcat 10 and later gives you microseconds. Mine runs Tomcat 10.1.55 and I spent a few minutes convinced the box was a thousand times slower than it actually is.
One thing that surprised me doing this on my own instance: of roughly 60 distinct endpoints hit by opening a single issue, only about 15 were Jira core. The rest were marketplace apps, each polling their own resource every time an issue is opened. If you're chasing performance rather than curiosity, that's usually where it lands.
Last thing - most of what you'll see is internal and changes between versions without notice. Only the documented API is safe to build against, and prefer version 2 over "latest" in anything you write yourself, since "latest" quietly moves under you at the next upgrade.
Happy to paste the full endpoint list I captured if that would help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.