diff --git a/docs/source/data-publishing/ogcapi-features.rst b/docs/source/data-publishing/ogcapi-features.rst index 832f12b..4dba61a 100644 --- a/docs/source/data-publishing/ogcapi-features.rst +++ b/docs/source/data-publishing/ogcapi-features.rst @@ -378,4 +378,8 @@ Data access examples ``.../items`` queries which return an alternative representation to GeoJSON (which prompt a download) will have the response filename matching the collection name and appropriate file extension (e.g. ``my-dataset.csv``) +.. note:: + provider `id_field` values support slashes (i.e. ``my/cool/identifier``). The client request would then + be responsible for encoding the identifier accordingly (i.e. ``http://localhost:5000/collections/foo/items/my%2Fcool%2Fidentifier``) + .. _`OGC API - Features`: https://www.ogc.org/standards/ogcapi-features diff --git a/docs/source/data-publishing/ogcapi-records.rst b/docs/source/data-publishing/ogcapi-records.rst index 9f059f9..caf134c 100644 --- a/docs/source/data-publishing/ogcapi-records.rst +++ b/docs/source/data-publishing/ogcapi-records.rst @@ -96,5 +96,9 @@ Metadata search examples * fetch a specific record * http://localhost:5000/collections/my-metadata/items/123 +.. note:: + provider `id_field` values support slashes (i.e. ``my/cool/identifier``). The client request would then + be responsible for encoding the identifier accordingly (i.e. ``http://localhost:5000/collections/my-metadata/items/my%2Fcool%2Fidentifier``) + .. _`OGC API - Records`: https://www.ogc.org/standards/ogcapi-records .. _`OGC API - Records GeoJSON Features`: https://raw.githubusercontent.com/opengeospatial/ogcapi-records/master/core/openapi/schemas/recordGeoJSON.yaml diff --git a/pygeoapi/flask_app.py b/pygeoapi/flask_app.py index 7eebf3b..e1edecd 100644 --- a/pygeoapi/flask_app.py +++ b/pygeoapi/flask_app.py @@ -180,7 +180,7 @@ def collection_queryables(collection_id=None): @BLUEPRINT.route('/collections//items', methods=['GET', 'POST']) -@BLUEPRINT.route('/collections//items/', +@BLUEPRINT.route('/collections//items/', methods=['GET', 'PUT', 'DELETE']) def collection_items(collection_id, item_id=None): """ diff --git a/pygeoapi/starlette_app.py b/pygeoapi/starlette_app.py index 8bada0b..e93f1fe 100644 --- a/pygeoapi/starlette_app.py +++ b/pygeoapi/starlette_app.py @@ -244,9 +244,9 @@ async def get_collection_items_tiles(request: Request, collection_id=None, @app.route('/collections/{collection_id:path}/items', methods=['GET', 'POST']) @app.route('/collections/{collection_id:path}/items/', methods=['GET', 'POST']) -@app.route('/collections/{collection_id:path}/items/{item_id}', +@app.route('/collections/{collection_id:path}/items/{item_id:path}', methods=['GET', 'PUT', 'DELETE']) -@app.route('/collections/{collection_id:path}/items/{item_id}/', +@app.route('/collections/{collection_id:path}/items/{item_id:path}/', methods=['GET', 'PUT', 'DELETE']) async def collection_items(request: Request, collection_id=None, item_id=None): """