JIRA Rest API - Get a list of watchers from an issue

Alex Androshchuk April 13, 2018

I would like to send one request to get an issue and watchers.

In the example "Get issue" I see all watchers

{
...
  "fields": {
    "watcher": {
      "self": "http://www.example.com/jira/rest/api/2/issue/EX-1/watchers",
      "isWatching": false,
      "watchCount": 1,
      "watchers": [
        {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        }
      ]
    },
...

But when I try to get information about the problem, I get only basic information about the watcher.

{
...
  "fields": {
    "watchers": {
      "isWatching": true,
      "watchCount": 3,
      "self": "http://www.example.com/jira/rest/api/2/issue/EX-1/watchers",
      }
    },
...

 Now I use 2 requests:

/rest/api/2/issue/{Issue-Id}/ 
/rest/api/2/issue/{Issue-Id}/watchers

 

1 answer

1 accepted

1 vote
Answer accepted
Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 15, 2018

i dont think there is any way to request the issue details and watchers in a single request with the existing JIRA rest api endpoints, unless you develop your own endpoints https://developer.atlassian.com/server/framework/atlassian-sdk/rest-api-development/

Alex Androshchuk April 25, 2018

Ok. Thanks

Suggest an answer

Log in or Sign up to answer