| Methods / Methods for Custom Attributes | |
REST
POST
Sets names and values for multiple custom attributes for a specified custom ID.
https://[domain]:[port]/AgilePointServer/Workflow/SetCustomAttrs/[customID]
https://[domain]:[port]/AgilePointService/Workflow/SetCustomAttrs/[customID]
| Name | Description |
|---|---|
customID |
|
| Name | Description |
|---|---|
attributes |
|
$("#btnSetCustomAttrs").click(function () {
var JSONObject = {
attributes: [{ Name: "test1", Value: "test123" },
{ Name: "test2", Value: "test1234"}]
};
$.ajax({
url: "https://mydomain:9011/AgilePointServer/Workflow/
SetCustomAttrs/C09EA09523C84E458A09E4101FCE6E1F",
data: JSON.stringify(JSONObject)
});
});
public String SetCustomAttrs(String customID,
String[] Name, String[] Value) {
String URI = "http://mydomain:9011/AgilePointServer/Workflow/SetCustomAttrs/"
+ customID;
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
JSONObject postMainObject = new JSONObject();
JSONArray postArray = new JSONArray();
try {
for (int i = 0; i < Name.length; i++) {
JSONObject postData = new JSONObject();
postData.put("Name", Name[i]);
postData.put("Value", Value[i]);
postArray.put(postData);
}
postMainObject.put("attributes", postArray);
return ops.POSTMethod(URI, postMainObject.toString());
} catch (JSONException e1) {
e1.printStackTrace();
}
return "";
}
public string btnSetCustomAttrs()
{
string URL = "http://mydomain:9011/AgilePointServer/Workflow/
SetCustomAttrs/FE6F63E224174FE9BD8B30A8ADCB0434";
string jsonRequestData = "{
\"attributes\":[ {\"Name\":\"test1\",
\"Value\":\"test123\"},
{\"Name\":\"test2\",
\"Value\":\"test1234\"}]}";
HTTPOperations ops = new HTTPOperations(domain, this.userName,
password, appID, locale);
return ops.POSTMethod(URL,jsonRequestData);
}
None.
The response body is empty.
AgilePoint BPMS v5.0 R2 and higher