Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-29304

REST API add watcher (POST) request is not a valid JSON syntax

XMLWordPrintable

      According to http://docs.atlassian.com/jira/REST/5.0.5/#id78518 and http://docs.atlassian.com/jira/REST/latest/#id75724, to add a watcher, you need to send the String "username" to the server.

      That String is not a valid JSON string and will fail in a strict parser like the Java JSON layer.

      The workaround provided in https://answers.atlassian.com/questions/61770/please-help-got-error-400-when-trying-to-add-watcher-using-rest-api about using the curl command cannot easily be implemented in Java either.

      Would it be possible to fix that issue and request a proper JSON syntax like:

      {"name":"fred"}
      

              Unassigned Unassigned
              f4a8a46ac6e3 Johan Fischer
              Votes:
              43 Vote for this issue
              Watchers:
              45 Start watching this issue

                Created:
                Updated: