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

    Get Details of an Email Template

    Use this API to retrieve details of an e-mail template.

    URI

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

    URI Parameters

    Parameter

    Type

    Required

    Description

    id

    Integer

    Yes

    ID of the e-mail template whose details are to be retireved

    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

    tempalateName

    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

    templateVariables

    String

    Variables in 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/34198">
    <id>34198</id>
    <tempalateName>New Incident Detected</tempalateName>
    <description>
    This template is used by Service Now for sending email notification when a new incident is received from Service Now Device. Email subject and body content can be modified as desired however "email variables" 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: $priority - Incident priority $severity - Incident severity $hostname - Hostname of the device on which the incident occurred $incidentId - Unique key to identify the incident $organization - Name of the Organization $connectedMemberLabel - Connected member field name, appears only if Service Now has a connected member. $connectedMember - Name of the connected member $synopsis - Brief description of the incident $kBArticle - Hyperlink pointing to the knowledge base system of Juniper $description - Detail description of the incident and why it occurred $product - Product of the device on which the incident occurred $serialNumber - Serial Number of the device on which the incident occurred $version - Software version of the device on which the incident occurred $incident - Hyperlink to the Incident ILP page of Service Now $impactedDevices - List of impacted device(appears only if the list is not empty) IMPORTANT: Email variables cannot be modified- only deleted or re-added. Email variables not shown in the original template cannot be added.
    </description>
    <createdBy>super</createdBy>
    <lastUpdateTime>2016-08-10 10:52:51 UTC</lastUpdateTime>
    <subject>Service Now: New Incident Detected</subject>
    
    <templateContents>
    $triggerName Priority: $priority Incident ID: $incidentId Organization: $organization $connectedMemberLabel $connectedMember Synopsis: $synopsis KB Article: $kbArticle Description: $description Product: $product Serial Number: $serialNum Version: $version Incident: $incident Id: $ObjectId $impactedDevices 
    </templateContents>
    <method href= "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34198/modifyEmailTemplate" />
    <method href= "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34198/restoreToDefault" />
    </emailTemplate>
    

    Sample JSON Output

    {
      "emailTemplate": {
        "@uri": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34198",
        "id": 34198,
        "tempalateName": "New Incident Detected",
        "description": "This template is used by Service Now for sending email notification when a new incident is received from Service Now Device.\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$priority - Incident priority\n$severity - Incident severity\n$hostname - Hostname of the device on which the incident occurred\n$incidentId -  Unique key to identify the incident\n$organization - Name of the Organization\n$connectedMemberLabel - Connected member field name, appears only if Service Now has a connected member.\n$connectedMember - Name of the connected member\n$synopsis - Brief description of the incident\n$kBArticle - Hyperlink pointing to the knowledge base system of Juniper\n$description - Detail description of the incident and why it occurred\n$product - Product of the device on which the incident occurred\n$serialNumber - Serial Number of the device on which the incident occurred\n$version - Software version of the device on which the incident occurred\n$incident - Hyperlink to the Incident ILP page of Service Now\n$impactedDevices - List of impacted device(appears only if the list is not empty)\n\nIMPORTANT:  Email variables cannot be modified- only deleted or re-added. Email variables not shown in the original template cannot be added.",
        "createdBy": "super",
        "lastUpdateTime": "2016-08-10 10:52:51 UTC",
        "subject": "Service Now: New Incident Detected",
        "templateContents": "$triggerName\n\nPriority: $priority\n\nIncident ID: $incidentId\n\nOrganization: $organization\n\n$connectedMemberLabel $connectedMember\n\nSynopsis: $synopsis\n\nKB Article: $kbArticle\n\nDescription: $description\n\nProduct: $product\n\nSerial Number: $serialNum\n\nVersion: $version\n\nIncident: $incident\n\nId: $ObjectId\n\n$impactedDevices\n        ",
        "method": [
          {
            "@href": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34198/modifyEmailTemplate"
          },
          {
            "@href": "/api/juniper/servicenow/emailTemplate-management/emailTemplates/34198/restoreToDefault"
          }
        ]
      }
    }
    

    Modified: 2016-08-10