Query Role Members

API Type

REST

HTTP Method

POST

Description

Retrieves the members assigned to a role that match a specified SQL statement.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Admin/QueryRoleMembers/[roleName]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Admin/QueryRoleMembers/[roleName]

Request Parameters

Name Description

roleName

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

Request Body Properties

Name Description

sqlWhereClause

Definition:
The where clause of the SQL statement you want to query.
Type
string
Allowed Values:
The where clause of a SQL statement.

JavaScript Code Example

$("#btnQueryRoleMembers").click(function () {
  
  var JSONObject = { sqlWhereClause: "ASSIGNEE_TYPE='User'"};
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/
                QueryRoleMembers/Administrators",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String QueryRoleMembers(String roleName, 
  String sqlWhereClause) {

  String URI = "http://mydomain:9011/AgilePointServer/Admin/QueryRoleMembers/"
                       + roleName;

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

  try {
    JSONObject postData = new JSONObject();
    postData.put("sqlWhereClause", sqlWhereClause);

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

C# Code Example

public string QueryRoleMembers()
  {
    string jsonRequestData = "{\"sqlWhereClause\":\"" + "ASSIGNEE_TYPE='User'" + "\"}";

    string URL="http://mydomain:9011/AgilePointServer/Admin/
                       QueryRoleMembers/Administrators";

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

    return ops.POSTMethod(URL, jsonRequestData);
  }

Output

Returns array of WFRoleMember members of the role that match the specified SQL statement.

JSON Response Body Example

[{
  "Assignee":"DEMO3\\administrator",
  "AssigneeType":"User",
  "ClientData":"",
  "CreatedBy":"DEMO3\\administrator",
  "CreatedDate":"\/Date(928149600000)\/",
  "ObjectID":"00000000000000000000000000000000",
  "ObjectName":null,
  "ObjectType":"All",
  "RoleName":"Administrators"
  },
  {
  "Assignee":"DEMO3\\HR",
  "AssigneeType":"User",
  "ClientData":"",
  "CreatedBy":"DEMO3\\administrator",
  "CreatedDate":"\/Date(928149600000)\/", 
  "ObjectID":"00000000000000000000000000000000",
  "ObjectName":null,
  "ObjectType":"All",
  "RoleName":"Administrators"
}]

Supported Versions

AgilePoint BPMS v5.0 R2 and higher