| 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 URI = "https://mydomain:9011/AgilePointServer/Admin/UpdateRole";
HTTPOperations ops = new HTTPOperations(domain, userName,
password, appID, locale);
JSONObject postData = new JSONObject();
postData.put("RoleName", "Regional Managers");
postData.put("Description", "Regional Managers");
postData.put("Enabled", "true");
JSONArray rights = new JSONArray();
String[] Rights = { "InitiateProcessInstance",
"CancelProcessInstance" };
for (String temp : Rights) {
rights.put(temp);
}
postData.put("Rights", rights);
return ops.POSTMethod(URI, postData.toString());
return "";
}
public string UpdateRole()
{
string URL = "https://mydomain:9011/AgilePointServer/Admin/UpdateRole";
string jsonRequestData = "{
\"RoleName\":\"" + "RoleToBeUpdated" + "\",
\"Description\":\"" + "test" + "\",
\"Enabled\":\"true\",
\"Rights\": [\"InitiateProcessInstance\",
\"CancelProcessInstance\"]}";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URL, jsonRequestData);
}
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