.. _features_templating_rest: Features Templatring Rest API ============================== Introduction ------------- The Features Templating Rest API allows performing CRUD operation over Features Templates and Template Layer Rules. Template Configuration ----------------------- ``/rest/featurestemplates`` Finds all templates in the global (``features-templating``) directory or creates a new template in the global directory. .. list-table:: :header-rows: 1 :widths: 5 20 20 20 10 10 * - Method - Consumes - Produces - Action - Supported parameters - Response * - GET - - application/xml, application/json. - List of all the templates available in the ``features-templating`` directory. - - 200. List of rules in XML or JSON. * - POST - application/xml, text/xml, application/json, text/json, application/xhtml+xml, application/zip. - text/plain. - Add the template in the request body (text or zip file) as a new Template in the ``features-templating`` directory. - templateName (mandatory when posting a raw template, optional when posting a zip file) - 201. Created ``Location`` header. ``/rest/workspaces//featurestemplates`` Finds all templates in the ``workspace`` directory or creates a new template in the ``workspace`` directory. .. list-table:: :header-rows: 1 :widths: 5 20 20 20 10 10 * - Method - Consumes - Produces - Action - Supported parameters - Response * - GET - - application/xml, application/json. - List of all the templates available in the ``workspace`` directory - - 200. List of rules in XML or JSON. * - POST - application/xml, text/xml, application/json, text/json, application/xhtml+xml, application/zip. - text/plain. - Add the template in the request body (text or zip file) as a new Template in the ``workspace`` directory. - templateName (mandatory when posting a raw template, optional when posting a zip file) - 201. Created ``Location`` header. ``/rest/workspaces//featuretypes//featurestemplates`` Finds all templates in the ``featuretype`` directory or creates a new template in the ``featuretype`` directory. .. list-table:: :header-rows: 1 :widths: 5 20 20 20 10 10 * - Method - Consumes - Produces - Action - Supported parameters - Response * - GET - - application/json, application/xml. - List of all the templates available in the ``featuretype`` directory - - 200. List of rules in XML or JSON. * - POST - application/xml, text/xml, application/json, text/json, application/xhtml+xml, application/zip. - text/plain. - Add the template in the request body (text or zip file) as a new Template in the ``Feature Type`` directory. - templateName (mandatory when posting a raw template, optional when posting a zip file) - 201. Created ``Location`` header. ``/rest/featurestemplates/