Get Custom Attributes By IDs

API Type

REST

HTTP Method

POST

Description

Gets all the custom attributes with the specified array of custom ids.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Workflow/GetCustomAttrsbyIDs

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Workflow/GetCustomAttrsbyIDs

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

customIDs

Definition:
Multiple work object IDs specified within a process instance.
Type
string
Allowed Values:
An array of valid work object IDs.

JavaScript Code Example

$("#btnGetCustomAttrsbyIDs").click(function () {

  var JSONObject = {
    customIDs : "0080D881497C47C19B32BD45967E8ABA;
                 0C98EAF88D1F4F6A8E5E3B1C9A25D8D7;
                 351BC22E020D439AB724123ACB76FCDA"          
  };
  
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/GetCustomAttrsbyIDs",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String GetCustomAttrsbyIDs(String customIDs) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/GetCustomAttrsbyIDs";

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

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

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

Output

Array of KeyValue. Key is customIDs and Value is XML serialized WFCustomAttributes.

JSON Response Body Example

[{
  "Key":"0080D881497C47C19B32BD45967E8ABA",
  "Value":"<?xml version=\"1.0\" encoding=\"utf-8\"?>
    <ArrayOfNameValue xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance
                                    \"xmlns:xsd=\"http:\/\/www.w3.org\/2001
                                    \/XMLSchema">
      <NameValue>
        <Name>Test<\/Name>
        <Value xsi:type=\"xsd:string\">Global Custom Attr<\/Value>
      <\/NameValue>
      <NameValue>
        <Name>URL<\/Name>
        <Value xsi:type=\"xsd:string\">localhost:8888<\/Value>
      <\/NameValue>
    <\/ArrayOfNameValue>"
  },
  {
  "Key":"0C98EAF88D1F4F6A8E5E3B1C9A25D8D7",
  "Value":"<?xml version=\"1.0\" encoding=\"utf-8\"?>
    <ArrayOfNameValue xmlns:xsi=\"http:\/\/www.w3.org/2001/XMLSchema-instance
                                    \"xmlns:xsd=\"http://www.w3.org/2001
                                    /XMLSchema\">
      <NameValue>
        <Name>Test<\/Name>
        <Value xsi:type=\"xsd:string\">Process Attr<\/Value>
      <\/NameValue>
      <NameValue>
        <Name>URL<\/Name>
        <Value xsi:type=\"xsd:string\">localhost:7777<\/Value>
      <\/NameValue>
    <\/ArrayOfNameValue>"
  }
  {
  "Key":"351BC22E020D439AB724123ACB76FCDA",
  "Value":"<?xml version=\"1.0\" encoding=\"utf-8\"?>
    <ArrayOfNameValue xmlns:xsi=\"http:\/\/www.w3.org/2001/XMLSchema-instance
                                    \"xmlns:xsd=\"http://www.w3.org/2001
                                    /XMLSchema\">
      <NameValue>
        <Name>Test<\/Name>
        <Value xsi:type=\"xsd:string\">Global Custom Attr<\/Value>
      <\/NameValue>
      <NameValue>
        <Name>URL<\/Name>
        <Value xsi:type=\"xsd:string\">localhost:666<\/Value>
      <\/NameValue>
    <\/ArrayOfNameValue>"
}]

Supported Versions

AgilePoint BPMS v5.0 R2 and higher