Add Email Template

API Type

REST

HTTP Method

POST

Description

Adds an email template to the AgilePoint system.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

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

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

TemplateOwnerID

Definition:
The ID for a process template owner.
Type
string
Allowed Values:
A valid process template owner ID.

MailTemplateXML

Definition:
The XML for an email template.
Type
string
Allowed Values:
Valid XML that represents an email template.

JavaScript Code Example

$("#btnAddEMailTemplate").click(function () {
  var JSONObject = {
    TemplateOwnerID: null,
    MailTemplateXML: "< email template xml data>"
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/AddEMailTemplate",
    data: JSON.stringify(JSONObject)
  });
});

Java Code Example

public String AddEMailTemplate(String TemplateOwnerID,
  String MailTemplateXML) {

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

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

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

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

Output

The ID of the new email template.

JSON Response Body Example

"B460E2AF110E42ED97CE13CBFF42AB7B"

Supported Versions

AgilePoint BPMS v5.0 R2 and higher