Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Restore an E-mail Template to its Default

    Use this API to restore an e-mail template to its default content.

    URI

    https://[host]/api/juniper/servicenow/emailTemplate-management/emailTemplate/ {id}/restoreToDefault (HTTP method = PUT)

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    String

    Yes

    ID of the e-mail template that is to be restored to its default content

    Consumes

    None

    Produces

    • application/vnd.juniper.servicenow.emailTemplate-management.emailTemplate+xml; version=1;
    • application/vnd.juniper.servicenow.emailTemplate-management.emailTemplate+json; version=1;

    Response Elements

    Element

    Type

    Description

    uri

    String

    URI of the e-mail template

    id

    Integer

    ID of the e-mail template

    templateName

    String

    Name of the e-mail template

    description

    String

    Description of the e-mail template

    createdBy

    String

    Username of the user who created the e-mail template

    lastUpdateTime

    String

    Date and time the e-mail template was last modified

    subject

    String

    Subject of the e-mail template

    templateContents

    String

    Contents of the e-mail template

    method

    String

    Method applicable to the e-mail template

    Sample Output

    Sample XML Output

    <emailTemplate uri="/api/juniper/servicenow/emailTemplate-management/emailTemplates/ 34537/restoreToDefault">
    	<id>34537</id>
    	<tempalateName>EmailTemplateMO</tempalateName>
    	<description>This template is used by Service Now for sending email notification when a device is added or removed by a connected member.
    Email subject and body content can be modified as desired however &quot;email variables&quot; found within the body content cannot be modified.
    Email variables are preceded by a $ symbol. If desired, email variables can only be completely removed from or re-added to the template (email message).  If re-added they must match the original characters exactly.
    Following are email variables which can be added to the subject or email body:
    $hostname - Hostname of the device which is added/removed
    $ipAddress -  IP address of the device which is added/removed
    $connectedMember - Name of the connected member
    $organization - Name of the Partner Proxy Organization
    $product - Product of the device of the device which is added/removed
    $serialNumber - Serial Number of the device of the device which is added/removed
    $version - Software version of the device of the device which is added/removed
    $state - Represents whether device is added or removed
    IMPORTANT:  Email variables cannot be modified- only deleted or re-added. Email variables not shown in the original template cannot be added.
    </description>
    		<createdBy>Service Now</createdBy>
    		<lastUpdateTime>2014-12-21 07:53:17 IST</lastUpdateTime>
    		<subject>Connected member device $state</subject>
    		<templateContents>
    			$triggerName
    			Hostname: $hostname
    			IP Adress: $ipAddress
    			State: $state
    			Product: $product
    			Serial Number: $serialNumber
    			Version: $version
    			Organization: $organization
    			Connected Member: $connectedMember
    		</templateContents>
    <method href="/api/juniper/servicenow/emailTemplate-management/emailTemplates/ 34537/modifyEmailTemplate"/>
    <method href="/api/juniper/servicenow/emailTemplate-management/emailTemplates/ 34537/restoreToDefault"/>
    </emailTemplate>
    

    Sample JSON Output

    {
      "emailTemplate": {
        "@uri": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/ 34537/restoreToDefault",
        "id": 34537,
        "tempalateName": "EmailTemplateMO",
        "description": "This template is used by Service Now for sending email notification when a device is added or removed by a connected member.\nEmail subject and body content can be modified as desired however \"email variables\" found within the body content cannot be modified.\nEmail variables are preceded by a $ symbol. If desired, email variables can only be completely removed from or re-added to the template (email message).  If re-added they must match the original characters exactly.\nFollowing are email variables which can be added to the subject or email body:\n$hostname - Hostname of the device which is added/removed\n$ipAddress -  IP address of the device which is added/removed\n$connectedMember - Name of the connected member\n$organization - Name of the Partner Proxy Organization\n$product - Product of the device of the device which is added/removed\n$serialNumber - Serial Number of the device of the device which is added/removed\n$version - Software version of the device of the device which is added/removed\n$state - Represents whether device is added or removed\n\nIMPORTANT:  Email variables cannot be modified- only deleted or re-added. Email variables not shown in the original template cannot be added.\n        ",
        "createdBy": "Service Now",
        "lastUpdateTime": "2014-12-21 07:53:17 IST",
        "subject": "Connected member device $state",
        "templateContents": "$triggerName\n\nHostname: $hostname\n\nIP Adress: $ipAddress\n\nState: $state\n\nProduct: $product\n\nSerial Number: $serialNumber\n\nVersion: $version\n\nOrganization: $organization\n\nConnected Member: $connectedMember\n\n\n",
        "method": [
          {
            "@href": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34537 /modifyEmailTemplate"
          },
          {
            "@href": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34537 /restoreToDefault"
          }
        ]
      }
    }
    

    Modified: 2016-08-11