Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

Universal Controller supports the following RESTful-based web services for Email Template operations, which are listed alphabetically on this page.

  • Create an Email Template
  • Delete an Email Template
  • List Email Template
  • Modify an Email Template
  • Read an Email Template

Formatting specifications for each web service, including details about property requirements, are provided.

Create an Email Template


Description

URI

http://host_name/uc/resources/emailtemplate

HTTP Method

POST

Description

Creates an Email Template.

Example URI

http://localhost:8080/uc/resources/emailtemplate

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example Request

See Create an Email Template Example Request, below.

Example Response

  • Status 200 /OK
    Successfully created the Email Template with sysId {sysId}.
  • Status 400 /Bad Request
    Create Email Template failed. A duplicate value has been detected. Name must be unique.

Email Template Properties

See Email Template Properties, below.

Create an Email Template: Example Request

XML Request

JSON Request

 XML Request
<emailTemplate retainSysIds="true">
    <bcc />
    <body>This is the body text.</body>
    <cc />
    <connection>QA #1</connection>
    <description />
    <opswiseGroups />
    <replyTo />
    <subject>SAP Task email</subject>
    <sysId>55b5d2a6176e4c499cbd43b0d4cc6515</sysId>
    <templateName>SAP Task email template</templateName>
    <to>doc@stonebranch.com</to>
</emailTemplate>
 JSON Request
{
    "bcc": null,
    "body": "This is the body text.",
    "cc": null,
    "connection": "QA #1",
    "description": null,
    "opswiseGroups": null,
    "replyTo": null,
    "subject": "SAP Task email",
    "sysId": "55b5d2a6176e4c499cbd43b0d4cc6515",
    "templateName": "SAP Task email template",
    "to": "doc@stonebranch.com"
}

Email Template Properties

Property

UI Field Name

Description

Specifications

Required

bcc

BCC

Email address of the party being sent a blind (hidden) copy of the email, if any.

Use commas to separate multiple recipients.

Y
(unless cc or to
is specified)

body

Body

Text of the email message.


Y

cc

CC

Email address of the party being sent a copy of the email, if any.

Use commas to separate multiple recipients.

Y
(unless bcc or to
is specified)

connection

Email Connection

Connection used for the Email Template.


Y

description

Description

Description of this record.


N

exportReleaseLevel

n/a

Universal Controller release that the record was exported from.

read onlyN

exportTable

n/aRecord table information.read onlyN

opswiseGroups

Member of Business Services

Business Services that this record belongs to.


N

replyTo

Reply-To

Email address of the sender.

Use commas to separate multiple recipients.

N

subject

Subject

Subject line of the email.


N

sysId

n/a

System ID field in the database for this Email Template record.

Persisted only if retainSysIds is set to true.

N

templateName

Template Name

Name used within the Controller to identify this resource.

Maximum = 40 alphanumerics.

Y

to

To

Email address of the recipient.

Use commas to separate multiple recipients.

Y
(unless cc or bcc
is specified)

Delete an Email Template


Description

URI

HTTP Method

DELETE

Description

Deletes an Email Template.

URI Parameters

See Delete an Email Template URI Parameters, below.

Example URI

http://localhost:8080/uc/resources/emailtemplate?templatename=Test4

Example Response

  • Status 200 /OK
    Email Template deleted successfully.
  • Status 400 /Bad Request
    Mutual exclusion violation. Cannot specify templatename and templateid at the same time.
  • Status 404 /Not Found
    An Email Template with {name/id} "test" does not exist.

Delete an Email Template: URI Parameters

Parameter

Description

Specifications

Required

Mutually Exclusive With

templateid

ID used within the Controller to identify this Email Template.

String; URI parameter.

Y
(unless templatename
is specified)

templatename

templatename

Name used within the Controller to identify this Email Template.

String; URI parameter.

Y
(unless templateid
is specified)

templateid

List Email Templates


Description

URI

HTTP Method

GET

Description

Retrieves information on all Email Templates.

Example URI

http://localhost:8080/uc/resources/emailtemplate/list

Authentication

HTTP Basic

Consumes Content-Type

n/a

Produces Content-Type

application/xml, application/json

Example Response

See List Email Templates Example Response, below.

Email Template Properties

See Email Template Properties.

List Email Templates: Example Response

XML Response

JSON Response

 XML Response
