Get Custom Attribute

API Type

REST

HTTP Method

POST

Description

Retrieves a single custom attribute.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/GetCustomAttr/[customID]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/GetCustomAttr/[customID]

Request Parameters

Name Description

customID

Definition:
A work object ID specified within a process instance.
Type
string
Allowed Values:
One valid work object ID.

Request Body Properties

Name Description

attrName

Definition:
The name of an item, such as a property or attribute in a name/value pair.
Type
string
Allowed Values:
A valid name.

JavaScript Code Example

$("#btnGetCustomAttr").click(function () {
  
  var JSONObject = { 
    attrName: "/pd:myFields/pd:orgamount"};
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/
                 GetCustomAttr/AAA82AAE37054A1AB469FB480028A7A3",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String GetCustomAttr(String customID, String attrName) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/GetCustomAttr/"
                       + customID;

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

  JSONObject postData = new JSONObject();
  try {
			postData.put("attrName", attrName);
			return ops.POSTMethod(URI, postData.toString());
  } catch (JSONException e) {
			e.printStackTrace();
  }
  return "";
}

C# Code Example

public string GetCustomAttr()
  {
    string URL = "http://mydomain:9011/AgilePointServer/Workflow/
                         GetCustomAttr/FE6F63E224174FE9BD8B30A8ADCB0434";

    string jsonRequestdata = "{
      \"attrName\":\"" + "/pd:myFields/pd:file" + "\"}";

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

    return ops.POSTMethod(URL, jsonRequestdata);
  }

Output

Custom attribute value (can be string, integer, float, double, bool, and/or DateTime).

JSON Response Body Example

"100.2"

Supported Versions

AgilePoint BPMS v5.0 R2 and higher