Get EMail Template

API Type

REST

HTTP Method

GET

Description

Retrieves an email templates with the specified template name from the server.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Admin/GetEMailTemplate/[mailTemplateID]

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Admin/GetEMailTemplate/[mailTemplateID]

Request Parameters

Name Description

mailTemplateID

Definition:
The unique ID for an email template.
Type
string
Allowed Values:
A valid mail template ID.

JavaScript Code Example

$("#btnGetEMailTemplate").click(function () {
  
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/
                GetEMailTemplate/B460E2AF110E42ED97CE13CBFF42AB7B",
    type: "GET"
  });
  
});

Java Code Example

public String GetEMailTemplate(String mailTemplateID) {

  String URI = "http://mydomain:9011/AgilePointServer/Admin/GetEMailTemplate/"
                       + mailTemplateID;

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

  return ops.GETMethod(URI);
}

C# Code Example

public string GetEMailTemplate()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Admin/
                         GetEMailTemplate/bddac11d-c79e-4ca4-a09c-70b2abd3";

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

    return ops.GetData(URI);
  }

Output

Returns an email templates.

JSON Response Body Example

{
  "GetEMailTemplateResult": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
                             <MailTemplates name=\"TestNew\" 
                                               format=\"Default\" 
                                               leftToRight=\"true\" 
                                               mailPriority=\"High\">
                               <From>
                                 <![CDATA[brian.lucas@mycompany.com]]>
                               <\/From>
                               <To>
                                 <![CDATA[lilly.allen@mycompany.com]]>
                               <\/To>
                               <Subject>
                                 <![CDATA[testSubject]]>
                               <\/Subject>
                               <Content>
                                 <![CDATA[testBody]]>
                               <\/Content>
                               <Attachments>
                                 <![CDATA[]]>
                               <\/Attachments>
                             <\/MailTemplates>"
}

Supported Versions

AgilePoint BPMS v5.0 R2 and higher