Hello,
I am currently developing an Jira Cloud Plugin. One functionality will be sending notifications to Jira users.
For that I am trying to call the endpoint POST /rest/api/3/issue/{issueIdOrKey}/notify with following Body:
{
"subject": "Test Email",
"textBody": "Body",
"htmlBody": "<h1>Body</h1>",
"to":
{ "voters": false,
"assignee": false,
"watchers": false,
"reporter": false,
"users": [{
"accountId": "5e4bb2c3c8ec310c955b7XXXX",
"active": true }],
"groups": null
}
}
The API is returning always following error:
{"errorMessages":["Internal server error"],"errors":{}}
How should I now what exactly the problem is? Is there a way to find it out? Or do I miss something in my request body?
Hello @Muammer Cakir ,
Welcome to the Atlassian Community!
---
EDITED:
After further investigation I can see that the problem is actually with your REST request body.
Indeed in your body you have an invalid value for group
"groups": null
Can you kindly confirm that sending below body works instead:
{ "subject": "Test Email", "textBody": "Body", "htmlBody": "<h1>Body</h1>", "to": { "voters": false, "assignee": true, "watchers": false, "reporter": true } }
Also, since the correct status code to be returned should have been 400, I have created below bug in order to have this issue fixed:
Please vote for the above bug ticket and set yourself as a watcher so that you will be notified in case of any update/progress. The bug will be addressed according to the Atlassian Cloud bug fixing policy.
Cheers,
Dario
@Dario B , thank you for the bug report :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.