templates.rst 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. .. _rest_api_templates:
  2. Freemarker templates
  3. ====================
  4. `Freemarker <http://freemarker.sourceforge.net/>`_ is a simple yet powerful template engine that GeoServer uses for user customization of outputs.
  5. It is possible to use the GeoServer REST API to manage Freemarker templates for catalog resources.
  6. ``/templates/<template>.ftl``
  7. -----------------------------
  8. This endpoint manages a template that is global to the entire catalog.
  9. .. list-table::
  10. :header-rows: 1
  11. * - Method
  12. - Action
  13. - Status Code
  14. - Formats
  15. - Default Format
  16. * - GET
  17. - Return a template
  18. - 200
  19. -
  20. -
  21. * - PUT
  22. - Insert or update a template
  23. - 405
  24. -
  25. -
  26. * - DELETE
  27. - Delete a template
  28. - 405
  29. -
  30. -
  31. Identical operations apply to the following endpoints:
  32. * Workspace templates—``/workspaces/<ws>/templates/<template>.ftl``
  33. * Vector store templates—``/workspaces/<ws>/datastores/<ds>/templates/<template>.ftl``
  34. * Feature type templates—``/workspaces/<ws>/datastores/<ds>/featuretypes/<f>/templates/<template>.ftl``
  35. * Raster store templates—``/workspaces/<ws>/coveragestores/<cs>/templates/<template>.ftl``
  36. * Coverage templates—``/workspaces/<ws>/coveragestores/<cs>/coverages/<c>/templates/<template>.ftl``
  37. ``/templates[.<format>]``
  38. -------------------------
  39. This endpoint manages all global templates.
  40. .. list-table::
  41. :header-rows: 1
  42. * - Method
  43. - Action
  44. - Status Code
  45. - Formats
  46. - Default Format
  47. * - GET
  48. - Return templates
  49. - 200
  50. - HTML, XML, JSON
  51. - HTML
  52. Identical operations apply to the following endpoints:
  53. * Workspace templates—``/workspaces/<ws>/templates[.<format>]``
  54. * Vector store templates—``/workspaces/<ws>/datastores/<ds>/templates[.<format>]``
  55. * Feature type templates—``/workspaces/<ws>/datastores/<ds>/featuretypes/<f>/templates[.<format>]``
  56. * Raster store templates—``/workspaces/<ws>/coveragestores/<cs>/templates[.<format>]``
  57. * Coverage templates—``/workspaces/<ws>/coveragestores/<cs>/coverages/<c>/templates[.<format>]``