diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f305979..81df2f00 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,14 +11,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Inject env variables - uses: rlespinasse/github-slug-action@v3.x - - uses: actions/setup-node@v3 + uses: rlespinasse/github-slug-action@v5 + - uses: actions/setup-node@v5 with: node-version: 'lts/*' - - uses: actions/checkout@v3 - - run: | - npm install - npm run build + - uses: actions/checkout@v5 + - run: npm install + - run: npm run build - name: clone gh-pages and clean-up if: ${{ env.GITHUB_REF_SLUG == 'master' }} run: | @@ -29,11 +28,12 @@ jobs: if: ${{ env.GITHUB_REF_SLUG != 'master' }} run: mkdir gh-pages - run: | - cp redoc.html gh-pages/index.html + cp *.html gh-pages/ cp errors.json gh-pages/errors.json + cp openapi.yaml gh-pages/openapi.yaml cp -rv assets/. gh-pages/assets/ - name: deploy to root (master) - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 if: ${{ env.GITHUB_REF_SLUG == 'master' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} @@ -42,7 +42,7 @@ jobs: user_name: 'openEO CI' user_email: openeo.ci@uni-muenster.de - name: deploy to ${{ env.GITHUB_REF_SLUG }} - uses: peaceiris/actions-gh-pages@v3 + uses: peaceiris/actions-gh-pages@v4 if: ${{ env.GITHUB_REF_SLUG != 'master' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64b0febd..c2fbcef7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,11 +4,9 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v5 with: node-version: 'lts/*' - - uses: actions/checkout@v3 - - name: Run tests - run: | - npm install - npm test \ No newline at end of file + - uses: actions/checkout@v5 + - run: npm install + - run: npm test \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7426e59f..1f3bbe4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ -__pycache__/ -package-lock.json -node_modules/ -/redoc.html -.vscode -.idea +package-lock.json +/node_modules/ +/*.html +.vscode +.idea diff --git a/.redocly.lint-ignore.yaml b/.redocly.lint-ignore.yaml new file mode 100644 index 00000000..e916a404 --- /dev/null +++ b/.redocly.lint-ignore.yaml @@ -0,0 +1,8 @@ +openapi.yaml: + no-required-schema-properties-undefined: + - '#/components/schemas/dimension_spatial_horizontal/allOf/1/required/0' + - '#/components/schemas/dimension_spatial_vertical/allOf/1/anyOf/0/required/0' + - '#/components/schemas/dimension_spatial_vertical/allOf/1/anyOf/1/required/0' + - '#/paths/~1jobs~1{job_id}~1estimate/get/responses/200/content/application~1json/schema/anyOf/0/required/0' + - '#/paths/~1jobs~1{job_id}~1estimate/get/responses/200/content/application~1json/schema/anyOf/1/required/0' + - '#/paths/~1jobs~1{job_id}~1estimate/get/responses/200/content/application~1json/schema/anyOf/2/required/0' diff --git a/.redocly.yaml b/.redocly.yaml new file mode 100644 index 00000000..7afe3dcc --- /dev/null +++ b/.redocly.yaml @@ -0,0 +1,16 @@ +extends: + - recommended + +openapi: + expandResponses: "200,201,202,203,204" + pathInMiddlePanel: true + +apis: + core: + root: ./openapi.yaml + commercial-data: + root: ./extensions/commercial-data/openapi.yaml + processing-parameters: + root: ./extensions/processing-parameters/openapi.yaml + workspaces: + root: ./extensions/workspaces/openapi.yaml \ No newline at end of file diff --git a/.spectral.yml b/.spectral.yml index cfe29b52..13cea053 100644 --- a/.spectral.yml +++ b/.spectral.yml @@ -8,6 +8,7 @@ rules: tag-description: true oas3-parameter-description: true oas3-unused-component: false # Broken: https://github.com/stoplightio/spectral/issues/1271 + array-items: false operation-summary-formatted: description: Operation `summary` should start with upper case and not end with a dot. given: '$.paths.*[?( @property === ''get'' || @property === ''put'' || @property === ''post'' || @property === ''delete'' || @property === ''options'' || @property === ''head'' || @property === ''patch'' || @property === ''trace'' )]' diff --git a/CHANGELOG.md b/CHANGELOG.md index bced4c98..58a54c51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,15 +4,69 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased / Draft +## [Unreleased] / Draft -## [1.2.0] - 2021-05-31 +### Added + +### Deprecated + +### Changed + +### Fixed + +## [1.3.0] - 2026-02-02 + +### Added + +- **New extensions:** + - [Remote Process Definition Extension](./extensions/remote-process-definition/README.md) + - [Processing Parameters Extension](./extensions/processing-parameters/README.md) + - [Workspaces Extension](./extensions/workspaces/README.md) +- `GET /`: New relation type `web-editor` [#577](https://github.com/Open-EO/openeo-api/issues/577) +- `GET /credentials/oidc`: Added `authorization_parameters` property to enforce specific parameters for the authorization endpoint [#534](https://github.com/Open-EO/openeo-api/issues/534) +- `POST /result`: Added response header "OpenEO-Identifier" to expose an identifier associated with a synchronous processing request. +- Added `stacktrace` to log entries (e.g. for `GET /jobs/{job_id}/logs`) [#512](https://github.com/Open-EO/openeo-api/issues/512) +- Added `version` property to `GET /processes` [#517](https://github.com/Open-EO/openeo-api/issues/517) +- Added `queued`, `started` and `unpublished` to the batch job metadata and the corresponding STAC results [#542](https://github.com/Open-EO/openeo-api/issues/542) +- Added a status diagram that explains the status changes of batch jobs [#436](https://github.com/Open-EO/openeo-api/issues/436) +- Added all the batch job timestamps (including the new timestamps above) to the Collection type of batch job results +- Support for standard JSON Web Tokens (JWT) being used as Bearer tokens [#558](https://github.com/Open-EO/openeo-api/issues/558) + +### Deprecated + +- Deprecated the openEO-specific Bearer token format (authentication mechanism/provider id/access token) [#558](https://github.com/Open-EO/openeo-api/issues/558) +- STAC 0.9.x + +### Changed + +- Updated Federation Extension to v0.2.0 +- Migrate from openEO-specific tokens to JWT, i.e. deprecating the openEO-specific format in favor of JWT [#558](https://github.com/Open-EO/openeo-api/issues/558) +- `GET /`: Requires the fields `type` and `conformsTo` +- `GET /udf_runtimes`: Requires at least one UDF runtime to be provided. [#511](https://github.com/Open-EO/openeo-api/issues/511) + +### Fixed + +- `GET /conformance`: Added missing security definitions +- `GET /file_formats`: Base parameter on top of normal JSON Schema, not Process JSON Schema +- `PATCH /services/{service_id}` and `PATCH /jobs/{job_id}`: Explicitly allow updating back-end specific properties (as in `POST`) +- `GET /services/{service_id}` and `GET /jobs/{job_id}`: Explicitly allow listing back-end specific properties (as provided in `POST`) +- `GET /jobs/{job_id}/results`: Clarify that signed URLs (used as "canonical" link) should be regenerated each time. +- `GET /jobs/{job_id}/results`: Clarify that "canonical" job result link should include/encode the original query parameters +- Clarified for log levels which default values apply +- Clarified how the relation types `license`, `version-history` and `author` can be used to enrich the process metadata. [#531](https://github.com/Open-EO/openeo-api/issues/531) +- Clarified the behaviour of `federation:backends` for `POST /validation` +- Clarified the meaning of `expires` in batch job results +- Clarified that `last_successful_check` (from Federation Extension) can be null. +- Clarified the relation between result and end nodes, the usage of the result flag, and the relation between the outermost ("root") and child process graphs [#547](https://github.com/Open-EO/openeo-api/issues/547) +- Fixed various OpenAPI issues reported by redocly lint + +## [1.2.0] - 2021-05-25 ### Added - **New extensions:** - - [Commercial Data Extension](./extensions/commercial-data/README.md) - - [Federation Extension](./extensions/federation/README.md) + - [Commercial Data Extension](./extensions/commercial-data/README.md) + - [Federation Extension](./extensions/federation/README.md) - `GET /`: New Relation types: [#404](https://github.com/Open-EO/openeo-api/issues/404) - `create-form` to link to the registration page - `recovery-form` to link to the credentials recovery page. @@ -24,9 +78,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Recommendation to add a link with relation type `canonical` which points to a signed URL with the same content as the response. [#397](https://github.com/Open-EO/openeo-api/issues/397) - Added metadata field `openeo:status` to indicate the job status (and whether the result is complete or not). - Added parameter `partial` to allow retrieving incomplete results, which must also add the new property `openeo:status` to the metadata. [#430](https://github.com/Open-EO/openeo-api/issues/430) -- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs`: Added `level` parameter to requests to set the minimum log level returned by the response. [#485](https://github.com/Open-EO/openeo-api/issues/485) +- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs` and `POST /result`: Added `level` parameter to requests to set the minimum log level returned by the response. [#485](https://github.com/Open-EO/openeo-api/issues/485) - Added property `log_level` to secondary web service, batch job and synchronous processing endpoints to indicate the minimum severity level that should be stored for logs. [#329](https://github.com/Open-EO/openeo-api/issues/329) -- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs` and `POST /result`: Added `level` property in responses to reflect the minimum log level that may appear in the response. [#329](https://github.com/Open-EO/openeo-api/issues/329) +- `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs`: Added `level` property in responses to reflect the minimum log level that may appear in the response. [#329](https://github.com/Open-EO/openeo-api/issues/329) - Recommendation to add media types and titles to links for a better user experience. - Allow the relation type `canonical` to be used generally for (shared) resources (e.g. UDPs or batch jobs) without requiring Bearer authentication. [#405](https://github.com/Open-EO/openeo-api/issues/405) - Recommendation for UDF runtime names. [#409](https://github.com/Open-EO/openeo-api/issues/409) @@ -431,6 +485,7 @@ Initial version. [Unreleased]: +[1.3.0]: [1.2.0]: [1.1.0]: [1.0.1]: diff --git a/README.md b/README.md index aef37924..e2e543d9 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,13 @@ openEO develops an open API to connect R, Python and JavaScript clients to big E ## Versions / Branches -The [master branch](https://github.com/Open-EO/openeo-api/tree/master) is the 'stable' version of the openEO API specification. It is currently version **1.2.0** of the specification. The [draft branch](https://github.com/Open-EO/openeo-api/tree/draft) is where active development takes place. +The [master branch](https://github.com/Open-EO/openeo-api/tree/master) is the 'stable' version of the openEO API specification. It is currently version **1.3.0** of the specification. The [draft branch](https://github.com/Open-EO/openeo-api/tree/draft) is where active development takes place. | Version / Branch | Status | Description | | --------------------------------------------------------- | ----------- | ----------- | | [draft](https://api.openeo.org/draft) | planned | *Unstable* - Next version. | -| [**1.2.0**](https://api.openeo.org) | **current** | Clarifications, new extensions, vector data cubes, STAC (API) updates, more link relation types, improved batch job results and logs. [Changelog](CHANGELOG.md#120---2023-05-31). | +| [**1.3.0**](https://api.openeo.org) | **current** | Clarifications, Remote Process Definition and Processing Parameters extensions, new token format, batch job improvements, etc. [Changelog](CHANGELOG.md#130---2026-02-02). | +| [1.2.0](https://api.openeo.org/1.2.0) | legacy | Clarifications, Commercial Data and Federation extensions, vector data cubes, STAC (API) updates, more link relation types, improved batch job results and logs. [Changelog](CHANGELOG.md#120---2023-05-31). | | [1.1.0](https://api.openeo.org/1.1.0) | legacy | Clarifications, STAC updates, return value for child processes, more details for logs and jobs, default clients for OIDC. [Changelog](CHANGELOG.md#110---2021-06-15). | | [1.0.1](https://api.openeo.org/1.0.1) | legacy | Clarifications, bugfixes and CORS improvements. [Changelog](CHANGELOG.md#101---2020-12-07). | | [1.0.0](https://api.openeo.org/1.0.0) | legacy | First stable version of openEO. [Changelog](CHANGELOG.md#100---2020-07-17). | @@ -29,10 +30,13 @@ See also the [changelog](CHANGELOG.md) and the [milestones](https://github.com/O ## Extensions -| Name | Version | Stability | Description | -| ---------------------------------------------- | ------- | ------------ | ----------- | -| [Commercial Data](extensions/commercial-data/) | 0.1.0 | experimental | Provides an interface for discovering, ordering and using commercial data. | -| [Federation](extensions/federation/) | 0.1.0 | experimental | Covers federation aspects, i.e. where multiple back-ends are exposed as a single API. | +| Name | Version | Stability | Description | +| ------------------------------------------------------------------ | ------- | ------------ | ----------- | +| [Commercial Data](extensions/commercial-data/) | 0.1.0 | experimental | Provides an interface for discovering, ordering and using commercial data. | +| [Federation](extensions/federation/) | 0.2.0 | experimental | Covers federation aspects, i.e. where multiple back-ends are exposed as a single API. | +| [Processing Parameters](extensions/processing-parameters/) | 0.1.0 | experimental | Explore and handle additional processing parameters that a back-end can offer for the processing modes (sync. processing, batch jobs, web services). | +| [Remote Process Definition](extensions/remote-process-definition/) | 0.1.0 | experimental | Load user-defined processes that are hosted externally through the process namespace into process graphs. | +| [Workspaces](extensions/workspaces/) | 0.1.0 | experimental | Connect external file storage systems (e.g. cloud buckets) to openEO back-end implementations. | ## Repository @@ -43,7 +47,7 @@ This repository contains a set of files formally describing the openEO API, each * The [assets](assets/) folder contains some useful additional files such as examples or schemas. All of these are non-binding additions. The source of truth are the top-level specification files. * The [extensions](extensions/) folder contains extensions to the openEO API. -# Development +## Development The `draft` branch is the latest version and is the one to create Pull Requests against. @@ -51,6 +55,6 @@ For development some tools can be used: 1. Install [node and npm](https://nodejs.org) - should run with any recent version 2. Run `npm install` in this folder to install the dependencies -3. Run the linter for the OpenAPI file with `npm test`. This will lint the files and check against some best-practices. It uses `spectral` in the background. +3. Run the linter for the OpenAPI file with `npm test`. This will lint the files and check against some best-practices. It uses `spectral` and `redocly` in the background. 4. To show the files nicely formatted in a web browser, run `npm start`. It starts a server and opens the API specification rendered with ReDoc in a web browser. -5. To create a static HTML page (e.g. for hosting it on GitHub Pages), you can run `npm run build` and it will create a `redoc.html` in this folder. +5. To create a static HTML page (e.g. for hosting it on GitHub Pages), you can run `npm run build` and it will create a `index.html` in this folder and additional files for the extensions. diff --git a/assets/status-diagram.png b/assets/status-diagram.png new file mode 100644 index 00000000..9ca6daab Binary files /dev/null and b/assets/status-diagram.png differ diff --git a/errors.json b/errors.json index 7288ba6b..ac430b16 100644 --- a/errors.json +++ b/errors.json @@ -200,7 +200,7 @@ ] }, "ProcessInvalid": { - "description": "The process given is invalid, which ususlly means that the process metadata is invalid.", + "description": "The given process definition is invalid, which usually means that the process metadata is invalid.", "message": "Invalid process specified.", "http": 400, "tags": [ @@ -241,8 +241,8 @@ ] }, "ProcessGraphComplexity": { - "description": "The process graph is too complex for synchronous processing and will likely time out. Please use a batch job instead.", - "message": "The process is too complex for for synchronous processing. Please use a batch job instead.", + "description": "The process graph is computationally too demanding for synchronous processing and will likely time out. Please use a batch job instead.", + "message": "The process graph is too demanding for synchronous processing. Please use a batch job instead.", "http": 400, "tags": [ "Data Processing" diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index 3fe7c177..ed2b8782 100644 --- a/extensions/commercial-data/README.md +++ b/extensions/commercial-data/README.md @@ -1,6 +1,6 @@ # Commercial Data Extension -The Commercial Data API extension provides an interface for discovering, ordering and using commercial data in the openEO API. +The Commercial Data Extension to the openEO API provides an interface for discovering, ordering and using commercial data in openEO. - Version: **0.1.0** - Stability: **experimental** @@ -12,7 +12,7 @@ Extensions can not change or break existing behavior of the openEO API. ## Overview of the workflow -All the available datasets provided by a backend are listed on the `GET /collections` endpoint. The collections are normally freely accessible. This extension adds capabilities for providing collections that are not free of charge and require purchasing data products that can thereupon be used in processing. Commercial data collections usually allow purchasing small subsets of the data (products), for example, a single observation of an area. +All the available datasets provided by a back-end are listed on the `GET /collections` endpoint. The collections are normally freely accessible. This extension adds capabilities for providing collections that are not free of charge and require purchasing data products that can thereupon be used in processing. Commercial data collections usually allow purchasing small subsets of the data (products), for example, a single observation of an area. Therefore, the client must have an ability to search the available products that match their desired criteria and inspect their metadata to decide whether the products should be purchased. @@ -22,7 +22,7 @@ When the order is completed, the data is ingested in a collection and its ID is ### Collection discovery -A backend should add general information about a commercial data collection to the `/collections` and `/collections/{collection_id}` endpoints, the same as with freely available collections. Only the metadata about the entire dataset needs to be provided, not about the specific data products that a user has already purchased. +A back-end should add general information about a commercial data collection to the `/collections` and `/collections/{collection_id}` endpoints, the same as with freely available collections. Only the metadata about the entire dataset needs to be provided, not about the specific data products that a user has already purchased. Commercial data collections are distinguished from freely available collections by including `"order:status": "orderable"` as specified in the [STAC Order extension](https://github.com/stac-extensions/order/tree/v1.0.0). @@ -82,7 +82,7 @@ Commercial data collections must also include human-readable pricing information ### Filtering parameters discovery -Searching for products can support refining the search by filtering with general or collection-specific attributes. Backends should implement a top level `/queryables` endpoint for attributes available for all collections, and collection-specific attributes should be provided at `/collections/{collection_id}/queryables` according to [OGC Queryables specification](https://portal.ogc.org/files/96288#filter-queryables) and [STAC Filter extension](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/fragments/filter). +Searching for products can support refining the search by filtering with general or collection-specific attributes. Back-ends should implement a top level `/queryables` endpoint for attributes available for all collections, and collection-specific attributes should be provided at `/collections/{collection_id}/queryables` according to [OGC Queryables specification](https://portal.ogc.org/files/96288#filter-queryables) and [STAC Filter extension](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/fragments/filter). #### Example @@ -125,7 +125,7 @@ Example response from `GET /collections/PLEIADES/queryables`: ### Searching available products -Backends should implement the top-level `GET /search` endpoint as specified in the [STAC Item Search API specification](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search). This should include the [Filter Extension](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/fragments/filter), which enables filtering the available products by attributes specified in `GET /queryables` and `GET /collections/{collection-id}/queryables`. +Back-ends should implement the top-level `GET /search` endpoint as specified in the [STAC Item Search API specification](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/item-search). This should include the [Filter Extension](https://github.com/radiantearth/stac-api-spec/tree/v1.0.0-rc.1/fragments/filter), which enables filtering the available products by attributes specified in `GET /queryables` and `GET /collections/{collection-id}/queryables`. The endpoint returns a list of [STAC Items](https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md) that match the criteria. The products should be aligned with the STAC specification, utilising the existing [STAC extensions](https://github.com/radiantearth/stac-spec/blob/v1.0.0/extensions/README.md) as much as possible, and trying avoiding custom attributes, if a generally accepted definition does not exist. #### Example @@ -155,7 +155,7 @@ Example request payload to `GET /search` for `PLEIADES` products from "Living Li ### Ordering products -Backends should implement the following endpoints: +Back-ends must implement the following endpoints: - `GET /orders`: Get a list of all created orders - `POST /orders`: Create an order @@ -163,13 +163,14 @@ Backends should implement the following endpoints: - `POST /orders/{order_id}`: Confirm a created order Optionally, they can also implement: + - `DELETE /orders/{order_id}`: Delete an order See the [OpenAPI document](openapi.yaml) for details. ### Product metadata -The backend can provide full product metadata as STAC Items following [STAC API Features specification](https://github.com/radiantearth/stac-api-spec/tree/main/ogcapi-features). This requires implementing two additional endpoints, `/collections/{collection_id}/items` and `/collections/{collection_id}/items/{item_id}`. +The back-end can provide full product metadata as STAC Items following [STAC API Features specification](https://github.com/radiantearth/stac-api-spec/tree/main/ogcapi-features). This requires implementing two additional endpoints, `/collections/{collection_id}/items` and `/collections/{collection_id}/items/{item_id}`. `/collections/{collection_id}/items/{item_id}` may return an error if the data has not been ingested yet. @@ -177,7 +178,7 @@ Items should contain links to the respective orders that made them available usi ### Payment -Payment should be done in the currency used by the backend, listed at `GET /` under `billing`. When an order is created, the backend should return the full final cost of the order. +Payment should be done in the currency used by the back-end, listed at `GET /` under `billing`. When an order is created, the back-end should return the full final cost of the order. ### Example usage with Python client diff --git a/extensions/commercial-data/openapi.yaml b/extensions/commercial-data/openapi.yaml index c2c2d1a2..8c5cd65f 100644 --- a/extensions/commercial-data/openapi.yaml +++ b/extensions/commercial-data/openapi.yaml @@ -1,10 +1,10 @@ openapi: 3.0.2 info: - title: openEO Commercial Data API extension + title: openEO API - Commercial Data Extension version: 0.1.0 description: >- - The Commercial Data API extension provides an interface for discovering, - ordering and using commercial data in the openEO API. + The Commercial Data Extension to the openEO API provides an interface for discovering, + ordering and using commercial data in openEO. contact: name: openEO Consortium url: 'https://openeo.org' @@ -13,7 +13,7 @@ info: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0.html' externalDocs: - url: https://github.com/Open-EO/openeo-api/blob/draft/extensions/federation/README.md + url: https://github.com/Open-EO/openeo-api/blob/draft/extensions/commercial-data/README.md tags: - name: Orders description: Management of commercial data orders @@ -87,7 +87,7 @@ paths: The order can contain additional parameters that specify how the items should be delivered. For example, it might be possible to set the projection, resampling method, bit depth etc. of the delivered data. - Backends SHOULD expose the available ordering parameters in `GET /collections/{collection_id}` in the `order_parameters` field, following the `process_parameters` schema of [`GET /service_types`](https://openeo.org/documentation/1.0/developers/api/reference.html#tag/Secondary-Services/operation/list-service-types). + Back-ends SHOULD expose the available ordering parameters in `GET /collections/{collection_id}` in the `order_parameters` field, following the `process_parameters` schema of [`GET /service_types`](https://openeo.org/documentation/1.0/developers/api/reference.html#tag/Secondary-Services/operation/list-service-types). Returns `Location` and `OpenEO-Identifier` header with the link to the detailed information about the order. tags: @@ -148,7 +148,7 @@ paths: description: |- Get full metadata of the order. - Backends can optionally link to the spatial and temporal extent information and other metadata about the items using the relation type `item`, preferrably by implementing and linking to `GET /collections/{collection_id}/items/{item_id}`. + Back-ends can optionally link to the spatial and temporal extent information and other metadata about the items using the relation type `item`, preferrably by implementing and linking to `GET /collections/{collection_id}/items/{item_id}`. tags: - Orders security: @@ -159,11 +159,9 @@ paths: content: application/json: schema: + type: object allOf: - $ref: '#/components/schemas/order' - - type: object - required: - - items 4XX: $ref: '../../openapi.yaml#/components/responses/client_error_auth' 5XX: @@ -176,7 +174,7 @@ paths: When an order is created through `POST /order`, the data isn't yet ordered from the commercial data provider. The client MUST explicitly confirm the order whereupon the order is executed, the costs are deducted from the client's account and the data is ingested in the target collection. - The target collection is the collection through which the ordered data is made available. The source and the target collection can be the same or different, it's up to the backend if the ordered data id ingested into a new target collection or the existing source collection. Additionally, if the backend creates new target collections, it can provide access to the union of all purchased products through the source collection. + The target collection is the collection through which the ordered data is made available. The source and the target collection can be the same or different, it's up to the back-end if the ordered data id ingested into a new target collection or the existing source collection. Additionally, if the back-end creates new target collections, it can provide access to the union of all purchased products through the source collection. This endpoint only has an effect if `order:status` is `orderable`. diff --git a/extensions/commercial-data/package.json b/extensions/commercial-data/package.json deleted file mode 100644 index 0fd067ed..00000000 --- a/extensions/commercial-data/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@openeo/api-extension-commercial-data", - "version": "0.1.0", - "author": "openEO Consortium", - "license": "Apache-2.0", - "description": "The openEO API specification.", - "homepage": "https://openeo.org", - "bugs": { - "url": "https://github.com/Open-EO/openeo-api/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Open-EO/openeo-api.git" - }, - "devDependencies": { - "@stoplight/spectral": "^5.9.1", - "redoc-cli": "^0.13.18" - }, - "scripts": { - "start": "redoc-cli serve openapi.yaml --watch --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", - "build": "redoc-cli bundle openapi.yaml -o redoc.html --title \"openEO API\" --cdn --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", - "test": "spectral lint openapi.yaml" - } -} diff --git a/extensions/federation/README.md b/extensions/federation/README.md index 16e0d2ae..4ea3bda5 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -4,14 +4,14 @@ The openEO API is a specification for interoperable cloud-based processing of la This is an extension for federation aspects, i.e. where multiple back-ends are exposed as a single API. -- Version: **0.1.0** +- Version: **0.2.0** - Stability: **experimental** -- Conformance class: `https://api.openeo.org/extensions/federation/0.1.0` +- Conformance class: `https://api.openeo.org/extensions/federation/0.2.0` **Note:** This document only documents the additions to the specification. Extensions can not change or break existing behavior of the openEO API. -## Backend details +## Back-end details A new required field `federation` is added to `GET /` to enable federation. @@ -61,8 +61,10 @@ schema: last_successful_check: type: string format: date-time + nullable: true description: >- - If the `status` is `offline`: The time at which the back-end was checked and available the last time. + If the `status` is `offline`: The time at which the back-end was checked and available the last time + or `null` when the back-end was never observed to be available. Otherwise, this is equal to the property `last_status_check`. experimental: type: boolean @@ -82,7 +84,7 @@ schema: ```json { - "api_version": "1.2.0", + "api_version": "1.3.0", "federation": { "vito": { "title": "VITO", @@ -104,59 +106,30 @@ schema: } ``` -## Lists of resources +## Resources supported only by a subset of back-ends -Clients will assume that all lists of resources are the a combination of all back-ends listed in `GET /`. -Federated APIs can expose if any of the back-ends is not available and thus is not part of the response. +Discoverable resources can explicitly list the subset of back-ends that support or host the exposed resource or functionality with the property `federation:backends`. -Applies to: +Schema-wise, this only applies to resources that are defined as an object and allow to contain additional properties. +For example (**not** comprehensive): - `GET /collections` -- `GET /processes` -- `GET /file_formats` +- `GET /collections/{id}` +- `GET /processes` (global, per process, per parameter) +- `GET /file_formats` (global, per file format) +- `GET /service_types` (per service) +- `GET /udf_runtimes` (per UDF runtime, per version) +- `POST /validation` (the back-ends that can run the process, see below) +- `GET /files` - `GET /process_graphs` +- `GET /process_graphs/{id}` - `GET /jobs` -- `GET /jobs/{job_id}` -- `GET /jobs/{job_id}/results` +- `GET /jobs/{job_id}` (the back-ends that generated the result) +- `GET /jobs/{job_id}/results` (the back-ends that generated the result) - `GET /services` +- `GET /services/{id}` (the back-ends that host the service) -The following endpoints define the resources (UDF runtimes / service types) at the top level of their response as key-value pairs. -Consequently, they are not extensible with additional properties for federation purposes. - -- `GET /udf_runtimes` -- `GET /service_types` - -### OpenAPI fragment - -```yaml -schema: - type: object - properties: - 'federation:missing': - description: >- - Lists all back-ends that were not considered in the response (e.g. because they were not accessible). - If not given or empty, all back-ends were considered for creating the response. - Back-ends that were listed as offline in the capabilities still need to be listed here. - type: array - items: - type: string - description: The ID of a back-end. -``` - -### Example - -```json -{ - "federation:missing": ["wwu"], - "collections": [...], - "links": [...] -} -``` - -## Resources supported only by a subset of back-ends - -Every discoverable resource that is defined as an object and allows to contain additional properties, can list the backends that support or host the exposed resource/functionality. -This can also be embeded deeply into a hierarchical structure, e.g. for process or file format parameters. +This can also be embedded deeply into a hierarchical structure, e.g. for process or file format parameters. ```yaml schema: @@ -164,7 +137,7 @@ schema: properties: 'federation:backends': description: >- - Lists all back-ends that support or host the resource. + Lists the subset of back-ends that support or host the resource. If not given, all back-ends support the resource. type: array minItems: 1 @@ -175,6 +148,18 @@ schema: **Note:** In Collections this should generally be provided on the top-level of the object. +### Validation + +If this property is returned through the `POST /validation` endpoint, it has the meaning as listed below. +This also covers the case where the federation supports splitting a process into pieces so that different parts can run on different back-ends. + +- Endpoint returns *without* errors: + - `federation:backends` is included in the response: The listed back-ends support the workflow (either partially if splitting is supported, or in full). + - `federation:backends` is *not* included in the response: At least one of the back-ends support the workflow. +- Endpoint returns errors: + - `federation:backends` is included in the response: The listed back-ends were checked and none of the back-ends can run the workflow as is (neither splitted if supported, nor in full). + - `federation:backends` is *not* included in the response: the workflow could not be validated successfully by any of the back-ends or the federation component itself. This includes any kind of failed validation attempt, including network and server errors. + ### Examples #### Process @@ -207,10 +192,62 @@ schema: "stac_version": "1.0.0", "id": "example", "description": "...", - "summaries": { - "federation:backends": ["vito", "eodc"], - ... - }, + "federation:backends": ["vito", "eodc"], ... } -``` \ No newline at end of file +``` + +## Temporarily or unintentionally unavailable resources + +Resources and back-ends can be temporarily or unintentionally unavailable. +It is especially important to communicate to users missing resources when compiling a **list of resources** across multiple back-ends. +Clients will assume that all lists of resources are a combination of all back-ends listed under `federation` in `GET /`. +Federated APIs can expose if any of the back-ends was not available when building the resource listing response with the property `federation:missing`. + +Examples of where this could apply to (**not** comprehensive): + +- `GET /collections` +- `GET /processes` +- `GET /file_formats` +- `GET /process_graphs` +- `GET /files` +- `GET /jobs` +- `GET /jobs/{job_id}` +- `GET /jobs/{job_id}/results` +- `GET /jobs/{job_id}/logs` +- `GET /services` + +### OpenAPI fragment + +```yaml +schema: + type: object + properties: + 'federation:missing': + description: >- + Lists all back-ends that were unexpectedly unavailable during compilation of the response. + If not given or empty, all back-ends supporting this endpoint were considered for creating the response. + Back-ends that are listed as offline in the capabilities still need to be listed here. + type: array + items: + type: string + description: The ID of a back-end. +``` + +### Example + +```json +{ + "federation:missing": ["wwu"], + "collections": [...], + "links": [...] +} +``` + +## Endpoints that can't list federation details + +The following endpoints define the resources (UDF runtimes / service types) at the top level of their response as key-value pairs. +Consequently, they are not extensible with additional properties for federation purposes. + +- `GET /udf_runtimes` +- `GET /service_types` diff --git a/extensions/processing-parameters/README.md b/extensions/processing-parameters/README.md new file mode 100644 index 00000000..6de468b3 --- /dev/null +++ b/extensions/processing-parameters/README.md @@ -0,0 +1,75 @@ +# Processing Parameters Extension + +The Processing Parameters Extension to the openEO API provides an interface to explore and handle additional processing parameters that a back-end can offer for the three processing modes (synchronous processing, batch jobs, secondary web services). + +- Version: **0.1.0** +- Stability: **experimental** +- [OpenAPI document](openapi.yaml) +- Conformance class: `https://api.openeo.org/extensions/processing-parameters/0.1.0` + +**Note:** This document only documents the additions to the specification. +Extensions can not change or break existing behavior of the openEO API. + +This extension adds a new endpoint (`GET /processing_parameters`, see [OpenAPI document](openapi.yaml)) +to discover the additional processing parameters that a back-end offers. + +Additionally, this extension allows to provide specific default values for user-defined processes (UDPs), +which includes: + +- UDPs submitted directly for synchronous processing, as batch jobs, or as secondary web services +- UDPs stored through the `/process_graphs` endpoints +- UDPs stored external to the API and retrieved through the [Remote Process Definition Extension](../remote-process-definition/README.md) + +The parameters and its values are provided separately for each processing mode. + +## Embedding default processing options in UDPs + +UDPs can provide default values for specific processing parameters. + +The values for each parameter (so called 'options') are provided separately for each processing mode. +The following properties are added to the top-level of a UDP (e.g. as sibling nodes to the "process_graph" property) for the respective processing modes: + +- `default_synchronous_options` for synchronous processing +- `default_job_options` for batch jobs +- `default_service_options` for secondary web services + +The schema for each of these properties is: + +```yaml +type: object +additionalProperties: + description: Any type +``` + +The keys of the object are the respective parameter names. +The values of the object are the default values for the parameters. +Schematic restrictions are not defined for the object, but the schemas for the parameters as defined in `GET /processing_parameters` apply to the given values. +These values provide the defaults unless a user overrides them in the actual data processing request (e.g. `POST /jobs`, see below). + +Example UDP including defaults for the processing parameters `memory` and `block-sizes` of a batch job: + +```json +{ + "id": "my_evi", + "parameters": [...], + "process_graph": {...}, + "default_job_options": { + "memory": "2GB", + "block-sizes": [128, 32] + } +} +``` + +## Resolving parameters + +Due to the variety of places where processing parameters can be provided, the following +list defines how the parameters must be resolved. The prioritization is as follows: + +1. If present, use the parameter specified in the processing request directly (e.g. in `POST /jobs` as a top-level property) +2. If present, use the default parameter specified in the UDP +3. Otherwise, use the default value for the parameter as specified in `GET /processing_parameters` + +"Present" means that the property is present in the JSON representation regardless of the value given, i.e. +properties are present if an empty string, an empty array, an empty object, `false`, `0`, or `null` are provided. + +Unrecognized/unknown parameters that are provided through UDPs must be ignored by backends. diff --git a/extensions/processing-parameters/openapi.yaml b/extensions/processing-parameters/openapi.yaml new file mode 100644 index 00000000..85b974fb --- /dev/null +++ b/extensions/processing-parameters/openapi.yaml @@ -0,0 +1,104 @@ +openapi: 3.0.2 +info: + title: openEO API - Processing Parameters Extension + version: 0.1.0 + description: >- + The Processing Parameters Extension to the openEO API provides an interface to explore and handle additional processing parameters that a back-end can offer for the three processing modes (synchronous processing, batch jobs, and secondary web services). + The openEO API specification allows back-ends to accept "additional back-end specific properties" for each of the processing modes. + As the openEO API specification does not define the name and schemas of these properties, this extension provides a standardized way to define and document these properties. + contact: + name: openEO Consortium + url: 'https://openeo.org' + email: openeo.psc@uni-muenster.de + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +externalDocs: + url: https://github.com/Open-EO/openeo-api/blob/draft/extensions/workspaces/README.md +tags: + - name: Capabilities + description: General information about the API implementation and other supported capabilities provided by the back-end. + - name: Data Processing + description: Organizes and manages data processing on the back-end, either as synchronous on-demand computation or batch jobs. + - name: Batch Jobs + description: Management of batch processing tasks (jobs) and their results. + - name: Secondary Services + description: On-demand access to data using other web service protocols. +servers: + - url: 'https://openeo.example/api/{version}' + description: >- + The URL of the API MAY freely be chosen by the back-end providers. The + path, including API versioning, is a *recommendation* only. Nevertheless, + all servers MUST support HTTPS as the authentication methods are not + secure with HTTP only! + variables: + version: + default: v1 + description: >- + API versioning is RECOMMENDED. As the openEO API is following + [SemVer](https://semver.org/) only the MAJOR part of the stable + version numbers (i.e. versions >= 1.0.0) SHOULD be used for API + versioning in the URL. The reason is that backward-incompatible + changes are usually introduced by major changes. Therefore, the + version number in the URL MUST not be used by the clients to detect + the version number of the API. Use the version number returned from + `GET /` instead. +paths: + /processing_parameters: + get: + summary: Additional processing parameters + operationId: list-processing-parameters + description: |- + Lists additional custom processing parameters + that a back-end offers for the different processing modes (synchronous processing, batch jobs, secondary web services). + The parameters specified here can be added to the corresponding `POST` requests at the top-level of the object that is sent as the payload. + All parameters SHOULD explicitly be made optional with reasonable defaults as otherwise the interoperability between the implementations decreases. + tags: + - Capabilities + - Data Processing + - Batch Jobs + - Secondary Services + security: + - {} + - Bearer: [] + responses: + '200': + description: >- + An object with a list of parameters per processing mode. + content: + application/json: + schema: + description: Processing parameters per processing mode. + type: object + properties: + create_job_parameters: + $ref: '#/components/schemas/processing_create_parameters' + create_service_parameters: + $ref: '#/components/schemas/processing_create_parameters' + create_synchronous_parameters: + $ref: '#/components/schemas/processing_create_parameters' + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' +components: + schemas: + processing_create_parameters: + title: Creation Parameters + description: |- + List of additional custom parameters that a back-end offers during the creation + of batch jobs (`POST /jobs`) and secondary web services (`POST /services`) respectively. + type: array + items: + $ref: '../../openapi.yaml#/components/schemas/parameter' + example: + - name: memory + description: Maximum amount of memory that will be allocated for processing, in gigabytes. + optional: true + default: 32 + schema: + type: integer + minimum: 1 + securitySchemes: + Bearer: + $ref: '../../openapi.yaml#/components/securitySchemes/Bearer' diff --git a/extensions/remote-process-definition/README.md b/extensions/remote-process-definition/README.md new file mode 100644 index 00000000..17046f9e --- /dev/null +++ b/extensions/remote-process-definition/README.md @@ -0,0 +1,71 @@ +# Remote Process Definition Extension + +The openEO API is a specification for interoperable cloud-based processing of large Earth observation datasets. + +This extension enables user to load user-defined processes that are hosted external to the openEO API (e.g., GitHub or cloud storage) through the process namespace into process graphs. + +- Version: **0.1.0** +- Stability: **experimental** +- Conformance class: `https://api.openeo.org/extensions/remote-process-definition/0.1.0` + +## Justification + +The openEO API defines the `namespace` property in a process node of a process graph as follows: + +> The following options are predefined by the openEO API, but additional namespaces may be introduced by back-ends or in a future version of the API. +> +> - `null` [...] +> - `backend` [...] +> - `user` [...] + +This makes it possible for this extension to add additional allowed values to the `namespace` property. + +## Specification + +This extension extends the `namespace` property of process graph nodes so that it accepts **absolute** URL with the protocols `https` (**recommended**) and `http` (discouraged). The URLs specified MUST return one of the following two options: + +1. A single process, compatible\* to the endpoint `GET /process_graphs/{process_graph_id}`. + In this case, the `id` property of the process graph node MUST be equal to the `id` of the process, + otherwise a `ProcessNamespaceInvalid` error is thrown +2. A list of processes, compatible\* to the endpoint `GET /process_graphs`. + In this case, the `id` property of the process graph node is used to identify the process from the list. + If not found a `ProcessNamespaceInvalid` error is thrown + +\* Compatible means in this context that the requests and responses must comply to the openEO API specification with the following exceptions: + +- User credentials / tokens that are obtained through the openEO API MUST NOT not be sent to URIs that are external to the openEO API. + The requirement to provide an `Authorization` header for the respective endpoints doesn't apply. +- For a list of processes, the full process description MUST be provided for the process with the given ID within the first request. + This means that the recommendation to omit large roperties such as `process_graph` doesn't apply. + It also requires that the requester doesn't need to paginate through additional pages to find the process with the given ID. + Ideally, the list of processes is not paginated as otherwise the process with the given ID may move to other pages over time. + +### Client Considerations + +If a client is conncected to a specific back-end, the client MUST only offer this functionality to users if the conformance class of this extension is listed in the `conformsTo` property of the `GET /` endpoint. + +The protocol `http` is discouraged for URLs as web-based clients may not be able to retrieve HTTP URLs from a HTTPS context. +For the same reason it is also RECOMMENDED to enable CORS for all URLs. + +### Error Handling + +The following error SHOULD be reported if the namespace can't be resolved: + +- Code: `ProcessNamespaceInvalid` +- Message: `The value passed for namespace '{namespace}' in process '{process}' is invalid: {reason}` +- HTTP Status Code: 400 + +## Example + +An exemplary process graph node: + +```json +{ + "process_id": "echo", + "namespace": "https://openeo.example/processes/echo", + "arguments": { + "message": "Hello World" + }, + "result": true +} +``` diff --git a/extensions/workspaces/README.md b/extensions/workspaces/README.md new file mode 100644 index 00000000..d512830a --- /dev/null +++ b/extensions/workspaces/README.md @@ -0,0 +1,13 @@ +# Workspaces Extension + +The Workspace Extension to the openEO API provides an interface for connecting external file storage such as cloud buckets to openEO back-end implementations. This allows for example to store batch job results on such file storage systems. + +- Version: **0.1.0** +- Stability: **experimental** +- [OpenAPI document](openapi.yaml) +- Conformance class: `https://api.openeo.org/extensions/workspaces/0.1.0` + +**Note:** This document only documents the additions to the specification. +Extensions can not change or break existing behavior of the openEO API. + +The Workspace API is inspired by the [EOEPCA Workspace API](https://github.com/EOEPCA/rm-workspace-api) with regards to workspace management. diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml new file mode 100644 index 00000000..2b95d378 --- /dev/null +++ b/extensions/workspaces/openapi.yaml @@ -0,0 +1,438 @@ +openapi: 3.0.2 +info: + title: openEO API - Workspaces Extension + version: 0.1.0 + description: |- + The Workspace Extension to the openEO API provides an interface for connecting external file storage such as cloud buckets to openEO back-end implementations. This allows for example to store batch job results on such file storage systems. + + The Workspace API is inspired by the [EOEPCA Workspace API](https://github.com/EOEPCA/rm-workspace-api) with regards to workspace management. + contact: + name: openEO Consortium + url: 'https://openeo.org' + email: openeo.psc@uni-muenster.de + license: + name: Apache 2.0 + url: 'http://www.apache.org/licenses/LICENSE-2.0.html' +externalDocs: + url: https://github.com/Open-EO/openeo-api/blob/draft/extensions/workspaces/README.md +tags: + - name: Workspaces + description: Management of User Workspaces +servers: + - url: 'https://openeo.example/api/{version}' + description: >- + The URL of the API MAY freely be chosen by the back-end providers. The + path, including API versioning, is a *recommendation* only. Nevertheless, + all servers MUST support HTTPS as the authentication methods are not + secure with HTTP only! + variables: + version: + default: v1 + description: >- + API versioning is RECOMMENDED. As the openEO API is following + [SemVer](https://semver.org/) only the MAJOR part of the stable + version numbers (i.e. versions >= 1.0.0) SHOULD be used for API + versioning in the URL. The reason is that backward-incompatible + changes are usually introduced by major changes. Therefore, the + version number in the URL MUST not be used by the clients to detect + the version number of the API. Use the version number returned from + `GET /` instead. +paths: + /workspace_providers: + get: + summary: Supported workspace providers + operationId: list-workspace-providers + description: |- + Lists supported workspace providers such as Amazon S3, Google Cloud Storage or Azure Blob Storage. + The response is an object of all available workspace providers with their supported parameters, + e.g. credentials for registering an existing workspace. + + The parameters for the workspace provider MUST be defined upon creation + of a workspace and the workspace will be set up accordingly. + + Workspace provider names MUST be accepted in a *case insensitive* manner throughout the API. + tags: + - Workspaces + security: + - {} + - Bearer: [] + responses: + '200': + description: >- + An object with a map containing all workspace provider names as keys and an + object that defines supported parameters, e.g. credentials. + content: + application/json: + schema: + title: Workspace Providers + type: object + properties: + providers: + type: object + description: Map of supported workspace providers + additionalProperties: + x-additionalPropertiesName: Provider Name + title: Provider + type: object + required: + - parameters + properties: + title: + $ref: '../../openapi.yaml#/components/schemas/object_title' + description: + $ref: '../../openapi.yaml#/components/schemas/description' + deprecated: + $ref: '../../openapi.yaml#/components/schemas/deprecated' + experimental: + $ref: '../../openapi.yaml#/components/schemas/experimental' + intents: + type: array + minItems: 1 + items: + type: string + enum: + - create + - register + parameters: + title: Provider specific parameters + description: Map of supported parameters made available to the creator of the workspace. + type: object + additionalProperties: + $ref: '../../openapi.yaml#/components/schemas/resource_parameter' + links: + description: |- + Links related to this workspace provider, e.g. more information about the parameters. + + For relation types see the lists of + [common relation types in openEO](#section/API-Principles/Web-Linking). + type: array + items: + $ref: '../../openapi.yaml#/components/schemas/link' + example: + providers: + S3: + title: Amazon S3 + description: >- + Amazon S3 is a cloud storage service provided by Amazon Web Services. + It provides storage containers which are called buckets. + intents: + - create + - register + parameters: + aws_access_key_id: + description: AWS access key + type: string + aws_secret_access_key: + description: AWS secret key associated with the access key. + type: string + bucket_name: + description: Bucket name + type: string + links: [] + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + /workspaces: + get: + summary: List all workspaces + operationId: list-workspaces + description: |- + Lists all workspaces that have been added by a user. + + It is **strongly RECOMMENDED** to keep the response size small by + omitting all optional non-scalar values (i.e. arrays and objects) from objects in `workspaces`. + To get the full metadata for a workspace clients MUST request `GET /workspaces/{workspace_id}`. + tags: + - Workspaces + security: + - Bearer: [] + parameters: + - $ref: '../../openapi.yaml#/components/parameters/pagination_limit' + responses: + '200': + description: Array of workspace descriptions + content: + application/json: + schema: + title: Workspaces + type: object + required: + - workspaces + - links + properties: + workspaces: + type: array + items: + $ref: '#/components/schemas/workspace' + links: + $ref: '../../openapi.yaml#/components/schemas/links_pagination' + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + post: + summary: Create Workspace + operationId: create-workspace + description: |- + Creates a new workspace. + + This request queues the creation of a workspace. It directly registers an id at the back-end, but the workspace itself may have a status of `provisioning` until the workspace is ready to use. + tags: + - Workspaces + security: + - Bearer: [] + requestBody: + content: + application/json: + schema: + type: object + required: + - intent + properties: + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' + intent: + type: string + quota: + $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' + oneOf: + - $ref: '#/components/schemas/create_workspace' + - $ref: '#/components/schemas/register_workspace' + discriminator: + propertyName: intent + mapping: + create: '#/components/schemas/create_workspace' + register: '#/components/schemas/register_workspace' + responses: + '201': + description: The workspace creation has been queued successfully. + headers: + Location: + required: true + schema: + description: |- + Absolute URL to the workspace metadata. + + The URL points to the endpoint + `GET /workspaces/{workspace_id}` with the `{workspace_id}` being the + id of the created workspace. + format: uri + type: string + example: 'https://openeo.example/api/v1/workspaces/my-workspace' + OpenEO-Identifier: + required: true + schema: + $ref: '#/components/schemas/workspace_id' + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + /workspaces/{workspace_id}: + parameters: + - $ref: '#/components/parameters/workspace_id' + get: + summary: Full metadata for a workspace + operationId: describe-workspace + description: >- + Returns the full metadata for a workspace. + tags: + - Workspaces + security: + - Bearer: [] + responses: + '200': + description: Successful Response + content: + application/json: + schema: + $ref: '#/components/schemas/workspace' + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + delete: + summary: Delete Workspace + operationId: delete-workspace + description: |- + Removes the workspace from the back-end. + tags: + - Workspaces + security: + - Bearer: [] + responses: + '204': + description: The workspace has been successfully deleted. + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + patch: + summary: Update workspace details + operationId: update-workspace + description: >- + Updates the workspace details. + tags: + - Workspaces + security: + - Bearer: [] + requestBody: + content: + application/json: + schema: + type: object + properties: + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' + required: true + responses: + '204': + description: Changes to the workspace were applied successfully. + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' +components: + parameters: + workspace_id: + name: workspace_id + in: path + required: true + description: The ID of the workspace. + schema: + $ref: '#/components/schemas/workspace_id' + schemas: + workspace_id: + type: string + pattern: '^[\w\-\.~]+$' + example: my-workspace + workspace_title: + type: string + description: A short title for the workspace. + workspace_description: + type: string + format: commonmark + description: |- + A description that describes the workspace. + + [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich + text representation. + workspace: + title: Workspace + required: + - id + - status + - type + type: object + properties: + id: + $ref: '#/components/schemas/workspace_id' + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' + type: + type: string + description: >- + The workspace provider name as defined in `GET /workspace_providers`. + example: S3 + status: + type: string + description: The status of the workspace. + example: ready + details: + type: string + description: >- + A status message (e.g. error message) or any other free-text information about the workspace. + quota: + $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' + oneOf: + - title: Unavailable + description: + The workspace is not available, e.g. because it's still provisioning it + or the back-end can't connect to it / lost the connection / has been deleted externally, ... + properties: + status: + enum: + - provisioning + - unavailable + example: provisioning + - title: Ready + properties: + status: + enum: + - ready + example: ready + url: + $ref: '#/components/schemas/workspace_url' + properties: + $ref: '#/components/schemas/workspace_properties' + free: + $ref: '../../openapi.yaml#/components/schemas/storage_quota_free' + workspace_url: + type: string + format: uri + description: The URL of the actual workspace, e.g. a bucket URL. + example: 'https://my-bucket.s3.eu-west-3.amazonaws.com' + workspace_parameters: + type: object + description: >- + Additional parameters to register the workspace as defined in `GET /workspace_providers`. + The structure is not specified by the API. + additionalProperties: + description: Any type + example: + aws_access_key_id: AKIAI0A0FAKE0EXAMPLE + aws_secret_access_key: TheKey1CorrespondingtoAccessKey. + bucket_name: my-bucket123 + workspace_properties: + type: object + description: >- + Any additional metadata of the workspace provided by the workspace provider. + The structure is not specified by the API. + additionalProperties: + description: Any type + example: + region: eu-west-3 + storage_class: standard + create_workspace: + title: Create workspace + properties: + intent: + enum: + - create + example: create + type: + type: string + nullable: true + description: >- + The workspace provider name as defined in `GET /workspace_providers`. + If not provided or `null`, the back-end chooses a default provider. + default: null + parameters: + $ref: '#/components/schemas/workspace_parameters' + register_workspace: + required: + - type + - url + - parameters + properties: + intent: + enum: + - register + example: register + type: + type: string + description: >- + The workspace provider name as defined in `GET /workspace_providers`. + url: + $ref: '#/components/schemas/workspace_url' + parameters: + $ref: '#/components/schemas/workspace_parameters' + securitySchemes: + Bearer: + $ref: '../../openapi.yaml#/components/securitySchemes/Bearer' diff --git a/openapi.yaml b/openapi.yaml index aafd67fc..d880c613 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.2 info: title: openEO API - version: 1.2.0 + version: 1.3.0 description: |- The openEO API specification for interoperable cloud-based processing of large Earth observation datasets. - **Conformance class:** `https://api.openeo.org/1.2.0` + **Conformance class:** `https://api.openeo.org/1.3.0` # API Principles @@ -13,21 +13,21 @@ info: In the specification the key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC 2119](https://www.rfc-editor.org/rfc/rfc2119.html) and [RFC 8174](https://www.rfc-editor.org/rfc/rfc8174.html). - ## Casing + ## Literal Case Unless otherwise stated the API works **case sensitive**. - All names SHOULD be written in snake case, i.e. words are separated with one underscore character (`_`) and no spaces, with all letters lower-cased. Example: `hello_world`. This applies particularly to endpoints and JSON property names. HTTP header fields are generally case-insensitive according to [RFC 7230](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2) and in the specification we follow their respective casing conventions, e.g. `Content-Type` or `OpenEO-Costs`, for better readability and consistency. + All names SHOULD be written in snake case, i.e. words are separated with one underscore character (`_`) and no spaces, with all letters lower-cased. Example: `hello_world`. This applies particularly to endpoints and JSON property names. HTTP header fields are generally case-insensitive according to [RFC 7230](https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2) and their respective casing conventions are followed, e.g. `Content-Type` or `OpenEO-Costs`, for better readability and consistency. ## HTTP / REST - This uses [HTTP REST](https://en.wikipedia.org/wiki/Representational_state_transfer) [Level 2](https://martinfowler.com/articles/richardsonMaturityModel.html#level2) for communication between client and back-end server. + This specification uses [HTTP REST](https://en.wikipedia.org/wiki/Representational_state_transfer) [Level 2](https://martinfowler.com/articles/richardsonMaturityModel.html#level2) for communication between client and back-end server. - Public APIs MUST be available via HTTPS only. + Public API implementations MUST be available via HTTPS only. - Endpoints are made use meaningful HTTP verbs (e.g. GET, POST, PUT, PATCH, DELETE) whenever technically possible. If there is a need to transfer big chunks of data for a GET requests to the back-end, POST requests MAY be used as a replacement as they support to send data via request body. Unless otherwise stated, PATCH requests are only defined to work on direct (first-level) children of the full JSON object. Therefore, changing a property on a deeper level of the full JSON object always requires to send the whole JSON object defined by the first-level property. + Endpoints are made use meaningful HTTP verbs (e.g. GET, POST, PUT, PATCH, DELETE) whenever technically possible. If there is a need to transfer big chunks of data for a GET requests to the back-end, POST requests MAY be used as a replacement as they support to send data via request body. Unless otherwise stated, PATCH requests are only defined to work on direct (first level) children of the full JSON object. Therefore, changing a property on a deeper level of the full JSON object always requires sending the whole JSON object defined by the first-level property. - Naming of endpoints follow the REST principles. Therefore, endpoints are centered around resources. Resource identifiers MUST be named with a noun in plural form except for single actions that can not be modelled with the regular HTTP verbs. Single actions MUST be single endpoints with a single HTTP verb (POST is RECOMMENDED) and no other endpoints beneath it. + Naming rules of the API endpoints follow the REST principles. Therefore, endpoints are centered around resources. Resource identifiers MUST be named with a noun in plural form except for single actions that can not be modelled with the regular HTTP verbs. Single actions MUST be single endpoints with a single HTTP verb (POST is RECOMMENDED) and no other endpoints beneath it. The openEO API makes use of [HTTP Content Negotiation](https://www.rfc-editor.org/rfc/rfc9110.html#name-content-negotiation), including, but not limited to, the request headers `Accept`, `Accept-Charset` and `Accept-Language`. @@ -38,30 +38,30 @@ info: ### Charset - Services use [UTF-8](https://en.wikipedia.org/wiki/UTF-8) as the default charset if not negotiated otherwise with HTTP Content Negotiation ([`Accept-Charset` header](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-charset)). + If not negotiated otherwise with HTTP Content Negotiation ([`Accept-Charset` header](https://www.rfc-editor.org/rfc/rfc9110.html#name-accept-charset)), services use [UTF-8](https://en.wikipedia.org/wiki/UTF-8) as the default charset. ## Web Linking - The API is designed in a way that to most entities (e.g. collections and processes) a set of links can be added. These can be alternate representations, e.g. data discovery via OGC WCS or OGC CSW, references to a license, references to actual raw data for downloading, detailed information about pre-processing and more. Clients should allow users to follow the links. + The API is designed in a way that for most resources, such as collections and processes, a set of links can be added. These can be alternate representations such as data discovery via OGC WCS or OGC CSW, references to a license, references to actual raw data for downloading, detailed information about pre-processing and more. Clients should allow users to follow the links. Whenever links are utilized in the API, the description explains which relation (`rel` property) types are commonly used. A [list of standardized link relations types is provided by IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml) and the API tries to align whenever feasible. Some very common relation types - usually not mentioned explicitly in the description of `links` fields - are: - 1. `self`: which allows link to the location that the resource can be (permanently) found online.This is particularly useful when the data is data is made available offline, so that the downstream user knows where the data has come from. + 1. `self`: Refers to the location that the resource can be (permanently) found online. This is particularly useful when the data is made available offline, so that the downstream user knows the source of the data. 2. `alternate`: An alternative representation of the resource, may it be another metadata standard the data is available in or simply a human-readable version in HTML or PDF. - 3. `about`: A resource that is related or further explains the resource, e.g. a user guide. + 3. `about`: A resource that is related to or further explains the resource, e.g. a user guide. 4. `canonical`: This relation type usually points to a publicly accessible and more long-lived URL for a resource that otherwise often requires (Bearer) authentication with a short-lived token. - This way the the exposed resources can be used by non-openEO clients without additional authentication steps. + This way the exposed resources can be used by non-openEO clients without additional authentication steps. For example, a shared user-defined process or batch job results could be exposed via a canonical link. If a URL should be publicly available to everyone, it can simply a user-specific URL, e.g. `https://openeo.example/processes/john_doe/ndvi`. For resources that should only be accessible to a certain group of user, a signed URL could be given, e.g. `https://openeo.example/processes/81zjh1tc2pt52gbx/ndvi`. - Generally, it is RECOMMENDED to add descriptive titles (propertty `title`) and media type information (propertty `type`) for a better user experience. + Generally, it is RECOMMENDED adding descriptive titles (property `title`) and media type information (property `type`) for a better user experience. ## Error Handling @@ -92,7 +92,7 @@ info: * The `code` is either one of the [standardized textual openEO error codes](errors.json) or a proprietary error code. * The `message` explains the reason the server is rejecting the request. For "4xx" error codes the message explains how the client needs to modify the request. - By default the message MUST be sent in English language. Content Negotiation is used to localize the error messages: If an `Accept-Language` header is sent by the client and a translation is available, the message should be translated accordingly and the `Content-Language` header must be present in the response. See "[How to localize your API](http://apiux.com/2013/04/25/how-to-localize-your-api/)" for more information. + By default, the message MUST be in English. Content Negotiation is used to localize the error messages: If an `Accept-Language` header is sent by the client and a translation is available, the message should be translated accordingly, and the `Content-Language` header must be present in the response. See "[How to localize your API](http://apiux.com/2013/04/25/how-to-localize-your-api/)" for more information. * `url` is an OPTIONAL attribute and contains a link to a resource that is explaining the error and potential solutions in-depth. ### Standardized status codes @@ -108,7 +108,7 @@ info: - **204 No Content**: Indicates a successful request **without** a response body being sent. - The openEO API has some commonly used HTTP status codes for failed requests: + The openEO API reuses commonly used HTTP status codes for failed requests: - **400 Bad Request**: The back-end responds with this error code whenever the error has its origin on client side and no other HTTP status code in the 400 range is suitable. @@ -117,11 +117,11 @@ info: The client did not provide any authentication details for a resource requiring authentication or the provided authentication details are not correct. - **403 Forbidden**: - The client did provided correct authentication details, but the privileges/permissions of the provided credentials do not allow to request the resource. + The client did provide correct authentication details, but the privileges/permissions of the provided credentials do not allow requesting the resource. - **404 Not Found**: - The resource specified by the path does not exist, i.e. one of the resources belonging to the specified identifiers are not available at the back-end. - *Note:* Unsupported endpoints MAY also return HTTP status code 501. + The resource specified by the path does not exist. One of the resources belonging to the specified identifiers are not available at the back-end. + *Note:* Unsupported endpoints MAY also return an HTTP status code 501. - **500 Internal Server Error**: The error has its origin on server side and no other status code in the 500 range is suitable. @@ -131,13 +131,13 @@ info: *Note:* Unsupported endpoints MAY also return HTTP status code 404. - If a HTTP status code in the 400 range is returned, the client SHOULD NOT repeat the request without modifications. For HTTP status code in the 500 range, the client MAY repeat the same request later. + If a HTTP status code in the 400 range is returned, the client SHOULD modify the request and repeat the request. For HTTP status code in the 500 range, the client MAY repeat the same request later. All HTTP status codes defined in RFC 7231 in the 400 and 500 ranges can be used as openEO error code in addition to the most used status codes mentioned here. Responding with openEO error codes 400 and 500 SHOULD be avoided in favor of any more specific standardized or proprietary openEO error code. ## Temporal data - Date, time, intervals and durations are formatted based on ISO 8601 or its profile [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) whenever there is an appropriate encoding available in the standard. All temporal data are specified based on the Gregorian calendar. + Date, time, time intervals, and durations are formatted based on [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) or its profile [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) whenever there is an appropriate encoding available in the standard. All temporal data are specified based on the Gregorian calendar. # Authentication @@ -151,19 +151,19 @@ info: - **Note:** Although it is possible to request several public endpoints for capabilities and discovery that don't require authorization, it is RECOMMENDED that clients (re-)request the public endpoints that support Bearer authentication with the Bearer token once available to also retrieve any private data that is made available specifically for the authenticated user. + **Note:** Although it is possible to request several public endpoints for capabilities and discovery that do not require authorization, it is RECOMMENDED that clients (re-)request the public endpoints that support Bearer authentication with the Bearer token once available to also retrieve any private data that is made available specifically for the authenticated user. This may require that clients clear any cached data they retrieved from public endpoints before. # Cross-Origin Resource Sharing (CORS) > Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources [...] on a web page to be requested from another domain outside the domain from which the first resource was served. [...] - > CORS defines a way in which a browser and server can interact to determine whether or not it is safe to allow the cross-origin request. It allows for more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests. + > CORS defines a way in which a browser and server can interact to determine whether it is safe to allow the cross-origin request. This allows for more freedom and functionality than purely same-origin requests, but is more secure than simply allowing all cross-origin requests. Source: [https://en.wikipedia.org/wiki/Cross-origin_resource_sharing](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing) - openEO-based back-ends are usually hosted on a different domain / host than the client that is requesting data from the back-end. Therefore most requests to the back-end are blocked by all modern browsers. This leads to the problem that the JavaScript library and any browser-based application can't access back-ends. Therefore, all back-end providers SHOULD support CORS to enable browser-based applications to access back-ends. [CORS is a recommendation of the W3C organization](https://www.w3.org/TR/cors/). The following chapters will explain how back-end providers can implement CORS support. + openEO-based back-ends are usually hosted on a different domain / host than the client that is requesting data from the back-end. Therefore, most requests to the back-end are blocked by all modern browsers. This leads to the problem that the JavaScript library and any browser-based application can not access back-ends. Therefore, all back-end providers SHOULD support CORS to enable browser-based applications to access back-ends. [CORS is a recommendation of the W3C organization](https://www.w3.org/TR/2020/SPSD-cors-20200602/). The following chapters explain how back-end providers can implement CORS support. - **Tip**: Most servers can send the required headers and the responses to the OPTIONS requests automatically for all endpoints. Otherwise you may also use a proxy server to add the headers and OPTIONS responses. + **Tip**: Most servers can send the required headers and the responses to the OPTIONS requests automatically for all endpoints. Otherwise, a proxy server may be used to add the headers and OPTIONS responses. ## CORS headers @@ -171,8 +171,8 @@ info: | Name | Description | Example | | -------------------------------- | ------------------------------------------------------------ | ------- | - | Access-Control-Allow-Origin | Allowed origin for the request, including protocol, host and port or `*` for all origins. It is RECOMMENDED to return the value `*` to allow requests from browser-based implementations such as the Web Editor. | `*` | - | Access-Control-Expose-Headers | Some endpoints require to send additional HTTP response headers such as `OpenEO-Identifier` and `Location`. To make these headers available to browser-based clients, they MUST be white-listed with this CORS header. The following HTTP headers are white-listed by browsers and MUST NOT be included: `Cache-Control`, `Content-Language`, `Content-Length`, `Content-Type`, `Expires`, `Last-Modified` and `Pragma`. At least the following headers MUST be listed in this version of the openEO API: `Link`, `Location`, `OpenEO-Costs` and `OpenEO-Identifier`. | `Link, Location, OpenEO-Costs, OpenEO-Identifier` | + | Access-Control-Allow-Origin | Allowed origin for the request, including protocol, host and port or `*` for all origins. Returning the value `*` to allow requests from browser-based implementations is RECOMMENDED. | `*` | + | Access-Control-Expose-Headers | Some endpoints require sending additional HTTP response headers such as `OpenEO-Identifier` and `Location`. To make these headers available to browser-based clients, they MUST be white-listed with this CORS header. The following HTTP headers are white-listed by browsers and MUST NOT be included: `Cache-Control`, `Content-Language`, `Content-Length`, `Content-Type`, `Expires`, `Last-Modified` and `Pragma`. At least the following headers MUST be listed in this version of the openEO API: `Link`, `Location`, `OpenEO-Costs` and `OpenEO-Identifier`. | `Link, Location, OpenEO-Costs, OpenEO-Identifier` | @@ -200,7 +200,7 @@ info: ## OPTIONS method - All endpoints must respond to the `OPTIONS` HTTP method. This is a response for the preflight requests made by web browsers before sending the actual request (e.g. `POST /jobs`). It needs to respond with a status code of `204` and no response body. + All endpoints defined in the API specification must additionally respond to the `OPTIONS` HTTP method. This is a response for the preflight requests made by web browsers before sending the actual request (e.g. `POST /jobs`). It needs to respond with a status code of `204` and no response body. **In addition** to the HTTP headers shown in the table above, the following HTTP headers MUST be included with every response to an `OPTIONS` request: | Name | Description | Example | @@ -323,10 +323,14 @@ info: ``` A process node MUST always contain key-value-pairs named `process_id` and `arguments`. It MAY contain a `description`. - One of the nodes in a map of processes (the final one) MUST have the `result` flag set to `true`, all the other nodes can omit it as the default value is `false`. Having such a node is important as multiple end nodes are possible, but in most use cases it is important to exactly specify the return value to be used by other processes. Each child process graph must also specify a result node similar to the "main" process graph. - `process_id` MUST be a valid process ID in the `namespace` given. Clients SHOULD warn the user if a user-defined process is added with the same identifier as one of the predefined process. + In the following, "end node" (also known as "leaf node") defines a node that is not referenced by any other node in the same process graph. The "root process graph" is the outermost process graph, which is not part of any other process graph. + + A "result node" is a node (often an end node, but that's not required) that defines the return value of the process graph and has the `result` flag set to `true`. Exactly one of the nodes in a map of processes MUST have the `result` flag set to `true`, all the other nodes can omit it as the default value is `false`. Each child process graph MUST specify its own result node. The root process graph MUST also specify a result node although not strictly needed in all use cases. + + Having a result node is important as multiple end nodes are possible and in many use cases it is important to identify a specific return value for the process graph that is passed to other processes. The result node is not necessarily an end node. + ### Arguments A process can have an arbitrary number of arguments. Their name and value are specified @@ -437,7 +441,7 @@ info: ### Full example for an EVI computation - Deriving minimum EVI (Enhanced Vegetation Index) measurements over pixel time series of Sentinel 2 imagery. The main process graph in blue, child process graphs in yellow: + Deriving minimum EVI (Enhanced Vegetation Index) measurements over pixel time series of Sentinel-2 imagery. The root process graph in blue, child process graphs in yellow: ![Graph with processing instructions](assets/pg-evi-example.png) @@ -451,7 +455,7 @@ info: 2. A more dynamic way of processing and accessing data is to create a **secondary web service**. They allow web-based access using different protocols such as [OGC WMS](http://www.opengeospatial.org/standards/wms), [OGC WCS](http://www.opengeospatial.org/standards/wcs), [OGC API - Features](https://www.ogc.org/standards/ogcapi-features) or [XYZ tiles](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames). Some protocols such as the OGC WMS or XYZ tiles allow users to change the viewing extent or level of detail (zoom level). Therefore, computations often run *on demand* so that the requested data is calculated during the request. Back-ends should make sure to cache processed data to avoid additional/high costs and reduce waiting times for the user. - 3. Processes can also be executed **on-demand** (i.e. synchronously). Results are delivered with the request itself and no job is created. Only lightweight computations, for example previews, should be executed using this approach as timeouts are to be expected for [long-polling HTTP requests](https://www.pubnub.com/blog/2014-12-01-http-long-polling/). + 3. Processes can also be executed **on-demand** (i.e. synchronously). Results are delivered with the request itself and no job is created. Only lightweight computations, for example previews, should be executed using this approach as timeouts are to be expected for [long-polling HTTP requests](https://www.pubnub.com/guides/long-polling/). ### Validation @@ -473,7 +477,7 @@ info: Please be aware that the result node (`result` set to `true`) is not necessarily the last node that is executed. The author of the process graph may choose to set a non-end node to the result node! contact: - name: openEO Consortium + name: openEO Project Steering Committee url: 'https://openeo.org' email: openeo.psc@uni-muenster.de license: @@ -484,7 +488,7 @@ externalDocs: url: 'https://openeo.org/documentation/1.0/' tags: - name: Capabilities - description: General information about the API implementation and other supported capabilities at the back-end. + description: General information about the API implementation and other supported capabilities provided by the back-end. - name: Account Management description: |- The following endpoints handle user profiles, accounting and authentication. See also [Authentication](#section/Authentication). In general, the openEO API only defines a minimum subset of user management and accounting functionality. It allows to @@ -510,22 +514,27 @@ tags: ## STAC - For data discovery of Earth Observation Collections at the back-ends, openEO strives for compatibility with the specifications [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) and [OGC API - Features - Part 1: Core](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) as far as possible. Implementing the data discovery endpoints of openEO also produced valid STAC API 1.0 and OGC API - Features 1.0 responses, including ([partial](#provide-data-for-download)) compatibility with their APIs. + For data discovery of Earth Observation Collections at the back-ends, openEO strives for compatibility with the specifications [SpatioTemporal Asset Catalog (STAC)](https://stacspec.org/) and [OGC API - Features - Part 1: Core](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html) as far as possible. Implementing the data discovery endpoints of openEO also produces valid STAC API 1.x and OGC API - Features 1.x responses, including ([partial](#provide-data-for-download)) compatibility with their APIs. The data discovery endpoints `GET /collections` and `GET /collections/{collection_id}` are compatible with OGC API - Features and STAC. Both specifications define additional endpoints that need to be implemented to be fully compatible. The additional endpoints can easily be integrated into an openEO API implementation. A rough list of actions for compatibility is available below, but please refer to their specifications to find out the full details. - **Important:** [STAC specification](https://github.com/radiantearth/stac-spec) and [STAC API](https://github.com/radiantearth/stac-api-spec) are different specifications and have different version numbers after version 0.9.0. - The openEO API implements STAC API versions >= 0.9.0 (preferrably [STAC API version 1.0.0](https://github.com/radiantearth/stac-api-spec/blob/v1.0.0/README.md), but [0.9.0](https://github.com/radiantearth/stac-spec/blob/v0.9.0/api-spec/README.md) is allowed for backward compatibility), which allows to serve all STAC specification versions in the range of 0.9.x and 1.x.x (see the `stac_version` property). + **Important:** [STAC specification](https://github.com/radiantearth/stac-spec) and [STAC API](https://github.com/radiantearth/stac-api-spec) are different specifications and have different version numbers. + + The openEO API allows for the + - STAC versions 1.x.x (RECOMMENDED) and 0.9.x (DEPRECATED), and + - STAC API versions 1.x.x (RECOMMENDED) and 0.9.x (DEPRECATED). ### Content Extensions STAC has several [extensions](https://stac-extensions.github.io) that can be used to better describe your data. Clients and server are not required to implement all of them, so be aware that some clients may not be able to read all your metadata. Some commonly used extensions that are relevant for datasets exposed through the openEO API are: - - - Data Cube extension (part of the openEO API) + + - [Classification extension](https://github.com/stac-extensions/classification) + - [Data Cube extension](https://github.com/stac-extensions/datacube) (part of the openEO API) - [EO (Electro-Optical) extension](https://github.com/stac-extensions/eo) - [Processing extension](https://github.com/stac-extensions/processing) + - [Projection extension](https://github.com/stac-extensions/projection) - [Raster extension](https://github.com/stac-extensions/raster) - [SAR extension](https://github.com/stac-extensions/sar) - [Satellite extension](https://github.com/stac-extensions/sat) @@ -533,14 +542,14 @@ tags: ### Provide data for download - If you'd like to provide your data for download in addition to offering the cloud processing service, you can implement the full STAC API. Therefore you can implement the endpoints `GET /collections/{collection_id}/items` and `GET /collections/{collection_id}/items/{feature_id}` to support retrieval of individual items. To benefit from the STAC ecosystem and allow searching for items you can also implement `POST /search` and `GET /search`. Further information can be found in the [STAC API repository](https://github.com/radiantearth/stac-spec/tree/v0.9.0/api-spec). + If you'd like to provide your data for download in addition to offering the cloud processing service, you can implement the full STAC API. Therefore, you can implement the endpoints `GET /collections/{collection_id}/items` and `GET /collections/{collection_id}/items/{feature_id}` to support retrieval of individual items. To benefit from the STAC ecosystem and allow searching for items you can also implement `POST /search` and `GET /search`. Further information can be found in the [STAC API repository](https://github.com/radiantearth/stac-api-spec). ### API Extensions STAC API has several [extensions](https://stac-api-extensions.github.io) that can be implemented on top of the openEO API to enrich the API functionality, e.g. for searching. - name: Process Discovery description: |- - These endpoints allow to list the predefined processes that are available at the back-end. To list user-defined processes see '[User-Defined Processes](#tag/User-Defined-Processes)'. + The process discovery endpoints provide details about the predefined processes that are available at the back-end. To list user-defined processes see '[User-Defined Processes](#tag/User-Defined-Processes)'. - name: User-Defined Processes description: These endpoints allow to store and manage user-defined processes with their process graphs at the back-end. - name: Data Processing @@ -609,16 +618,18 @@ paths: - api_version - backend_version - stac_version + - conformsTo + - type - endpoints - links properties: api_version: type: string description: >- - Version number of the openEO specification this back-end + Version number of the openEO API specification the back-end implements. enum: - - 1.2.0 + - 1.3.0 backend_version: type: string description: >- @@ -633,8 +644,6 @@ paths: type: string enum: - Catalog - description: >- - For STAC versions >= 1.0.0-rc.1 this field is required. example: Catalog id: type: string @@ -738,7 +747,7 @@ paths: billing related API functionalities, e.g. budgeting or estimates. - The absence of this property doesn't mean the back-end is + The absence of this property does not mean the back-end is necessarily free to use for all. Providers may choose to bill users outside of the API, e.g. with a monthly fee that is not depending on individual API interactions. @@ -753,7 +762,7 @@ paths: ISO-4217 or a back-end specific unit that is used for billing such as credits, tiles or CPU hours. If set to `null`, budget and costs are not supported - by the back-end and users can't be charged. + by the back-end and users can not be charged. type: string nullable: true example: USD @@ -873,6 +882,11 @@ paths: recover a user account (e.g. to reset the password or send a reminder about the username to the user's email account). + 9. `web-editor`: A link to an openEO Web Editor instance. + This allows clients to open a Web Editor for other tasks. + It may be accompanied with a `version` flag in the link + to allow feature-detection for certain Web Editor functionalities. + For additional relation types see also the lists of [common relation types in openEO](#section/API-Principles/Web-Linking). type: array @@ -911,6 +925,11 @@ paths: rel: data type: application/json title: List of Datasets + - href: 'https://editor.openeo.org' + rel: web-editor + type: text/html + title: openEO Web Editor + version: '0.14.0' 4XX: $ref: '#/components/responses/client_error' 5XX: @@ -947,7 +966,7 @@ paths: path. Make sure to correctly handle leading/trailing slashes. 3. Send a request to the new URI. A. On success: Detect the most suitable API instance/version (see above) - and read the [capabilites](#tag/Capabilities/operation/capabilities) + and read the [capabilities](#tag/Capabilities/operation/capabilities) from there. B. On failure: Directly try to read the capabilities from the original URI given by the user. @@ -1010,9 +1029,9 @@ paths: example: versions: - url: 'https://openeo.example/api/v0' - api_version: 0.5.1 + api_version: 0.4.2 - url: 'https://openeo.example/api/v1' - api_version: 1.2.0 + api_version: 1.3.0 - url: 'https://dev.openeo.example/api/v2' production: false api_version: 2.0.0-beta @@ -1042,15 +1061,15 @@ paths: formats not available through GDAL may be defined centrally for openEO. Custom file formats or parameters MAY be defined. - The format descriptions must describe how the file formats relate to - data cubes. Input file formats must describe how the files have to be - structured to be transformed into data cubes. Output file formats must + The format descriptions MUST describe how the file formats relate to + data cubes. Input file formats MUST describe how the files have to be + structured to be transformed into data cubes. Output file formats MUST describe how the data cubes are stored at the back-end and how the resulting file structure looks like. Back-ends MUST NOT support aliases, for example it is not allowed to support `geotiff` instead of `gtiff`. Nevertheless, openEO Clients MAY - translate user input input for convenience (e.g. translate `geotiff` to + translate user input for convenience (e.g. translate `geotiff` to `gtiff`). Also, for a better user experience the back-end can specify a `title`. @@ -1102,7 +1121,7 @@ paths: output: GTiff: title: GeoTiff - description: Export to GeoTiff. Doesn't support cloud-optimized GeoTiffs (COGs) yet. + description: Export to GeoTiff. Does not support cloud-optimized GeoTiffs (COGs) yet. gis_data_types: - raster parameters: @@ -1188,12 +1207,12 @@ paths: description: |- Lists all conformance classes specified in various standards that the implementation conforms to. Conformance classes are commonly used in - all OGC APIs and the STAC API specification. openEO adds relatively + all OGC API standards and the STAC API specification. openEO adds relatively broadly defined conformance classes, especially for the extensions. Otherwise, the implemented functionality can usually be retrieved from - the [capabilties](#tag/Capabilities/operation/capabilities) in openEO. + the [capabilities](#tag/Capabilities/operation/capabilities) in openEO. - The general openEO conformance class is `https://api.openeo.org/1.2.0`. + The general openEO conformance class is `https://api.openeo.org/1.3.0`. See the individual openEO API extensions for their conformance classes. The conformance classes listed at this endpoint and listed in the @@ -1201,9 +1220,12 @@ paths: More details: - [STAC API](https://github.com/radiantearth/stac-api-spec), especially the conformance class "STAC API - Collections" - - [OGC APIs](https://ogcapi.ogc.org/) + - [OGC API standards](https://ogcapi.ogc.org/) tags: - Capabilities + security: + - {} + - Bearer: [] responses: '200': description: The URIs of all conformance classes supported by the server. @@ -1217,6 +1239,8 @@ paths: properties: conformsTo: $ref: '#/components/schemas/conformsTo' + 4XX: + $ref: '#/components/responses/client_error' 5XX: $ref: '#/components/responses/server_error' /collections: @@ -1232,7 +1256,7 @@ paths: To get the full metadata for a collection clients MUST request `GET /collections/{collection_id}`. - This endpoint is compatible with [STAC API 0.9.0 and later](https://stacspec.org) and + This endpoint is compatible with [STAC API 1.0.0 and later](https://stacspec.org) and [OGC API - Features 1.0](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html). [STAC API extensions](https://stac-api-extensions.github.io) and [STAC extensions](https://stac-extensions.github.io) @@ -1362,7 +1386,7 @@ paths: Lists **all** information about a specific collection specified by the identifier `collection_id`. - This endpoint is compatible with [STAC API 0.9.0 and later](https://stacspec.org) and + This endpoint is compatible with [STAC API 1.0.0 and later](https://stacspec.org) and [OGC API - Features 1.0](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html). [STAC API extensions](https://stac-api-extensions.github.io) and [STAC extensions](https://stac-extensions.github.io) @@ -1581,7 +1605,7 @@ paths: Lists **all** supported metadata filters (also called "queryables") for a specific collection. - This endpoint is compatible with endpoint defined in the STAC API extension + This endpoint is compatible with the endpoint defined in the STAC API extension [`filter`](https://github.com/stac-api-extensions/filter#queryables) and [OGC API - Features - Part 3: Filtering](https://github.com/opengeospatial/ogcapi-features/tree/master/extensions/filtering). For a precise definition please follow those specifications. @@ -1614,7 +1638,7 @@ paths: $schema: https://json-schema.org/draft/2019-09/schema $id: https://openeo.example/api/v1/collections/Sentinel-2A/queryables type: object - title: Sentinel 2A + title: Sentinel-2A properties: 'eo:cloud_cover': title: Cloud Cover @@ -1660,6 +1684,17 @@ paths: - processes - links properties: + version: + type: string + nullable: true + description: >- + Version number of the openEO process specification this back-end + targets. + If not provided or `null`, the version is either unknown or multiple versions are implemented. + Clients must be able to handle multiple process specification versions at the same time. + + This is **not** the openEO API specification version. + example: 2.0.0 processes: type: array items: @@ -1799,6 +1834,7 @@ paths: * For programming langauge environments use the names as provided in in the [Scriptol List of Programming Languages](https://www.scriptol.com/programming/list-programming-languages.php). * For docker images use the docker image identifier excluding the registry path. + minProperties: 1 additionalProperties: x-additionalPropertiesName: UDF Runtime name allOf: @@ -1873,18 +1909,7 @@ paths: openEO clients MUST use the **access token** as part of the Bearer token for authorization in subsequent API calls (see also the information about Bearer tokens in this document). Clients MUST NOT use the id token - or the authorization code. The access token provided by an OpenID Connect - Provider does not necessarily provide information about the issuer (i.e. the - OpenID Connect provider) and therefore a prefix MUST be added to the Bearer - Token sent in subsequent API calls to protected endpoints. The Bearer - Token sent to protected endpoints MUST consist of the authentication - method (here `oidc`), the provider ID and the access token itself. All - separated by a forward slash `/`. The provider ID corresponds to the - value specified for `id` for each provider in the response body of this - endpoint. The header in subsequent API calls for a provider with `id` - `ms` would look as follows: `Authorization: Bearer oidc/ms/TOKEN` - (replace `TOKEN` with the actual access token received from the OpenID - Connect Provider). + or the authorization code. Back-ends MAY request user information ([including Claims](https://openid.net/specs/openid-connect-core-1_0.html#Claims)) from the [OpenID Connect Userinfo endpoint](https://openid.net/specs/openid-connect-core-1_0.html#UserInfo) @@ -1897,7 +1922,7 @@ paths: - {} responses: '200': - description: Lists the the OpenID Connect Providers. + description: Lists the OpenID Connect Providers. content: application/json: schema: @@ -1911,7 +1936,7 @@ paths: description: >- The first provider in this list is the default provider for authentication. Clients can either pre-select or directly use the default provider for authentication - if the user doesn't specify a specific value. + if the user does not specify a specific value. minItems: 1 items: title: OpenID Connect Provider @@ -1923,14 +1948,15 @@ paths: properties: id: type: string - description: >- - A per-backend **unique** identifier for the OpenID Connect Provider to - be as prefix for the Bearer token. + description: |- + A per-back-end **unique** identifier for the OpenID Connect provider. + + Is used as prefix for the openEO token. pattern: '[\d\w]{1,20}' issuer: type: string format: uri - description: >- + description: |- The [issuer location](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig) (also referred to as 'authority' in some client libraries) is the URL of the OpenID Connect provider, which conforms to a set of rules: @@ -1944,7 +1970,6 @@ paths: OpenID Connect. 2. The URL MUST NOT contain a terminating forward slash `/`. - example: 'https://accounts.google.com' scopes: type: array @@ -1988,7 +2013,7 @@ paths: As such, openEO clients SHOULD NOT store or cache default OpenID Connect client information for long term usage. A default OpenID Connect client is intended to simplify authentication for novice users. - For production use cases, it is RECOMMENDED to set up a dedicated OpenID Connect client. + Setting up a dedicated OpenID Connect client is RECOMMENDED for production-ready back-ends. uniqueItems: true items: title: Default OpenID Connect Client @@ -2035,6 +2060,15 @@ paths: items: type: string format: uri + authorization_parameters: + type: object + description: |- + Additional parameters that an openEO client MUST include when requesting the authorization endpoint. + This can be used to enforce specific + [request parameters such as `prompt`](https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest). + example: + prompt: consent + access_type: offline links: type: array description: |- @@ -2073,6 +2107,8 @@ paths: - profile - email - earthengine + authorization_parameters: + access_type: offline - id: ms issuer: 'https://login.microsoftonline.com/example-tenant/v2.0' title: Microsoft @@ -2086,11 +2122,10 @@ paths: get: summary: HTTP Basic authentication operationId: authenticate-basic - description: >- + description: |- Checks the credentials provided through [HTTP Basic Authentication - according to RFC 7617](https://www.rfc-editor.org/rfc/rfc7617.html) and returns - an access token for valid credentials. - + according to RFC 7617](https://www.rfc-editor.org/rfc/rfc7617.html) and + returns an access token in exchange for providing valid credentials. The credentials (username and password) MUST be sent in the HTTP header `Authorization` with type `Basic` and the Base64 encoded string @@ -2098,15 +2133,9 @@ paths: header would look as follows for username `user` and password `pw`: `Authorization: Basic dXNlcjpwdw==`. - The access token has to be used in the Bearer token for authorization in subsequent API calls (see also the information about Bearer tokens in - this document). The access token returned by this request MUST NOT be - provided with `basic//` prefix, but the Bearer Token sent in subsequent - API calls to protected endpoints MUST be prefixed with `basic//`. The - header in subsequent API calls would look as follows: `Authorization: - Bearer basic//TOKEN` (replace `TOKEN` with the actual access token). - + this document). It is RECOMMENDED to implement this authentication method for non-public services only. @@ -2127,9 +2156,8 @@ paths: properties: access_token: description: >- - The access token (without `basic//` prefix) to be used in - the Bearer token for authorization in subsequent API - calls. + The access token to be used in the Bearer token for authorization + in subsequent API calls (without the custom `basic//` prefix). type: string example: b34ba2bdf9ac9ee1 4XX: @@ -2214,7 +2242,7 @@ paths: can be used to generate small previews or test user-defined processes before starting a batch job. - Timeouts on either client- or server-side are to be expected for complex + Timeouts on either client-side or server-side are to be expected for complex computations. Back-ends MAY send the openEO error `ProcessGraphComplexity` immediately if the computation is expected to time out. Otherwise requests MAY time-out after a certain amount of time by sending openEO error `RequestTimeout`. @@ -2250,6 +2278,12 @@ paths: description: MAY include the costs for processing and downloading the data. schema: $ref: '#/components/schemas/money' + OpenEO-Identifier: + description: Optionally, an identifier associated with the synchronous processing request. + schema: + type: string + pattern: '^[\w\-\.~]+$' + example: a3cca2b2aa1e3b5b Link: description: >- The header MAY indicate a link to a log file generated by the request. If provided, the link MUST be serialized according to [RFC 8288](https://www.rfc-editor.org/rfc/rfc8288.html#section-3) and MUST use the relation type `monitor`. The link MUST follow the specifications for the links `GET /jobs/{job_id}/logs` and `GET /services/{service_id}/logs`, except that is MUST NOT accept any parameters (limit/offset). Therefore, the link MUST be accessible with HTTP GET, MUST be secured using a Bearer token and MUST follow the corresponding request body schema. @@ -2281,7 +2315,7 @@ paths: log_level: $ref: '#/components/schemas/min_log_level_default' additionalProperties: - description: You can add additional back-end specific properties here. + description: Aditional back-end specific properties are allowed. /process_graphs: get: summary: List all user-defined processes @@ -2410,13 +2444,13 @@ paths: reused in other processes. If a process with the specified `process_graph_id` exists, the process - is fully replaced. The id can't be changed for existing user-defined + is fully replaced. The id can not be changed for existing user-defined processes. The id MUST be unique across its namespace. Partially updating user-defined processes is not supported. To simplify exchanging user-defined processes, the property `id` can be part of - the request body. If the values don't match, the value for `id` gets + the request body. If the values do not match, the value for `id` gets replaced with the value from the `process_graph_id` parameter in the path. tags: @@ -2477,7 +2511,7 @@ paths: reference) in the user-defined process that is used to compute web service results. The appropriate arguments MUST be provided to the user-defined process, - usually at runtime from the context of the web service, + usually at runtime from the context of the web service. For example, a map service such as a WMS would need to inject the spatial extent into the user-defined process so that the back-end can compute the corresponding tile correctly. @@ -2741,8 +2775,8 @@ paths: log_level: $ref: '#/components/schemas/min_log_level_default' additionalProperties: - description: You can add additional back-end specific properties here. - description: The base data for the secondary web service to create + description: Additional back-end specific properties are allowed. + description: The base data required to create the secondary web service. '/services/{service_id}': parameters: - $ref: '#/components/parameters/service_id' @@ -2751,9 +2785,9 @@ paths: operationId: update-service description: |- Modifies an existing secondary web service at the back-end, - but maintain the identifier. Changes can be grouped in a single request. + but maintains the identifier. Changes can be grouped into a single request. - User have to create a new service to change the service type. + User MUST create a new service to change the service type. tags: - Secondary Services security: @@ -2789,6 +2823,8 @@ paths: $ref: '#/components/schemas/budget_update' log_level: $ref: '#/components/schemas/min_log_level_update' + additionalProperties: + description: Additional back-end specific properties are allowed. description: The data to change for the specified secondary web service. get: summary: Full metadata for a service @@ -2810,7 +2846,9 @@ paths: - configuration - attributes allOf: - - $ref: '#/components/schemas/service' + - $ref: '#/components/schemas/service' + additionalProperties: + description: You can list additional back-end specific properties here. 4XX: $ref: '#/components/responses/client_error_auth' 5XX: @@ -2820,9 +2858,9 @@ paths: operationId: delete-service description: >- Deletes all data related to this secondary web service. - Computations are stopped, computed results are deleted and access to - this is not possible any more. This service won't generate additional - costs. + Computations are stopped, computed results are deleted, and access to + this service is no longer possible. This service will not generate + additional costs. tags: - Secondary Services security: @@ -2914,7 +2952,7 @@ paths: Creates a new batch processing task (job) from one or more (chained) processes at the back-end. - Processing the data doesn't start yet. The job status gets initialized + Processing the data does not start yet. The job status gets initialized as `created` by default. tags: - Data Processing @@ -2968,7 +3006,7 @@ paths: log_level: $ref: '#/components/schemas/min_log_level_default' additionalProperties: - description: You can add additional back-end specific properties here. + description: Additional back-end specific properties are allowed. description: 'Specifies the job details, e.g. the user-defined process and billing details.' '/jobs/{job_id}': parameters: @@ -3017,6 +3055,8 @@ paths: $ref: '#/components/schemas/budget_update' log_level: $ref: '#/components/schemas/min_log_level_update' + additionalProperties: + description: Additional back-end specific properties are allowed. description: Specifies the job details to update. get: summary: Full metadata for a batch job @@ -3038,6 +3078,8 @@ paths: - process allOf: - $ref: '#/components/schemas/batch_job' + additionalProperties: + description: You can list additional back-end specific properties here. 4XX: $ref: '#/components/responses/client_error_auth' 5XX: @@ -3046,8 +3088,8 @@ paths: summary: Delete a batch job operationId: delete-job description: >- - Deletes all data related to this job. Computations are stopped and - computed results are deleted. This job won't generate additional costs + Deletes all data related to a given batch job. Computations are stopped and + computed results are deleted. This job will not generate additional costs for processing. tags: - Data Processing @@ -3113,8 +3155,8 @@ paths: duration: type: string description: >- - Estimated duration for the operation. Duration MUST be - specified as a ISO 8601 duration. + Estimated duration for the operation. Duration MUST be specified as an + [ISO 8601 duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). example: P1Y2M10DT2H30M size: type: integer @@ -3193,7 +3235,7 @@ paths: [STAC Collection](https://github.com/radiantearth/stac-spec/tree/v1.0.0/collection-spec) (supported since openEO API version 1.1.0). The assets to download are in both cases available in the property `assets` - and have the same structure. All additional metadata is not strictly required + and have the same structure. Additional metadata is not strictly required to download the files, but are helpful for users to understand the data. STAC Collections can either (1) add all assets as collection-level assets or @@ -3225,8 +3267,8 @@ paths: but regenerated with new expiration time. Signed URLs that expired MAY return the openEO error `ResultLinkExpired`. - It is **strongly recommended** to add a link with relation type `canonical` - to the STAC Item or STAC Collection (see the `links` property for details). + Adding a link with relation type `canonical` to the STAC Item or STAC Collection + is STRONGLY RECOMMENDED (see the `links` property for details). If processing has not finished yet and the `partial` parameter is not set to `true` requests to this endpoint MUST be rejected with openEO error `JobNotFinished`. @@ -3251,7 +3293,7 @@ paths: responses: '200': description: >- - Valid download links have been returned. The download links doesn't + Valid download links have been returned. The download links does not necessarily need to be located under the API base url. headers: OpenEO-Costs: @@ -3275,6 +3317,18 @@ paths: required: - assets properties: + created: + $ref: '#/components/schemas/created' + updated: + $ref: '#/components/schemas/updated' + queued: + $ref: '#/components/schemas/queued' + started: + $ref: '#/components/schemas/started' + expires: + $ref: '#/components/schemas/expires' + unpublished: + $ref: '#/components/schemas/unpublished' 'openeo:status': $ref: '#/components/schemas/result_status' allOf: @@ -3282,8 +3336,8 @@ paths: example: stac_version: 1.0.0 id: a3cca2b2aa1e3b5b - title: NDVI based on Sentinel 2 - description: Deriving minimum NDVI measurements over pixel time series of Sentinel 2 + title: NDVI based on Sentinel-2 + description: Deriving minimum NDVI measurements over pixel time series of Sentinel-2 license: Apache-2.0 providers: - name: Example Cloud Corp. @@ -3350,7 +3404,7 @@ paths: $ref: '#/components/schemas/batch_job_result' '424': description: >- - The request can't be fulfilled as the batch job failed. This request + The request can not be fulfilled as the batch job failed. This request will deliver the last error message that was produced by the batch job. @@ -3372,10 +3426,10 @@ paths: The result will be stored in the format specified in the process. To specify the format use a process such as `save_result`. - The job status is set to `queued`, if processing doesn't start + The job status is set to `queued`, if processing does not start instantly. The same applies if the job status is `canceled`, `finished`, or `error`, which restarts the job and discards previous results if the - back-end doesn't reject the request with an error. + back-end does not reject the request with an error. Clients SHOULD warn users and ask for confirmation if results may get discarded. @@ -3386,8 +3440,8 @@ paths: `error`. This endpoint has no effect if the job status is already `queued` or - `running`. In particular, it doesn't restart a running job. To restart - a queued or running job, processing MUST have been canceled before. + `running`. In particular, it does not restart a running job. To restart + a queued or running job, processing MUST have been canceled. Back-ends SHOULD reject queueing jobs with openEO error `PaymentRequired`, if the back-end is able to detect that the budget is too low to fully @@ -3548,7 +3602,7 @@ paths: file at the path exists. - Folders are created once required by a file upload. Empty folders can't + Folders are created once required by a file upload. Empty folders can not be created. tags: - File Storage @@ -3599,7 +3653,7 @@ paths: summary: Information about the authenticated user operationId: describe-account description: >- - Lists information about the authenticated user, e.g. the user id. + Lists information about the authenticated user such as the user id. The endpoint MAY return the disk quota available to the user. The endpoint MAY also return links related to user management @@ -3659,19 +3713,9 @@ paths: - quota properties: free: - type: integer - description: >- - Free storage space in bytes, which is still available - to the user. Effectively, this is the disk quota minus - the used space by the user, e.g. user-uploaded files - and job results. - example: 536870912 + $ref: '#/components/schemas/storage_quota_free' quota: - type: integer - description: >- - Maximum storage space (disk quota) in bytes available - to the user. - example: 1073741824 + $ref: '#/components/schemas/max_storage_quota' budget: type: number nullable: true @@ -3684,7 +3728,7 @@ paths: Links related to the user profile, e.g. where payments are handled or the user profile could be edited. - It is RECOMMENDED to provide links with the following `rel` (relation) types: + Providing links with the following `rel` (relation) types is RECOMMENDED: 1. `payment`: A page where users can recharge their user account with money or credits. @@ -3730,20 +3774,19 @@ components: description: |- Lists all conformance classes specified in various standards that the implementation conforms to. Conformance classes are commonly used in - all OGC APIs and the STAC API specification. + all OGC API standards and the STAC API specification. - The general openEO conformance class is `https://api.openeo.org/1.2.0`. + The general openEO conformance class is `https://api.openeo.org/1.3.0`. See the individual openEO API extensions for their conformance classes. - - This property is REQUIRED for STAC API versions 1.0.0-beta.1 and later. type: array items: type: string format: uri example: - - https://api.openeo.org/1.2.0 + - https://api.openeo.org/1.3.0 - https://api.openeo.org/extensions/commercial-data/0.1.0 - - https://api.openeo.org/extensions/federation/0.1.0 + - https://api.openeo.org/extensions/federation/0.2.0 + - https://api.stacspec.org/v1.0.0/core - https://api.stacspec.org/v1.0.0/collections udf_runtime: type: object @@ -3930,12 +3973,13 @@ components: bbox: $ref: '#/components/schemas/bbox' geometry: + type: object + nullable: true description: |- Defines the full footprint of the asset represented by this item as GeoJSON Geometry. Results without a known location can set this value to `null`. - nullable: true allOf: - $ref: '#/components/schemas/GeoJsonGeometry' example: @@ -4000,13 +4044,14 @@ components: $ref: '#/components/schemas/created' updated: $ref: '#/components/schemas/updated' + queued: + $ref: '#/components/schemas/queued' + started: + $ref: '#/components/schemas/started' expires: - type: string - format: date-time - description: >- - Time until which the assets are accessible, in UTC. Formatted as - a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. - example: '2020-11-01T00:00:00Z' + $ref: '#/components/schemas/expires' + unpublished: + $ref: '#/components/schemas/unpublished' 'openeo:status': $ref: '#/components/schemas/result_status' assets: @@ -4023,9 +4068,14 @@ components: default. It is **strongly recommended** to add a link with relation type - `canonical`, which points to this STAC document using a signed URL. - This way the STAC metadata can be used by non-openEO clients + `canonical` pointing to this STAC document using a signed URL. + Note that query parameters that influence the response of the current request + (like `partial`) MUST also be included or encoded within the signed URL + in order to give a consistent response when the signed URL is used. + This signed URL allows consumption of the STAC metadata + by (possibly non-openEO) clients and tools without additional authentication steps. + It is recommended to regenerate the signed URL (and its expiry) with each request. For relation types see the lists of [common relation types in openEO](#section/API-Principles/Web-Linking). @@ -4243,7 +4293,7 @@ components: Back-ends MUST resolve the billing plan in the following way if billing is supported: * If a value is given and it is not `null`: Persist the `plan` that has been provided in the request. - * Otherwise, don't change the billing plan. + * Otherwise, do not change the billing plan. Billing plans not on the list of available plans MUST be rejected with openEO error `BillingPlanInvalid`. @@ -4272,6 +4322,20 @@ components: example: free nullable: true default: null + storage_quota_free: + type: integer + description: >- + Free storage space in bytes, which is still available + to the user. Effectively, this is the disk quota minus + the used space by the user, e.g. user-uploaded files + and job results. + example: 536870912 + max_storage_quota: + type: integer + description: >- + Maximum storage space (disk quota) in bytes available + to the user. + example: 1073741824 collection: title: Collection type: object @@ -4418,8 +4482,7 @@ components: Could reference to licensing information, other meta data formats with additional information or a preview image. - It is RECOMMENDED to provide links with the following - `rel` (relation) types: + Providing links with the following `rel` (relation) types is RECOMMENDED: 1. `root` and `parent`: URL to the data discovery endpoint at `/collections`. @@ -4496,9 +4559,9 @@ components: Potential fields for the summaries can be found here: - * **[STAC Common Metadata](https://github.com/radiantearth/stac-spec/blob/v1.0.0/item-spec/common-metadata.md)**: + * **[STAC Common Metadata](https://github.com/radiantearth/stac-spec/blob/v1.1.0/commons/common-metadata.md)**: A list of commonly used fields throughout all domains - * **[Content Extensions](https://github.com/radiantearth/stac-spec/blob/v1.0.0/extensions/README.md#list-of-content-extensions)**: + * **[Content Extensions](https://stac-extensions.github.io)**: Domain-specific fields for domains such as EO, SAR and point clouds. * **Custom Properties**: It is generally allowed to add custom fields. @@ -4516,9 +4579,6 @@ components: Dictionary of asset objects for data that can be downloaded, each with a unique key. The keys MAY be used by clients as file names. - - Implementing this property REQUIRES to add `collection-assets` - to the list of `stac_extensions` in STAC < 1.0.0-rc.1. allOf: - $ref: '#/components/schemas/stac_assets' stac_version: @@ -4526,15 +4586,15 @@ components: description: >- The [version of the STAC specification](https://github.com/radiantearth/stac-spec/releases), which MAY not be equal to the [STAC API version](#tag/EO-Data-Discovery/STAC). - Supports versions 0.9.x and 1.x.x. + + The openEO API allows for the STAC versions 1.x.x (RECOMMENDED) and 0.9.x (DEPRECATED). pattern: '^(0\.9.\d+|1\.\d+.\d+)' - example: 1.0.0 + example: 1.1.0 stac_extensions: type: array description: >- A list of implemented STAC extensions. The list contains URLs to the - JSON Schema files it can be validated against. For STAC < 1.0.0-rc.1 - shortcuts such as `sar` can be used instead of the schema URL. + JSON Schema files it can be validated against. uniqueItems: true items: anyOf: @@ -4542,7 +4602,7 @@ components: type: string format: uri example: 'https://openeo.example/stac/custom-extemsion/v1.0.0/schema.json' - - title: Reference to a core extension (STAC < 1.0.0-rc.1 only) + - title: Reference to a core extension (STAC < 1.0.0-rc.1 only, DEPRECATED) type: string example: datacube stac_license: @@ -4942,9 +5002,8 @@ components: nullable: true step: description: >- - The space between the temporal instances as - [ISO 8601 - duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), + The space between the temporal instances as an + [ISO 8601 Duration](https://en.wikipedia.org/wiki/ISO_8601#Durations), e.g. `P1D`. Use `null` for irregularly spaced steps. type: string @@ -5010,7 +5069,6 @@ components: process_argument_value: title: Process Argument Value description: Arguments for a process. See the API documentation for more information. - nullable: true anyOf: - type: object nullable: true @@ -5247,18 +5305,28 @@ components: description: |- Links related to this process, e.g. additional external documentation. - It is RECOMMENDED to provide links with the following `rel` (relation) types: + Providing links with the following `rel` (relation) types is RECOMMENDED: 1. `latest-version`: If a process has been marked as deprecated, a link SHOULD point to the preferred version of the process. The relation types `predecessor-version` (link to older version) and `successor-version` (link to newer version) can also be used to show the relation between versions. - 2. `example`: Links to examples of other processes that use this process. + 2. `version-history`: A link to a changelog and/or a list of versions of the process + (see also the relation types `latest-version` etc.). - 3. `cite-as`: For all DOIs associated with the process, the respective DOI + 3. `example`: Links to examples of other processes that use this process. + + 4. `cite-as`: For all DOIs associated with the process, the respective DOI links SHOULD be added. + 5. `license`: Links to applicable license(s). The link titles should reflect the license names. + + 6. `author`: Links to authors of the process. The `href` can use the `mailto:` protocol to + link to an email address. The link titles should reflect the author names and affiliations. + + 7. `canonical`: Points to a publicly accessible and more long-lived URL. + For additional relation types see also the lists of [common relation types in openEO](#section/API-Principles/Web-Linking). items: @@ -5281,6 +5349,7 @@ components: parameters: type: array nullable: true + items: {} returns: type: object nullable: true @@ -5305,6 +5374,7 @@ components: parameters: type: array nullable: true + items: {} returns: type: object nullable: true @@ -5326,7 +5396,7 @@ components: This allows users to add missing predefined processes for portability, e.g. common processes from [processes.openeo.org](https://processes.openeo.org) that have a process graph included. - It is RECOMMENDED to log the namespace selected by the back-end for debugging purposes. + Logging the namespace selected by the back-end for debugging purposes is RECOMMENDED. * `backend`: Uses exclusively the predefined processes listed at `GET /processes`. * `user`: Uses exclusively the user-defined processes listed at `GET /process_graphs`. @@ -5366,7 +5436,7 @@ components: type: boolean description: >- Declares that the specified entity is experimental, which means that - it is likely to change or may produce unpredictable behaviour. Users + it is likely to change or may produce unpredictable behavior. Users should refrain from using it in production, but still feel encouraged to try it out and give feedback. default: false @@ -5440,7 +5510,7 @@ components: A list of parameters. The order in the array corresponds to the parameter order to - be used in clients that don't support named parameters. + be used in clients that do not support named parameters. **Note:** Specifying an empty array is different from (if allowed) `null` or the property being absent. @@ -5461,7 +5531,7 @@ components: description: |- A unique name for the parameter. - It is RECOMMENDED to use [snake case](https://en.wikipedia.org/wiki/Snake_case) (e.g. `window_size` or `scale_factor`). + Using [snake case](https://en.wikipedia.org/wiki/Snake_case) (e.g. `window_size` or `scale_factor`) is RECOMMENDED. pattern: '^\w+$' description: $ref: '#/components/schemas/process_description' @@ -5533,26 +5603,31 @@ components: The current status of a batch job. The following status changes can occur: + * `POST /jobs`: The status is initialized as `created`. * `POST /jobs/{job_id}/results`: The status is set to `queued`, if - processing doesn't start instantly. + processing does not start instantly. * Once the processing starts the status is set to `running`. * Once the data is available to download the status is set to `finished`. * Whenever an error occurs during processing, the status MUST be set to `error`. * `DELETE /jobs/{job_id}/results`: The status is set to `canceled` if the status was `running` beforehand and partial or preliminary results are available to be downloaded. Otherwise the status is set to - `created`. + `created`. + + The following state diagram shows the possible status changes: + + ![State diagram](assets/status-diagram.png) example: running default: created progress: type: number description: >- - Indicates the process of a running batch job in percent. + Indicates the process of a running batch job, in percent. Can also be set for a job which stopped due to an error or was canceled by the user. In this case, the value indicates - the progress at which the job stopped. The Property may not be + the progress at which the job stopped. This property may not be available for the status codes `created` and `queued`. Submitted and queued jobs only allow the value `0`, @@ -5564,6 +5639,12 @@ components: $ref: '#/components/schemas/created' updated: $ref: '#/components/schemas/updated' + queued: + $ref: '#/components/schemas/queued' + started: + $ref: '#/components/schemas/started' + unpublished: + $ref: '#/components/schemas/unpublished' plan: $ref: '#/components/schemas/billing_plan' costs: @@ -5586,10 +5667,10 @@ components: links: type: array description: |- - Links related to this batch job, e.g. a links to + Links related to this batch job such as links to invoices, log files or results. - It is RECOMMENDED to provide links with the following `rel` (relation) types: + Providing links with the following `rel` (relation) types is RECOMMENDED: 1. `monitor`: If logs are available, a link to the [logs endpoint](#tag/Batch-Jobs/operation/debug-job). 2. `result`: If batch job results are available, a link to the [results endpoint](#tag/Batch-Jobs/operation/list-results). @@ -5618,7 +5699,7 @@ components: job_id: type: string description: >- - Per-backend unique identifier of the batch job, generated by the + Per-back-end unique identifier of the batch job, generated by the back-end during creation. MUST match the specified pattern. pattern: '^[\w\-\.~]+$' example: a3cca2b2aa1e3b5b @@ -5626,16 +5707,49 @@ components: type: string format: date-time description: >- - Date and time of creation, formatted as a [RFC - 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + Date and time of creation (for batch jobs: the status 'created' was set), + formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. example: '2017-01-01T09:32:12Z' updated: type: string format: date-time description: >- - Date and time of the last status change, formatted as a [RFC - 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + Date and time of the last status change, + formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + If the status is `error`, `canceled` or `finished`, + this is the time when the job has ended. + example: '2017-01-01T09:54:18Z' + queued: + type: string + format: date-time + description: >- + Date and time of queueing the batch job (i.e., when the status 'queued' was set), + formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + example: '2017-01-01T09:34:00Z' + started: + type: string + format: date-time + description: >- + Date and time when the batch job started processing (i.e., when the status 'running' was set), + formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. example: '2017-01-01T09:36:18Z' + expires: + type: string + format: date-time + description: >- + Time in UTC until which the assets and this document are accessible via the signed URL + that is provided with the relation type `canonical` in the links. + Formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + After expiration, a document with new signed URLs can be retrieved through an authenticated + request to this endpoint. + example: '2017-02-01T09:54:18Z' + unpublished: + type: string + format: date-time + description: >- + Time until which the batch job results are stored on the back-end, in UTC. + Formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. + example: '2018-01-01T09:54:18Z' description: type: string format: commonmark @@ -5659,7 +5773,7 @@ components: description: A short description to easily distinguish entities. type: string nullable: true - example: NDVI based on Sentinel 2 + example: NDVI based on Sentinel-2 eo_description: type: string format: commonmark @@ -5670,7 +5784,7 @@ components: [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. nullable: true - example: Deriving minimum NDVI measurements over pixel time series of Sentinel 2 + example: Deriving minimum NDVI measurements over pixel time series of Sentinel-2 process_description: type: string format: commonmark @@ -5704,7 +5818,7 @@ components: type: string format: uri description: >- - URL at which the secondary web service is accessible. Doesn't + URL at which the secondary web service is accessible. Does not necessarily need to be located within the API. example: 'https://openeo.example/wms/wms-a3cca9' type: @@ -5720,7 +5834,7 @@ components: type: object description: >- Additional attributes of the secondary web service, e.g. - available layers for a WMS based on the bands in the + available layers for a WMS instance based on the bands in the underlying GeoTiff. example: layers: @@ -5761,18 +5875,18 @@ components: web service combined with actual values. See `GET /service_types` for supported configuration settings. For example, this could specify the required version of the service, visualization details or - any other service dependant configuration. + any other service dependent configuration. example: version: 1.3.0 service_enabled: type: boolean description: >- Describes whether a secondary web service is responding to requests - (true) or not (false). Disabled services don't produce any costs. + (true) or not (false). Disabled services do not produce any costs. service_id: type: string description: >- - A per-backend unique identifier of the secondary web service, generated + A per-back-end unique identifier of the secondary web service, generated by the back-end during creation. MUST match the specified pattern. pattern: '^[\w\-\.~]+$' example: wms-a3cca9 @@ -5813,7 +5927,7 @@ components: the same level. For example, if type is string, then default can be "foo" but cannot be 1. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.10.2). allOf: - - $ref: '#/components/schemas/process_json_schema' + - $ref: '#/components/schemas/json_schema' error: title: General Error description: >- @@ -5886,7 +6000,8 @@ components: The order of the levels is as follows (from low to high severity): `debug`, `info`, `warning`, `error`. That means if `warning` is set, the back-end will only store log entries with the level `warning` and `error`. - The default minimum log level is `info`. Users need to specifically set this property to `debug` to get *all* log entries. + The default minimum log level is `info`. + Users need to specifically set this property to `debug` to capture *all* log entries. It is RECOMMENDED that users set the level at least to "warning" in production workflows. type: string enum: @@ -5900,7 +6015,7 @@ components: description: |- Updates the minimum severity level for log entries that the back-end stores for the processing requests. - The back-end doesn't need to update existing log entries. + The back-end does not need to update existing log entries. type: string enum: - error @@ -5978,7 +6093,7 @@ components: A list of parameters passed to the child process graph. The order in the array corresponds to the parameter order to - be used in clients that don't support named parameters. + be used in clients that do not support named parameters. items: $ref: '#/components/schemas/parameter' returns: @@ -6015,6 +6130,9 @@ components: type: object required: - type + properties: + type: + type: string oneOf: - title: Spatial (raster) properties: @@ -6062,9 +6180,9 @@ components: $schema: description: |- The JSON Schema version. If not given in the context of openEO, - defaults to `draft-07`. + defaults to JSON Schema draft-07: `http://json-schema.org/draft-07/schema#` - You may need to add the default value for `$schema` property explicitly to the JSON Schema + The default value for `$schema` property may have to be added to the JSON Schema object before passing it to a JSON Schema validator. type: string format: uri @@ -6075,7 +6193,7 @@ components: format: uri type: description: |- - The allowed basic data type(s) for a value. + The allowed data type(s) for a value. If this property is not present, all data types are allowed. oneOf: @@ -6118,8 +6236,12 @@ components: - $ref: '#/components/schemas/json_schema' additionalProperties: description: >- - You can add any other property supported by the JSON Schema version that is given through the property `$schema`, - so either [draft-07](https://json-schema.org/draft-07/json-schema-validation.html) or any later version. + Any other property supported by the JSON Schema version that is given through the property `$schema` are allowed. Defaults to JSON Schema [draft-07](https://json-schema.org/draft-07/json-schema-validation.html), but can also be any later version of JSON Schema. + example: + type: string + enum: + - a + - b json_schema_type: type: string enum: @@ -6148,7 +6270,7 @@ components: Note: The pattern only specifies a minimal subset of invalid characters. The back-ends MAY enforce additional restrictions depending on their OS/environment. example: folder/file.txt - pattern: "^[^/\r\n\\:'\"][^\r\n\\:'\"]*$" + pattern: "^[^/\\r\\n\\t\\\\:'\"][^\\r\\n\\t\\\\:'\"]*$" size: type: integer description: File size in bytes. @@ -6191,42 +6313,6 @@ components: - Point coordinates: $ref: '#/components/schemas/GeoJsonPoint3D' - GeoJsonFeatureCollection: - type: object - required: - - type - - features - properties: - type: - type: string - enum: - - FeatureCollection - features: - type: array - items: - $ref: '#/components/schemas/GeoJsonFeature' - GeoJsonFeature: - type: object - required: - - type - - geometry - - properties - properties: - type: - type: string - enum: - - Feature - geometry: - $ref: '#/components/schemas/GeoJsonGeometry' - properties: - type: object - nullable: true - GeoJson: - title: GeoJSON - oneOf: - - $ref: '#/components/schemas/GeoJsonFeatureCollection' - - $ref: '#/components/schemas/GeoJsonFeature' - - $ref: '#/components/schemas/GeoJsonGeometry' GeoJsonGeometry: title: GeoJSON Geometry type: object @@ -6355,7 +6441,7 @@ components: It is NOT RECOMMENDED to add stacktraces to the `message`. example: >- - Can't load the UDF file from the URL `https://openeo.example/invalid/file.txt`. + Can not load the UDF file from the URL `https://openeo.example/invalid/file.txt`. Server responded with error 404. time: type: string @@ -6400,6 +6486,10 @@ components: example: udf usage: $ref: '#/components/schemas/usage' + stacktrace: + type: string + description: >- + A stacktrace or similar, may include whitespaces for formatting. links: $ref: '#/components/schemas/log_links' usage: @@ -6506,7 +6596,7 @@ components: $ref: '#/components/schemas/links_pagination' client_error: description: |- - The request can't be fulfilled due to an error on client-side, i.e. the + The request can not be fulfilled due to an error on client-side, i.e. the request is invalid. The client SHOULD NOT repeat the request without modifications. @@ -6526,7 +6616,7 @@ components: $ref: '#/components/schemas/error' client_error_auth: description: |- - The request can't be fulfilled due to an error on client-side, i.e. the + The request can not be fulfilled due to an error on client-side, i.e. the request is invalid. The client SHOULD NOT repeat the request without modifications. @@ -6546,7 +6636,7 @@ components: $ref: '#/components/schemas/error' server_error: description: |- - The request can't be fulfilled due to an error at the back-end. The + The request can not be fulfilled due to an error at the back-end. The error is never the client’s fault and therefore it is reasonable for the client to retry the exact same request that triggered this response. @@ -6573,14 +6663,14 @@ components: If the parameter is not provided or empty, all elements are returned. Pagination is OPTIONAL: back-ends or clients may not support it. - Therefore it MUST be implemented in a way that clients not supporting + Therefore, it MUST be implemented in a way that clients not supporting pagination get all resources regardless. Back-ends not supporting pagination MUST return all resources. If the response is paginated, the `links` array MUST be used to communicate the links for browsing the pagination with predefined `rel` types. See the `links` array schema for supported `rel` types. - Back-end implementations can, unless specified otherwise, use all kind of pagination techniques, + Back-end implementations can, unless specified otherwise, use any kind of pagination technique, depending on what is supported best by their infrastructure: page-based, offset-based, token-based or something else. The clients SHOULD use whatever is specified in the links with the corresponding `rel` types. @@ -6592,7 +6682,7 @@ components: minimum: 1 log_offset: name: offset - description: The last identifier (property `id` of a log entry) the client has received. If provided, the back-ends only sends the entries that occurred after the specified identifier. If not provided or empty, start with the first entry. + description: The last identifier (property `id` of a log entry) the client has received. If provided, the back-end MUST only send the entries that occurred after the specified identifier. If not provided or empty, the back-end MUST start with the first entry. in: query allowEmptyValue: true example: log1234 @@ -6617,7 +6707,7 @@ components: - warning - info - debug - default: info + default: debug service_id: name: service_id in: path @@ -6641,7 +6731,7 @@ components: $ref: '#/components/schemas/collection_id' examples: evi_user_defined_process: - description: A user-defined process that computes the EVI. + description: A user-defined process that computes the Enhanced Vegetation Index (EVI). value: id: evi summary: Enhanced Vegetation Index @@ -6711,14 +6801,49 @@ components: Bearer: type: http scheme: bearer - bearerFormat: >- - The Bearer Token MUST consist of the authentication method, a provider - ID (if available) and the token itself. All separated by a forward slash - `/`. Examples (replace `TOKEN` with the actual access token): (1) Basic - authentication (no provider ID available): `basic//TOKEN` (2) OpenID - Connect (provider ID is `ms`): `oidc/ms/TOKEN`. For OpenID Connect, the - provider ID corresponds to the value specified for `id` for each - provider in `GET /credentials/oidc`. + bearerFormat: JWT or openEO + description: >- + A Bearer token can be provided in two different formats: + + 1. **JSON Web Token (JWT) - RECOMMENDED** + + - Conformance class: `https://api.openeo.org/1.3.0/authentication/jwt` + + The Bearer token is an access token in [JWT](https://datatracker.ietf.org/doc/html/rfc7519) format + as defined in RFC 7519. For openEO, it MUST include the issuer in the + `iss` claim although being optional in RFC 7519. + If the concept of an issuer does not exist in an authentication method (e.g. in HTTP Basic), + implementations could use the endpoint for Basic Authentication as the issuer, for example. + + openEO backend implementations MUST signal their support for JWT by listing the given + conformance class. Likewise, openEO clients SHOULD only use JWT when the openEO backend + lists the conformance class. + + 2. **openEO Tokens - DEPRECATED** + + - Conformance class: *None* + + The Bearer Token is constructed from the authentication method, a + provider ID (if available) and the access token. All separated by a + forward slash `/`. + + Examples (replace `TOKEN` with the actual access token): + + - Basic authentication (no provider ID available): `basic//TOKEN` + - OpenID Connect (provider ID is `ms`): `oidc/ms/TOKEN`. + For OpenID Connect, the provider ID corresponds to the value + specified for `id` for each provider in `GET /credentials/oidc`. + + All openEO backends MUST accept this method for backward compatibility + until version 2.0 of the specification. + + The access tokens provided by the identity provider do not include + the prefix that includes the authentication method and provider ID. + The Bearer Token sent to the openEO backend MUST have the prefix, e.g. `basic//` for Basic authentication. + This means that the clients have to prepend the prefix. + + JWT and openEO tokens can be distinguished by the presence of a slash + `/` in the token, which JWT can never contain due to the Base64 encoding. Basic: type: http scheme: basic diff --git a/package.json b/package.json index 8a19865b..3502ae70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openeo/api", - "version": "1.2.0", + "version": "1.3.0", "author": "openEO Consortium", "license": "Apache-2.0", "description": "The openEO API specification.", @@ -13,12 +13,19 @@ "url": "git+https://github.com/Open-EO/openeo-api.git" }, "devDependencies": { - "@stoplight/spectral-cli": "^6.6.0", - "redoc-cli": "^0.13.18" + "@stoplight/spectral-cli": "^6.15.0", + "@redocly/cli": "^2.0.8", + "http-server": "^14.1.1" }, "scripts": { - "start": "redoc-cli serve openapi.yaml --watch --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", - "build": "redoc-cli build openapi.yaml -o redoc.html --title \"openEO API\" --cdn --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", - "test": "spectral lint openapi.yaml" + "start": "npm run build && http-server -o index.html", + "build": "npm run build:core && npm run build:commercial-data && npm run build:processing-parameters && npm run build:workspaces", + "build:core": "redocly build-docs core --config=.redocly.yaml -o=index.html", + "build:commercial-data": "redocly build-docs commercial-data --config=.redocly.yaml -o=commercial-data.html", + "build:processing-parameters": "redocly build-docs processing-parameters --config=.redocly.yaml -o=processing-parameters.html", + "build:workspaces": "redocly build-docs workspaces --config=.redocly.yaml -o=workspaces.html", + "test": "npm run spectral-lint && npm run redocly-lint", + "spectral-lint": "spectral lint openapi.yaml extensions/*/openapi.yaml", + "redocly-lint": "redocly lint --config=.redocly.yaml" } }