.. _rest_api_templates:
Freemarker templates
====================
`Freemarker `_ is a simple yet powerful template engine that GeoServer emplys for user customization of outputs.
It is possible to use the GeoServer REST API to manage Freemarker templates for catalog resources.
``/templates/.ftl``
-----------------------------
This endpoint manages a template that is global to the entire catalog.
.. list-table::
:header-rows: 1
* - Method
- Action
- Status Code
- Formats
- Default Format
* - GET
- Return a template
- 200
-
-
* - PUT
- Insert or update a template
- 405
-
-
* - DELETE
- Delete a template
- 405
-
-
Identical operations apply to the following endpoints:
* Workspace templates—``/workspaces//templates/.ftl``
* Vector store templates—``/workspaces//datastores//templates/.ftl``
* Feature type templates—``/workspaces//datastores//featuretypes//templates/.ftl``
* Raster store templates—``/workspaces//coveragestores//templates/.ftl``
* Coverage templates—``/workspaces//coveragestores//coverages//templates/.ftl``
``/templates[.]``
-------------------------
This endpoint manages all global templates.
.. list-table::
:header-rows: 1
* - Method
- Action
- Status Code
- Formats
- Default Format
* - GET
- Return templates
- 200
- HTML, XML, JSON
- HTML
Identical operations apply to the following endpoints:
* Workspace templates—``/workspaces//templates[.]``
* Vector store templates—``/workspaces//datastores//templates[.]``
* Feature type templates—``/workspaces//datastores//featuretypes//templates[.]``
* Raster store templates—``/workspaces//coveragestores//templates[.]``
* Coverage templates—``/workspaces//coveragestores//coverages//templates[.]``