Email Template Details
Gets the details of the specified template file (basically the model.xml as seen in the Publish Store) and inlines the XSD of that template.
GET /connectr/api/units/{unit}/emailtemplates/{template}
Example Request URL: http://connectr.example.org:8080/connectr/api/units/4.1/emailtemplates/Template_7.3_3.3.0?path=/Publish/Contoso/HR
Template parameter | Value | Description |
---|---|---|
unit (Mandatory) | String | Unit code as used in Data Manager. This is currently defined in the Publish Store settings. |
template (Mandatory) | String | Template name as seen in the Key field of the Template List XML. |
Query parameter | Value | Description |
---|---|---|
path (Mandatory) | String | Relative path of a Unit in the Publish Store. Use Sketch’s “Properties” view to find the “location” property, then use everything after the first /modelstore/ part of that field. Might be optional in the future. Example: /Publish/Contoso/HR |
Response status code | Content type | Description |
---|---|---|
200 OK | application/xml | Request completed successfully, template details in response. See appendix “XML Schema for Template List / Details”, this resource returns the “Model” element. |
400 Bad request | text/plain | Path is too short or contains illegal characters. |
404 Not found | text/plain | The unit or template could not be found. |
Response example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EmailModel IsPackage="false">
<Email-Model-Uri> http://dev-01.connective.local:15220/modelstore/PublishStore/PUB_dev-01/Test/Template_7.3_3.2.12</Email-Model-Uri>
<XSD-Form-Uri></XSD-Form-Uri>
<Key>Template_7.3_3.2.12</Key>
<LanguageEmailModel LanguageCode="nl-BE"/>
<Description Code="en-US">Template_7.3_3.2.12</Description>
<Categories/>
<SearchKeys/>
<MetaData>
<CEM-Uri> http://localhost:15220/modelstore/ModelStore/Contoso/Test/Template_7.3_3.2.12.cem</CEM-Uri>
<CEM-Version>1.2</CEM-Version>
<CEM-CheckedIn-UserID>usertest1</CEM-CheckedIn-UserID>
<Published-UserID>usertest1</Published-UserID>
<Published-Comment></Published-Comment>
<LSClient-Version>6.0.0</LSClient-Version>
</MetaData>
<XSD-Name>TestSketch.xsd</XSD-Name>
<XSD-Contents>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Connective" type="TP_Connective">
<xs:annotation/>
</xs:element>
<xs:complexType name="TP_Connective">
<xs:all>
<xs:element minOccurs="0" name="L_Datablock_A" type="TP_L_Datablock_A">
</xs:element>
<xs:element minOccurs="1" name="Datablock_B" type="TP_Datablock_B">
</xs:element>
</xs:all>
</xs:complexType>
<xs:complexType name="TP_L_Datablock_A">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Repeating_DB_A" type="xs:string">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TP_Datablock_B">
<xs:all>
<xs:element minOccurs="1" name="StringField" type="xs:string"/>
<xs:element minOccurs="1" name="DateTimeField" type="xs:dateTime"/>
<xs:element minOccurs="1" name="DateField" type="xs:date"/>
<xs:element minOccurs="1" name="NumberField1" type="xs:decimal"/>
<xs:element minOccurs="1" name="NumberField2" type="xs:decimal"/>
<xs:element minOccurs="1" name="NumberField3" type="xs:decimal"/>
<xs:element minOccurs="1" name="NumberField4" type="xs:decimal"/>
<xs:element minOccurs="1" name="BooleanField1" type="xs:boolean"/>
<xs:element minOccurs="1" name="BooleanField2" type="xs:boolean"/>
<xs:element minOccurs="1" name="IntegerField" type="xs:int"/>
<xs:element minOccurs="1" name="DoubleField" type="xs:double"/>
</xs:all>
</xs:complexType>
</xs:schema>
</XSD-Contents>
</EmailModel>