<emailTemplates>
    <emailTemplate exportReleaseLevel="7.2.0.0" exportTable="ops_email_template" version="7">
         <bcc />
         <body>This is the body text.</body>
         <cc />
         <connection>QA #1</connection>
         <description />
         <opswiseGroups />
         <replyTo />
         <subject>SAP Task email</subject>
         <sysId>55b5d2a6176e4c499cbd43b0d4cc6515</sysId>
         <templateName>SAP Task email template</templateName>
         <to>doc@stonebranch.com</to>
    </emailTemplate>
    <emailTemplate exportReleaseLevel="7.2.0.0" exportTable="ops_email_template" version="2">
         <bcc />
         <body>This is the body text.</body>
         <cc />
         <connection>QA #2</connection>
         <description />
         <opswiseGroups />
         <replyTo />
         <subject>Email Task email</subject>
         <sysId>62701879a6264107bb757a952bcc65cc</sysId>
         <templateName>Email Task email template</templateName>
         <to>doc@stonebranch.com</to>
    </emailTemplate>
<emailTemplates>
 JSON Response
[ {
    "bcc": null,
    "body": "This is the body text.",
    "cc": null,
    "connection": "QA #1",
    "description": null,
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_email_template", "opswiseGroups": null, "replyTo": null, "subject": "SAP Task email", "sysId": "55b5d2a6176e4c499cbd43b0d4cc6515", "templateName": "SAP Task email template", "to": "doc@stonebranch.com", "version": 7 } { "bcc": null, "body": "This is the body text.", "cc": null, "connection": "QA #2", "description": null,
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_email_template", "opswiseGroups": null, "replyTo": null, "subject": "Email Task email", "sysId": "62701879a6264107bb757a952bcc65cc", "templateName": "Email Task email template", "to": "doc@stonebranch.com", "version": 2 } ]

Modify an Email Template


Description

URI

HTTP Method

PUT

Description

Modifies the Email Template specified by the sysId.

Example URI

http://localhost:8080/uc/resources/emailtemplate

Consumes Content-Type

application/xml, application/json

Produces Content-Type

n/a

Example Request

See Modify an Email Template Example Request, below.

Email Template Properties

See Email Template Properties.

Example Response

  • Status 200 /OK
    Successfully updated the Email Template with sysId <sysId> to version <version>.

Modify an Email Template: Example Request

XML Request

JSON Request

 XML Request
<emailTemplate>
    <bcc />
    <body>This is the body text.</body>
    <cc />
    <connection>QA #1</connection>
    <description />
    <opswiseGroups />
    <replyTo />
    <subject>SAP Task email</subject>
    <sysId>55b5d2a6176e4c499cbd43b0d4cc6515</sysId>
    <templateName>SAP Task email template</templateName>
    <to>doc@stonebranch.com</to>
</emailTemplate>
 JSON Request
{
    "bcc": null,
    "body": "This is the body text.",
    "cc": null,
    "connection": "QA #1",
    "description": null,
    "opswiseGroups": null,
    "replyTo": null,
    "subject": "SAP Task email",
    "sysId": "55b5d2a6176e4c499cbd43b0d4cc6515",
    "templateName": "SAP Task email template",
    "to": "doc@stonebranch.com"
}

Read an Email Template

URI

http://host_name/uc/resources/emailtemplate

HTTP Method

GET

Description

Retrieves information on a specific Email Template.

URI Parameters

See Read an Email Template URI Parameters, below.

Example URI

http://localhost:8080/uc/resources/emailtemplate?templatename=Test4

Consumes Content-Type

n/a

Produces Content-Type

application/xml, application/json

Example Response

See Read an Email Template Example Response, below.

Email Template Properties

See Email Template Properties.

Read an Email Template: URI Parameters

Parameter

Description

Specifications

Required

Mutually Exclusive With

templateid

ID used within the Controller to identify this Email Template.

String; URI parameter.

Y
(unless templatename
is specified)

templatename

templatename

Name used within the Controller to identify this Email Template.

String; URI parameter.

Y
(unless templateid
is specified)

templateid

Read an Email Template: Example Response

XML Response

JSON Response

 XML Response
<emailTemplate exportReleaseLevel="7.2.0.0" exportTable="ops_email_template" retainSysIds="true" version="1">
    <bcc />
    <body>This is the body text.</body>
    <cc />
    <connection>QA #1</connection>
    <description />
    <opswiseGroups />
    <replyTo />
    <subject>SAP Task email</subject>
    <sysId>55b5d2a6176e4c499cbd43b0d4cc6515</sysId>
    <templateName>SAP Task email template</templateName>
    <to>doc@stonebranch.com</to>
</emailTemplate>
 JSON Response
{
    "bcc": null,
    "body": "This is the body text.",
    "cc": null,
    "connection": "QA #1",
    "description": null,
"exportReleaseLevel": "7.2.0.0",
"exportTable": "ops_email_template", "opswiseGroups": null, "replyTo": null, "subject": "SAP Task email", "sysId": "55b5d2a6176e4c499cbd43b0d4cc6515", "templateName": "SAP Task email template", "to": "doc@stonebranch.com", "version": 1 }

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

  • No labels