diff --git a/CHANGES.md b/CHANGES.md index 530a0119..8cf47f6d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Added + +* Add base support for the Aggregation extension [#684](https://github.com/stac-utils/stac-fastapi/pull/684) + ## [3.0.0a0] - 2024-05-06 ### Added diff --git a/stac_fastapi/extensions/stac_fastapi/extensions/core/aggregation/aggregation.py b/stac_fastapi/extensions/stac_fastapi/extensions/core/aggregation/aggregation.py index 053ef2b5..8bead67d 100644 --- a/stac_fastapi/extensions/stac_fastapi/extensions/core/aggregation/aggregation.py +++ b/stac_fastapi/extensions/stac_fastapi/extensions/core/aggregation/aggregation.py @@ -71,25 +71,25 @@ def register(self, app: FastAPI) -> None: self.router.add_api_route( name="Aggregations", path="/aggregations", - methods=["GET"], + methods=["GET", "POST"], endpoint=create_async_endpoint(self.client.get_aggregations, EmptyRequest), ) self.router.add_api_route( name="Collection Aggregations", path="/collections/{collection_id}/aggregations", - methods=["GET"], + methods=["GET", "POST"], endpoint=create_async_endpoint(self.client.get_aggregations, CollectionUri), ) self.router.add_api_route( name="Aggregate", path="/aggregate", - methods=["GET"], + methods=["GET", "POST"], endpoint=create_async_endpoint(self.client.aggregate, self.GET), ) self.router.add_api_route( name="Collection Aggregate", path="/collections/{collection_id}/aggregate", - methods=["GET"], + methods=["GET", "POST"], endpoint=create_async_endpoint(self.client.aggregate, self.GET), ) app.include_router(self.router, tags=["Aggregation Extension"]) diff --git a/stac_fastapi/types/stac_fastapi/types/core.py b/stac_fastapi/types/stac_fastapi/types/core.py index ddaafb6b..86712248 100644 --- a/stac_fastapi/types/stac_fastapi/types/core.py +++ b/stac_fastapi/types/stac_fastapi/types/core.py @@ -402,7 +402,7 @@ def landing_page(self, **kwargs) -> stac.LandingPage: "method": "GET", }, { - "rel": "aggregation", + "rel": "aggregations", "type": "application/json", "title": "Aggregations", "href": urljoin(base_url, "aggregations"),