Add Group Member

API Type

REST

HTTP Method

POST

Description

Adds a user as a member of a group.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

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

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

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.

Description

Definition:
A free text description of an entity.
Type
string
Allowed Values:
A string that can contain spaces and special characters.

Enabled

Definition:
Enables or disables an entity.
Type
bool
Allowed Values:
  • True - Enables the entity.
  • False - Disables the entity.

GroupName

Definition:
Specifies the name of a group.
Type
string
Allowed Values:
A valid group name.

UserName

Definition:
The user name for the user.
Type
string
Allowed Values:
A valid user name for a registered AgilePoint user.

These properties are based on the class AddGroupMemberHelper

JavaScript Code Example

$("#btnAddGroupMember").click(function () {
  
  var JSONObject = { 
    GroupName: "test1234", Description: "test123", UserName: "demo3\\brian.lucas", 
    ClientData: null, Enabled: true 
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/AddGroupMember",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String AddGroupMember(String GroupName, String Description,
  String UserName, String ClientData, boolean Enabled) {

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

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

  try {
    JSONObject postData = new JSONObject();
    postData.put("GroupName", GroupName);
    postData.put("Description", Description);
    postData.put("UserName", UserName);
    postData.put("ClientData", ClientData);
    postData.put("Enabled", Enabled);

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

C# Code Example

public string AddGroupMember(string groupname, string data)
  {
    string URL = "http://mydomain:9011/AgilePointServer/Admin/AddGroupMember";

    string jsonRequestData = "{
      \"GroupName\":\"" + groupname + "\",
      \"Description\":\"" + "test" + "\",
      \"UserName\":\"" + data + "\",
      \"ClientData\":\"" + null + "\",
      \"Enabled\":\"true\"}";

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

    return ops.POSTMethod(URL, jsonRequestData);
  }

Output

WFGroupMember object that contains the data for the new group member.

JSON Response Body Example

{
  "ClientData": null
  "CreatedBy": "DEMO3\administrator"
  "CreatedDate": "\/Date(928149600000)\/", 
  "Description": "test123"
  "Enabled": true
  "Member": "demo3\\brian.lucas"
  "Name": "test1234"
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher