This collection of API’s give the function ality, as can be seen its not a cohesive API yet, we will do this under /jemh/latest/public/profile over time.
This will export a single profile nominated by profileId to file profile.xml
curl -u admin:admin -X GET -H "X-Atlassian-Token: no-check" http://localhost:8080/rest/jemh/latest/public/profile/export?profileId=1 > profile.xml |
This will upload the file profile.xml from the current folder as a new Profile
curl -u admin:admin -F "uploadProfile=@profile.xml" -H "X-Atlassian-Token: no-check" http://localhost:8080/secure/admin/jemh/JEMHProfiles!uploadProfileXML.jspa |
This will upload the file profile.xml from the current folder, causing the profile nominated by profileId to have its configuration updated. This process is not atomic, we remove all Project Mappings, and rebuild from the supplied configuration, all remaining values are ‘set’ live, ie, such updates should be done in a maintenance window.
curl -u admin:admin -F "uploadProfileXml=@profile.xml" -H "X-Atlassian-Token: no-check" http://localhost:8080/rest/jemh/latest/api/profile/updateFromXml?profileId=5 |
Delete the profile nominated by id
curl -u admin:admin -X GET -H "X-Atlassian-Token: no-check" http://localhost:8080/secure/admin/jemh/JEMHProfiles!delete.jspa?id=5 |