I am trying to add watchers to an issue using the JIRA REST API.
I have tried the following
try:
data = "\"admin\""
headers = {"Authorization": " Basic " + b64encode(username + ":" + password), "Content-Type": "application/json"}
request = Request('https://_****_.atlassian.net/rest/api/latest/issue/MISC-1/watchers', data=data , headers=headers)
js_res = urlopen(request)
objResponse = load(js_res)
print objResponse
except urllib2.HTTPError, error:
print error.read()
I have tried different ways but nothing worked.
Can Someone please help me with this????
Community moderators have prevented the ability to post new answers.
Hi Jag,
Try this CURL command,
curl -i -u username:password -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '"jirausername"' https://_****_.atlassian.net/rest/api/latest/issue/MISC-1/watchers -k
Taha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.