Get All EMail Templates

API Type

REST

HTTP Method

GET

Description

Retrieves all the global email templates from the server.

URL Format (On Premises)

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

URL Format (AgilePoint for Azure)

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

Request Parameters

Name Description
None Not Applicable

JavaScript Code Example

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

Java Code Example

public String GetAllEMailTemplates(String processInstanceID) {

  String URI = "http://mydomain:9011/AgilePointServer/Workflow/GetMailDeliverables/"
                       + processInstanceID;

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

  return ops.GETMethod(URI);
}

C# Code Example

public string GetAllEMailTemplates()
  {
    string URI = "http://mydomain:9011/AgilePointServer/Admin/GetAllEMailTemplates";

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

    return ops.GetData(URI);
  }

Output

Returns an email templates.

JSON Response Body Example

{
  "GetAllEMailTemplatesResult": [{
  "Key": "7B110FA1958843E9BE0582A3CDE52513",
  "Value": "<?xml version=\"1.0\" encoding=\"utf-8\"?>
            <MailTemplates name=\"Test\" 
                              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