Part of my C# program creates a Jira ticket (working) and, depending on the user who is creating the ticket, adds a watcher (not working).
URL that I'm using: http://jira/rest/api/2/issue/TS-1000/watchers
I've done a lot of reading and the json syntax to add a watcher should be something like "{"username":"jdoe"}" but that synxtax, or any variation thereof (user instead of username, double quotes, single quotes, escaped quotes, etc) doesn't result in success.
The result of this code is
400 Bad Request
and
The request sent by the client was syntactically incorrect.
Can someone please give me a working JSON example to add a watcher that doesn't involve curl? I'm not using curl and I don't know how to translate a curl command to json.
Thank you!