Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Service Desk/Management Email Channel Password Update API

Guru Darbar July 20, 2023

Howdy everyone,

I was looking for a simple solution to update our many JSD email channel passwords without having to manually go to each project and update the password through the WebUI.

This is for self-hosted Data-Center versions of Jira and Jira Service Management, ymmv.

Since I couldn't find anything online, nor any API documentation, I thought I would share what I figured out.

You can get info for your Email Channel here using a normal GET request:
https://mytestjira.example/rest/servicedesk/1/servicedesk/mySD/incomingemail

It should return this:

{
"projectKey": "mySD",
"portalKey": "mysd",
"canAdministerJira": true,
"canAdministerProject": true,
"emailConfigured": true,
"outgoingMailConfigured": true,
"isPublicSignupEnabled": true,
"canTurnOnOff": true,
"addButtonState": "hidden",
"hasValidRequestType": true,
"incomingEmails": [
{
"id": 69,
"mailChannelKey": "CHANNELc1fb4110274d",
"emailAddress": "mymailaddress@mytestjira.example",
"requestTypeId": 8,
"requestTypeName": "IT help",
"requestTypeIcon": 11827,
"enabled": true,
"username": "mytestusername",
"protocol": "imaps",
"host": "mymailserver.example",
"port": "993",
"broken": false,
"timeout": 50000,
"runOutcome": "SUCCESS",
"folder": "inbox"
}
],
"expandHelpBubble": false,
"clientConfigurations": []
}

 

Using a PUT request to here will let you update the password:
https://mytestjira.example/rest/servicedesk/1/servicedesk/mySD/incomingemail/update

With this in the body of the request:

{
"emailAddress": "mymailaddress@mytestjira.example",
"folder": "inbox",
"id": 69,
"protocol": "imaps",
"providerKey": "generic",
"requestTypeId": 8,
"timeout": 50000,
"username": "mytestusername",
"password": "mynewtestpassword",
"host": "mymailserver.example",
"port": "993"
}


Hope that helps others as it has helped me.

Of course, I'm no expert, just something I figured out. If there is a better way to do this. I'd love to know.

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events