Methods / Group, Role, and Rights |
REST
POST
Updates information for a role.
https://[domain]:[port]/AgilePointServer/Admin/UpdateRole
https://[domain]:[port]/AgilePointService/Admin/UpdateRole
Name | Description |
---|---|
None | Not Applicable |
Name | Description |
---|---|
Description |
|
Enabled |
|
Rights |
|
RoleName |
|
These properties are based on the class AddUpdateRoleHelper
$("#btnUpdateRole").click(function () { var JSONObject = { RoleName: "testasd12", Description: "test", Enabled: true, Rights: ["InitiateProcessInstance", "CancelProcessInstance"] }; $.ajax({ url: "https://mydomain:9011/AgilePointServer/Admin/UpdateRole", data: JSON.stringify(JSONObject) }); });
public String UpdateRole(String RoleName, String Description, boolean Enabled, String[] Rights) { String URI = "http://mydomain:9011/AgilePointServer/Admin/UpdateRole"; HTTPOperations ops = new HTTPOperations(domain, this.userName, password, appID, locale); JSONObject postData = new JSONObject(); try { postData.put("RoleName", RoleName); postData.put("Description", Description); postData.put("Enabled", Enabled); JSONArray rights = new JSONArray(); for (String temp : Rights) { rights.put(temp); } postData.put("Rights", rights); return ops.POSTMethod(URI, postData.toString()); } catch (JSONException e1) { e1.printStackTrace(); } return ""; }
An updated WFRole object.
{ "CreatedBy": "DEMO3\\HR" "CreatedDate": "\/Date(928149600000)\/", "Description": "test" "Enabled": true "LastModifiedBy": "DEMO3\\administrator" "LastModifiedDate": "\/Date(928149600000)\/", "Name": "testasd12" "RightFlags": "YYNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN NNNNNNNNN" }
AgilePoint BPMS v5.0 R2 and higher