Get Delegations

API Type

REST

HTTP Method

POST

Description

Retrieves a list of delegation objects that match the specified parameters. You can leave the parameters null to indicate any.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

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

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

FromUser

Definition:
Specifies a user from whom to delegate tasks.
Type
string
Allowed Values:
A valid user name.

ToUser

Definition:
Specifies the user who will receive the delegated tasks.
Type
string
Allowed Values:
A valid user name.

Status

Definition:
The status of the associated item.
Type
string
Allowed Values:
A valid status.

JavaScript Code Example

$("#btnGetDelegations").click(function () {
  var JSONObject = {
    FromUser: "demo3\\brian.lucas",
    ToUser: "demo3\\lilly.allen",
    Status: "Active"
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/GetDelegations",
    data: JSON.stringify(JSONObject)
  });
});

Java Code Example

public String GetDelegations(String FromUser, 
  String ToUser, String Status) {

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

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

  JSONObject postData = new JSONObject();
  try {
    postData.put("FromUser", FromUser);
    postData.put("ToUser", ToUser);
    postData.put("Status", Status);

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

C# Code Example

public string GetDelegations()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Admin/GetDelegations";

    string jsonRequestData = "{
      \"FromUser\":\"" + "MYDOMAIN\\administrator" + "\",
      \"ToUser\":\"" + "MYDOMAIN\\peter.parker" + "\",
      \"Status\":\"" + "Active" + "\"}";

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

    return ops.POSTMethod(URI, jsonRequestData);
  }

Output

An array of WFDelegation objects.

JSON Response Body Example

[{
  "CancelledBy": "",
  "CancelledDate": "\/Date(928149600000+0000)\/",
  "CreatedBy": "demo3\\brian.lucas",
  "CreatedDate": "\/Date(1394154711507+0000)\/",
  "DelegationID": "77F9A9946CF74545B4C8A27956CDA036",
  "Description": "Rest Test",
  "EndDate": "\/Date(28799000+0000)\/",
  "FromUser": "demo3\\brian.lucas",
  "LastUpdatedBy": "demo3\\administrator",
  "LastUpdatedDate": "\/Date(1394154884247+0000)\/",
  "ProcDefIDS": "",
  "RecWeekdaysString": "",
  "StartDate": "\/Date(-57600000+0000)\/",
  "Status": "Active",
  "ToUser": "demo3\\lilly.allen"
}]

Supported Versions

AgilePoint BPMS v5.0 R2 and higher