We are unable to find the below requirements in Jira server software api document , Can any one comment below points further to my comments mentioned in brackets.
1) Send a notification to a user when they are mentioned (@) in a comment within a Jira issue : we are trying to identify if there is a field to allow us to send only notifications when they are specifically mentioned in a comment vs when they follow an issue(As investigated found that ,this function is captured in v3 api document , however jira server api call doesnt support v3 )
2) Send notification when issue is shared with another individual: within jira you have the option to share issues with individuals, we are testing to see if it would be possible to notify the end-user that an issue has been shared with them(Share api calls are not available )
3) Jira Approvals :(couldn't able to find anything related to approval process in jira software api's)
Hi,
I understand that you are looking for some documentation in regards to Jira APIs, but I'm not sure I understand which platform you are using, or which APIs. But I will try to address all here. Jira Cloud and Jira Server are going to have different documentation here as they are not exactly the same.
For question #1, could you please share with us what document you found here? Jira Server's REST API is currently only on version v2. However the Jira Cloud REST API is currently using v2 and v3. I suspect that you might be referring to a Cloud document when your platform is server, in which case there might not be a corresponding equivalent feature in Server at this time. But I would like to see which endpoint you found this in as it will make it easier to investigate if Server has this as well or not.
For part #2, if I understand correctly, you want to be able to use a REST API endpoint in order to share an issue like you can when viewing the issue itself. There is not a REST endpoint for this particular feature yet. The Notify endpoint in POST /rest/api/2/issue/{issueIdOrKey}/notify is the closest I can see to this, but it does not seem to accept direct email addresses, or usernames.
For part #3, I don't expect that Jira Software will have anything to do with Approvals. Instead Jira Service Desk is the only place where approvals are managed. That is a Service Desk specific feature. I'd suggest taking a look at the Jira Service Desk REST API Reference: Server or the Jira Service Desk REST API Reference: Cloud equivalent depending on your platform.
REST API documents for Server:
REST API documents for Cloud:
Regards,
Andy
Hi Any ,
I'm Pretty clear about the 2nd 3rd part of answers . I'll Explain more about the 1st point scenario.
version 3 cloud response has mention user details in it :
i) could able to see the mention user details captured in api response.
api url : https://api.atlassian.com/ex/jira/e43aec7a-188e-453f-9a6c-[redacted]/rest/api/3/comment/list
"content": [
{
"type": "paragraph",
"content": [
{
"type": "mention",
"attrs": {
"id": "557058:b03b0ada-[redacteduseraccountid]",
"text": "User Full Name"
}
},
{
"type": "text",
"text": "Jira case 2 "
}
]
}
]
version 2 server api response doesn't capture those details:
api url:http://localhost:8080/rest/api/2/issue/AT-1
only user name is been captured in api in the below format .
"body": "[~user.name] please take care of the issue",
"updateAuthor": {
"self": "http://localhost:8080/rest/api/2/user?username=user.name",
"name": "user.name",
"key": "JIRAUSER10000",
"emailAddress": "user.name@example.com",
"avatarUrls": {
"48x48": "http://localhost:8080/secure/useravatar?avatarId=10505",
"24x24": "http://localhost:8080/secure/useravatar?size=small&avatarId=10505",
"16x16": "http://localhost:8080/secure/useravatar?size=xsmall&avatarId=10505",
"32x32": "http://localhost:8080/secure/useravatar?size=medium&avatarId=10505"
},
"displayName": "user.name@example.com",
"active": true,
"timeZone": "Asia/Calcutta"
},
"created": "2020-06-05T19:53:06.177+0530",
"updated": "2020-06-05T19:53:06.177+0530"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for clarifying. You are correct that the server v2 REST does not capture these same details that the Cloud v3 REST will display. But some of this is due to the different ways in which Cloud and Server handle user accounts themselves. For example Jira Server doesn't have a user accountId, only Cloud does.
The only way I could see this being done in Server's v2 would be to search the body response for a [~username] in order to identify that as a mention of that user account. At least with that account name, you could then do a REST lookup of the user's other account information.
However Jira Server will automatically send a notification to any user that is mentioned on an issue, provided that the user has the permissions needed to be able to see that issue. It's not exactly a field in Jira that manages this, but
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.