configure.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .. _ogcapi_links:
  2. Configuring the GeoServer OGC API module
  3. ========================================
  4. The OGC API modules provide additional services along side the existing Open Web Services (OWS).
  5. Service
  6. -------
  7. The OGC API modules primarily use the same configurations as their equivalent OWS services. So, for example, setting the WFS limited SRS list will also limit the SRS list for OGC API - Features.
  8. In addition, the OGC API modules will have some unique configuration options.
  9. Security
  10. --------
  11. * Data security: Data security is managed independently of web service. The same data security restrictions placed on a workspace or layer content are enforced for both OWS services and OGC API web services
  12. * Service security: OGC API web services are managed directly in :menuselection:`Security > Services` page. New access rules can be defined for OGC API services.
  13. .. figure:: img/service_rule.png
  14. Service rule for OGC API Features getLandingPage
  15. Collections
  16. -----------
  17. OGCAPI web services provides a ``collections`` resource describing the published content.
  18. As an example OGC API - Features collections lists:
  19. * **links**: Links and metadata
  20. * **collections**: List of individual collections available
  21. * **crs**: List of coordinate reference systems defined by WFS settings
  22. Custom links for the "collections" resource
  23. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  24. The ``collections`` resource can have a number of additional links, beyond
  25. the basic ones that the service code already includes. Navigate to :menuselection:``Settings > Global``. The links are configured under heading :guilabel:`OGC API Settings`.
  26. .. figure:: img/global_links.png
  27. Links used to indicate global Creative Commons license
  28. Link editor column description:
  29. * **rel**: the link relation type, as per the OGC API - Features specification
  30. * **Mime type**: the mime type for the resource found following the link
  31. * **URL**: the link URL
  32. * **Title**: the link title (optional)
  33. * **Service**: the service for which the link is valid (optional, defaults to all)
  34. Common links relationships that could be added for the ``collections`` resource are:
  35. * ``enclosure``, in case there is a package delivering all the collections (e.g. a GeoPackage, a ZIP full of shapefiles).
  36. * ``describedBy``, in case there is a document describing all the collections (e.g. a JSON or XML schema).
  37. * ``license``, if all collection data is under the same license.
  38. Example from OGC API - Features service (``http://localhost:8080/geoserver/ogc/features/v1/collections/?f=application%2Fjson``):
  39. .. code-block:: json
  40. {
  41. "href": "https://creativecommons.org/licenses/by/3.0/",
  42. "rel": "license",
  43. "type": "text/html",
  44. "title": "Creative Commons - Attribution"
  45. }
  46. Custom links for workspace collections
  47. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  48. Additional custom ``collections`` links can also be defined for an individual workspace. Navigate to :menuselection:``Workspaces > Edit Workspace``. Links are configured on the :guilabel:`Basic Info` tab.
  49. .. figure:: img/workspace_links.png
  50. Links used to indicate public domain license for ne workspace
  51. In this example the ``license`` is changed to reflect the natural earth terms of use (overriding the ``license`` defined in global settings).
  52. Example from workspace OGC API - Features service ( ``http://localhost:8080/geoserver/ne/ogc/features/v1/collections/?f=application%2Fjson``):
  53. .. code-block:: json
  54. {
  55. "href": "https://www.naturalearthdata.com/about/terms-of-use/",
  56. "rel": "license",
  57. "type": "text/html",
  58. "title": "Public Domain"
  59. }
  60. Single collection
  61. -----------------
  62. Each GeoServer layer is published is represented in OGC API as a single ``collection``.
  63. As an example OGC API - Features collections lists:
  64. * **id**: Layer name
  65. * **title**: Layer title
  66. * **description**: Layer abstract
  67. * **extent**: Layer bounds
  68. * **links**: Links to access content and metadata
  69. * **crs**
  70. * **storageCrs**
  71. Custom links for single collection
  72. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  73. Additional custom links can be provided for an individual layer. Use the Layer Editor :guilabel:``Publishing`` tab, and locate the heading for :guilabel:`OGC API`.
  74. .. figure:: img/links.png
  75. Links used to define enclosure download for ne:counteries layer
  76. The relationships are the same as for the ``collections`` resource, but used in case
  77. there is anything that is specific to the collection (e.g., the schema for the single collection).
  78. In addition, other relations can be specified, like the ``tag`` relation, to link to the eventual
  79. INSPIRE feature concept dictionary entry.
  80. Example from workspace ``ne:counteries`` collection providing enclosure for download:
  81. .. code-block:: json
  82. {
  83. "href": "https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_admin_0_countries.zip",
  84. "rel": "enclosure",
  85. "type": "application/zip",
  86. "title": "ne_10m_admin_0_countries.zip"
  87. }