Add Role Member

API Type

REST

HTTP Method

POST

Description

Adds a user or a group to a role.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Admin/AddRoleMember

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Admin/AddRoleMember

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

Assignee

Definition:
The name of the assignee.
Type
string
Allowed Values:
A valid user name or group name, depending upon the assignee type.

AssigneeType

Definition:
The type for the assignee for the task.
Type
string
Allowed Values:
  • User - Assigns the task to a user.
  • Group - Assigns the task to a group.

ClientData

Definition:
Specifies the client data, which identifies a client for AgilePoint Server.
Type
string
Allowed Values:
A string that contains the client data.

If this value is null, the system will keep existing client data. Otherwise the relevant data is overwritten.

ObjectID

Definition:
Reserved for future use.
Type
string
Allowed Values:
A null value.

ObjectType

Definition:
Reserved for future use.
Type
string
Allowed Values:
A null value.

RoleName

Definition:
The name of a role.
Type
string
Allowed Values:
A valid role name.

These properties are based on the class AddRoleMemberHelper

JavaScript Code Example

$("#btnAddRoleMember").click(function () {
  
  var JSONObject = { 
    RoleName: "Administrators", Assignee: "DEMO3\HR", 
    AssigneeType: "User", 
    ClientData: null, ObjectID: "00000000000000000000000000000000", 
    ObjectType: "All"
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/AddRoleMember",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String AddRoleMember(String RoleName, String Assignee,
  String AssigneeType, String ClientData, String ObjectID,
  String ObjectType) {

  String URI = "http://mydomain:9011/AgilePointServer/Admin/AddRoleMember";

  HTTPOperations ops = new HTTPOperations(domain, this.userName,
                       password, appID, locale);

  try {
    JSONObject postData = new JSONObject();
    postData.put("RoleName", RoleName);
    postData.put("Assignee", Assignee);
    postData.put("AssigneeType", AssigneeType);
    postData.put("ClientData", ClientData);
    postData.put("ObjectID", ObjectID);
    postData.put("ObjectType", ObjectType);

    return ops.POSTMethod(URI, postData.toString());
  } catch (JSONException e1) {
    e1.printStackTrace();
  }
  return "";
}

Output

WFRoleMember object.

JSON Response Body Example

{
  "Assignee": "DEMO3\HR"
  "AssigneeType": "User"
  "ClientData": null
  "CreatedBy": "demo3\\brian.lucas"
  "CreatedDate":" \/Date(928149600000)\/", 
  "ObjectID": "00000000000000000000000000000000"
  "ObjectName": null
  "ObjectType": "All"
  "RoleName": "Administrators"
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher