List Templates
Gets the list of published templates available in the specified unit. For each available template the model.xml is looked up and appended to a large XML GET /connectr/api/units/{unitId}/templates
Example Request URL: http://connectr.example.org:8080/connectr/api/units/4.1/templates?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. |
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, templates list in response. See appendix “XML Schema for Template List / Details”, this call returns the “Models” element. |
400 Bad request | text/plain | Path is too short or contains illegal characters. |
404 Not found | text/plain | The unit could not be found. |
Response example
<Models StageName="PUB_dev-01" UnitName="Test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="model.xsd">
<Model IsPackage="false">
<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>
<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>
</Model>
<Model IsPackage="false">
<Model-Uri>http://dev-01.connective.local:15220/modelstore/PublishStore/PUB_dev-01/Test/Template_7.3_3.2.12</Model-Uri>
<XSD-Form-Uri/>
<LetterWritter-Uri/>
<Key>Template_7.3_3.2.12</Key>
<LanguageModel LanguageCode="en-GB"/>
<LanguageModel LanguageCode="nl-BE"/>
<LanguageModel LanguageCode="fr-BE"/>
<Description Code="en-GB">Template 7.3 US</Description>
<Categories/>
<SearchKeys/>
<MetaData>
<LGM-Uri>http://localhost:15220/modelstore/ModelStore/Contoso/Test/Template_7.3_3.2.12.lgm</LGM-Uri>
<LGM-Version>1.3</LGM-Version>
<LGM-CheckedIn-UserID>usertest1</LGM-CheckedIn-UserID>
<Published-UserID>usertest1</Published-UserID>
<LSClient-Version>5.0.0</LSClient-Version>
</MetaData>
</Model>
</Models>