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}/templates/{template}
Example Request URL:
Template parameter | Value | Description |
---|---|---|
unit (Mandatory) | String | Unit code as 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 | Desription |
---|---|---|
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 | 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
<Model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" IsPackage="false" xsi:noNamespaceSchemaLocation="model.xsd">
<Model-Uri>http://dev-01.connective.local:15220/modelstore/PublishStore/PUB_dev-01/Test/Template_7.3_3.3.0</Model-Uri>
<XSD-Form-Uri/>
<LetterWritter-Uri/>
<Key>Template_7.3_3.3.0</Key>
<LanguageModel LanguageCode="en-US"/>
<Description Code="en-GB">Template 7.3</Description>
<Description Code="en-GB">Template 7.3</Description>
<Categories/>
<SearchKeys/>
<MetaData>
<LGM-Uri>http://localhost:15220/modelstore/ModelStore/Contoso/Test/Template_7.3_3.3.0.lgm</LGM-Uri>
<LGM-Version>1.1</LGM-Version>
<LGM-CheckedIn-UserID>usertest1</LGM-CheckedIn-UserID>
<Published-UserID>usertest1</Published-UserID>
<LSClient-Version>5.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>
</Model>