Skip to content

add link relation table to each conformance class #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# STAC API - Core Specification

- [STAC API - Core Specification](#stac-api---core-specification)
- [Recommended Link Relations at `/`](#recommended-link-relations-at-)
- [Link Relations](#link-relations)
- [Example Landing Page for STAC API - Core](#example-landing-page-for-stac-api---core)

- **OpenAPI specification:** [openapi.yaml](openapi.yaml) describes the core endpoints ([rendered version](https://api.stacspec.org/v1.0.0-beta.2/core)),
Expand Down Expand Up @@ -45,21 +45,27 @@ The root endpoint (`/`) is most useful when it presents a complete `Catalog` rep
that all `Collection` and `Item` objects can be navigated to by transitively traversing links from this root. This spec does not require any
API endpoints from OAFeat or STAC API to be implemented, so the following links may not exist if the endpoint has not been implemented.

## Recommended Link Relations at `/`
## Link Relations

When implementing the STAC API Core conformance class, it it recommended to implement these Link relations.
The following Link relations should exist in the Landing Page (root).

| **`rel`** | **href to** | **From** | **Description** |
| -------------- | ------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `root` | The root URI | STAC Core | Reference to self URI |
| `self` | The root URI | OAFeat | Reference to self URI |
| `service-desc` | The OpenAPI service description | OAFeat OpenAPI | Uses the `application/vnd.oai.openapi+json;version=3.0` media type to refer to the OpenAPI 3.0 document that defines the service's API |
| `service-doc` | An HTML service description | OAFeat OpenAPI | Uses the `text/html` media type to refer to a human-consumable description of the service |
| `child` | The child STAC Catalogs & Collections | STAC Core | Provides curated paths to get to STAC Collection and Item objects |
| **rel** | **href** | **From** | **Description** |
| -------------- | -------------------- | -------------- | ---------------- |
| `root` | `/` | STAC Core | The root URI |
| `self` | `/` | OAFeat | Self reference, same as root URI |
| `service-desc` | `/api` (recommended) | OAFeat OpenAPI | The OpenAPI service description. Uses the `application/vnd.oai.openapi+json;version=3.0` media type to refer to the OpenAPI 3.0 document that defines the service's API |
| `child` | various | STAC Core | The child STAC Catalogs & Collections. Provides curated paths to get to STAC Collection and Item objects

Additionally, a `service-doc` endpoint is recommended.

| **rel** | **href** | **From** | **Description** |
| ------------ | -------- | -------------- |----------------- |
| `service-doc` | `/api.html` (recommended) | OAFeat OpenAPI | An HTML service description. Uses the `text/html` media type to refer to a human-consumable description of the service |

It is also valid to have `item` links from the landing page, but most STAC API services are used to
serve up a large number of features, so they typically
use several layers of intermediate `child` links before getting to Item objects.
use several layers of intermediate `child` links before getting to Item objects. Note that the `items` (plural)
link will be used by APIs implementing STAC API - Features to link from a Collection to the items in that collection.

## Example Landing Page for STAC API - Core

Expand Down
22 changes: 20 additions & 2 deletions item-search/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# STAC API - Item Search

- [STAC API - Item Search](#stac-api---item-search)
- [Link Relations](#link-relations)
- [Query Parameters and Fields](#query-parameters-and-fields)
- [Query Examples](#query-examples)
- [Query Parameter Table](#query-parameter-table)
Expand All @@ -24,7 +25,7 @@
- **Dependencies**: [STAC API - Core](../core)
- **Examples**: [examples.md](examples.md)

A search endpoint, linked to from the STAC landing page, provides the ability to query STAC [Item](../stac-spec/item-spec/README.md)
A search endpoint provides the ability to query STAC [Item](../stac-spec/item-spec/README.md)
objects across collections.
It retrieves a group of Item objects that match the provided parameters, wrapped in an
[ItemCollection](../fragments/itemcollection/README.md) (which is a
Expand All @@ -41,6 +42,23 @@ provides a more expressive set of operators.

Implementing `GET /search` is **required**, `POST /search` is optional, but recommended.

## Link Relations

The following Link relations should exist in the Landing Page (root).

| **rel** | **href** | **From** | **Description** |
| -------------- | -------------------- | -------------- | ---------------- |
| `root` | `/` | STAC Core | The root URI |
| `self` | `/` | OAFeat | Self reference, same as root URI |
| `service-desc` | `/api` (recommended) | OAFeat OpenAPI | The OpenAPI service description. Uses the `application/vnd.oai.openapi+json;version=3.0` media type to refer to the OpenAPI 3.0 document that defines the service's API |
| search | `/search` | STAC Item Search | URI for the Search endpoint |

Additionally, a `service-doc` endpoint is recommended.

| **rel** | **href** | **From** | **Description** |
| ------------ | -------- | -------------- |----------------- |
| `service-doc` | `/api.html` (recommended) | OAFeat OpenAPI | An HTML service description. Uses the `text/html` media type to refer to a human-consumable description of the service |

It is **required** to add a Link to the root endpoint (`/`) with the `rel` type set to `search`
that refers to the search endpoint in the `href` property,
with a `type` of `application/geo+json` and a `method` of `GET`.
Expand All @@ -56,7 +74,7 @@ This link should look like:
}
```

Implementations that support `POST` must add a second link with the same structure, but has a `method` of `POST`.
Implementations that support `POST` should add a second link with the same structure but with a `method` of `POST`.

## Query Parameters and Fields

Expand Down
19 changes: 19 additions & 0 deletions ogcapi-features/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# STAC API - Features

- [STAC API - Features](#stac-api---features)
- [Link Relations](#link-relations)
- [Endpoints](#endpoints)
- [Examples](#examples)
- [Example Landing Page for STAC API - Features](#example-landing-page-for-stac-api---features)
Expand Down Expand Up @@ -28,6 +29,24 @@ this extension discusses using it in the context of STAC. One could implement an
[Item](../stac-spec/item-spec/README.md) and [Collection](../stac-spec/collection-spec/README.md) objects from their endpoints, and it will work
with OAFeat clients. But specialized STAC clients will likely display results better, and depend on the STAC landing page.

## Link Relations

The following Link relations should exist in the Landing Page (root).

| **rel** | **href** | **From** | **Description** |
| -------------- | -------------------- | -------------- | ---------------- |
| `root` | `/` | STAC Core | The root URI |
| `self` | `/` | OAFeat | Self reference, same as root URI |
| `conformance` | `/conformance` | OAFeat | Conformance URI |
| `service-desc` | `/api` (recommended) | OAFeat OpenAPI | The OpenAPI service description. Uses the `application/vnd.oai.openapi+json;version=3.0` media type to refer to the OpenAPI 3.0 document that defines the service's API |
| `data` | `/collections` | OAFeat | List of Collections |

Additionally, a `service-doc` endpoint is recommended.

| **rel** | **href** | **From** | **Description** |
| ------------ | -------- | -------------- |----------------- |
| `service-doc` | `/api.html` (recommended) | OAFeat OpenAPI | An HTML service description. Uses the `text/html` media type to refer to a human-consumable description of the service |

## Endpoints

The core OGC API - Features endpoints are shown below, with details provided in an
Expand Down