Use JEMH Public Rest API to Export, Import and Update profiles

The Atlassian REST API Browser | Atlassian Marketplace (currently Server only) is usable with JEMH.

JEMH has a lot of internal application REST services that are not recommended for use, we have a /public/ api section that is for external integration by REST:

Examples

atl_token is required on most calls, see most logged in pages for atlassian_token in html.

Listing profiles

prior to 3.3.36, the Profile needed to be edited and the API box checked for a profile to appear in this list, we’re relaxing that and applying specifically to the API for posting mail through a given profile.

curl -v -X GET -H "X-Atlassian-Token: no-check" --user admin:admin http://localhost:8080/rest/jemh/1.0/public/profile/list

results in:

[{"id":4,"name":"UPDATED VIA REST","desc":""}]

Export profile

curl -H "X-Atlassian-Token: no-check" --user admin:admin http://localhost:8080/rest/jemh/1.0/public/profile/export?profileId=4

Reponse is profile XML/

Update a profile

downloading a Profile XML and updating the Profile Name to “UPDATED VIA REST”:

Profile after update shows the name change

Auditing > Profile Auditing shows delta: