|
1 | | -# collection-search |
2 | | -WIP - Collection Search for STAC APIs |
| 1 | +# STAC API - Collection Search |
| 2 | + |
| 3 | +- **OpenAPI specification:** [openapi.yaml](openapi.yaml) (todo) |
| 4 | +- **Conformance URIs:** |
| 5 | + - <https://api.stacspec.org/v1.0.0-rc.1/collection-search> |
| 6 | + - <https://api.stacspec.org/v1.0.0-rc.1/core> |
| 7 | +- **[Maturity Classification](../README.md#maturity-classification):** Proposal |
| 8 | +- **Dependencies**: |
| 9 | +- [STAC API - Collections](https://github.com/radiantearth/stac-api-spec/tree/main/ogcapi-features) |
| 10 | +- [STAC API - Core](https://github.com/radiantearth/stac-api-spec/blob/main/core) |
| 11 | + |
| 12 | +A search endpoint provides the ability to query |
| 13 | +STAC [Collections](https://github.com/radiantearth/stac-spec/blob/master/collection-spec/README.md) |
| 14 | +objects across collections. |
| 15 | +It retrieves a group of Collection objects that match the provided parameters and provides them as |
| 16 | +the `GET /collections` endpoint does. |
| 17 | + |
| 18 | +The Item Search endpoint intentionally defines only a limited group of operations. It is expected that |
| 19 | +most behavior will be defined in [Extensions](#extensions). These extensions can be composed by an implementer to |
| 20 | +cover only the set of functionality the implementer requires. |
| 21 | + |
| 22 | +Implementing `GET /search/collections` is **required**, `POST /search/collections` is optional, but recommended. |
| 23 | + |
| 24 | +## Link Relations |
| 25 | + |
| 26 | +This conformance class also requires implementation of the link relations in the STAC API - Core conformance class. |
| 27 | + |
| 28 | +The following Link relations must exist in the Landing Page (root). |
| 29 | + |
| 30 | +| **rel** | **href** | **Description** | |
| 31 | +| ------------------- | --------------------- | --------------------------- | |
| 32 | +| `collection-search` | `/search/collections` | URI for the Search endpoint | |
| 33 | + |
| 34 | +This `collection-search` link relation must have a `type` of `application/json`. If no `method` attribute is |
| 35 | +specified, it is assumed to represent a GET request. If the server supports both GET and POST requests, two links should be included, one with a `method` of `GET` one with a `method` of `POST`. |
| 36 | + |
| 37 | +Other links with relation `collection-search` may be included that advertise other content types the server may respond |
| 38 | +with, but these other types are not part of the STAC API requirements. |
| 39 | + |
| 40 | +## Query Parameters and Fields |
| 41 | + |
| 42 | +### Basics |
| 43 | + |
| 44 | +A basic set of query parameters can be implemented based on |
| 45 | +[OGC API - Commons - Part 2](https://portal.ogc.org/files/99149#rc-simple-query-section): |
| 46 | +- `bbox` |
| 47 | +- `datetime` |
| 48 | +- `limit` |
| 49 | + |
| 50 | +Conformance classes: |
| 51 | +- `http://www.opengis.net/spec/ogcapi-common-2/1.0/req/simple-query` |
| 52 | +- `https://api.stacspec.org/v1.0.0-rc.1/collection-search#simple` |
| 53 | + |
| 54 | +These are basically the same as defined by OGC API - Features for Items. |
| 55 | + |
| 56 | +### Query (STACQL) |
| 57 | + |
| 58 | +The query extension for STACQL support can be implemented, too. It works as it does for Items. |
| 59 | +See <https://github.com/stac-api-extensions/query> for details. |
| 60 | + |
| 61 | +Conformance class: `https://api.stacspec.org/v1.0.0-rc.1/collection-search#query` |
| 62 | + |
| 63 | +### Filter (CQL) |
| 64 | + |
| 65 | +The filter extension for CQL support can be implemented, too. It works as it does for Items. |
| 66 | +See <https://github.com/stac-api-extensions/filter> for details. |
| 67 | + |
| 68 | +Conformance class: `https://api.stacspec.org/v1.0.0-rc.1/collection-search#filter` |
| 69 | + |
| 70 | +### Pagination |
| 71 | + |
| 72 | +Pagination works for Collections exactly as it works for Items. |
| 73 | + |
| 74 | +Conformance class: None |
| 75 | + |
| 76 | +### Sorting |
| 77 | + |
| 78 | +The sort extension can be implemented, too. It works as it does for Items. |
| 79 | +See <https://github.com/stac-api-extensions/sort> for details. |
| 80 | + |
| 81 | +Conformance class: `https://api.stacspec.org/v1.0.0-rc.1/collection-search#sort` |
| 82 | + |
| 83 | +### Fields |
| 84 | + |
| 85 | +The fields extension can be implemented, too. It works as it does for Items. |
| 86 | +See <https://github.com/stac-api-extensions/fields> for details. |
| 87 | + |
| 88 | +Conformance class: `https://api.stacspec.org/v1.0.0-rc.1/collection-search#fields` |
| 89 | + |
| 90 | +### Context |
| 91 | + |
| 92 | +The context extension can be implemented, too. It works as it does for Items. |
| 93 | +See <https://github.com/stac-api-extensions/context> for details. |
| 94 | + |
| 95 | +Conformance class: `https://api.stacspec.org/v1.0.0-rc.1/collection-search#context` |
| 96 | + |
| 97 | +These extensions provide additional functionality that enhances Item Search. |
0 commit comments