From 16b1122c7090cc4fedcabace48686a4f73c1c876 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 15 Aug 2022 13:01:35 +0200 Subject: [PATCH 01/47] Update redoc-cli + CI --- .github/workflows/docs.yml | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a5bd1e48..24809ede 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -9,13 +9,12 @@ on: jobs: deploy: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [14.x] steps: - name: Inject env variables uses: rlespinasse/github-slug-action@v3.x - uses: actions/setup-node@v1 + with: + node-version: '16' - uses: actions/checkout@v2 - run: | npm install @@ -38,6 +37,7 @@ jobs: if: ${{ env.GITHUB_REF_SLUG == 'master' }} with: github_token: ${{ secrets.GITHUB_TOKEN }} + keep_files: true publish_dir: gh-pages user_name: 'openEO CI' user_email: openeo.ci@uni-muenster.de diff --git a/package.json b/package.json index 6019eb94..1d0cac7f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@stoplight/spectral": "^5.9.1", - "redoc-cli": "0.10.1" + "redoc-cli": "^0.13.18" }, "scripts": { "start": "redoc-cli serve openapi.yaml --watch --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", From 65d3f58445649c58ab05b8b609a46596331cbc21 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 16 Nov 2022 17:04:46 +0100 Subject: [PATCH 02/47] Conformance classes / OGC API and STAC API alignment (#468) * Align with OGC APIs regarding /conformance, add conformance classes for openEO #186 --- CHANGELOG.md | 1 + extensions/commercial-data/README.md | 1 + extensions/federation/README.md | 1 + openapi.yaml | 27 +++++++++++++++++++-------- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d922c7c..4c5eaa8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Relaxed requirement that unsupported endpoints must return HTTP status code 501. Instead also HTTP status code 404 can be used (and is regularly used in practice). [#415](https://github.com/Open-EO/openeo-api/issues/415) - Minimum value for `costs` and `budget` is 0. - `GET /jobs/{job_id}/estimate`: If a batch job can't be estimated reliably, a `EstimateComplexity` error should be returned. [#443](https://github.com/Open-EO/openeo-api/issues/443) +- The `/conformance` endpoint is now generally used for OGC APIs, STAC API and openEO. All openEO and all extensions got individual conformance classes. [#186](https://github.com/Open-EO/openeo-api/issues/186) ### Fixed diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index b4dc50ed..bf32e3f7 100644 --- a/extensions/commercial-data/README.md +++ b/extensions/commercial-data/README.md @@ -5,6 +5,7 @@ The Commercial Data API extension provides an interface for discovering, orderin - Version: **0.1.0** - Stability: **experimental** - [OpenAPI document](openapi.yaml) +- Conformance class: `https://api.openeo.org/extensions/commercial-data/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. diff --git a/extensions/federation/README.md b/extensions/federation/README.md index 515fecf3..f3d32ea8 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -6,6 +6,7 @@ This is an extension for federation aspects, i.e. where multiple back-ends are e - Version: **0.1.0** - Stability: **experimental** +- Conformance class: `https://api.openeo.org/extensions/federation/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. diff --git a/openapi.yaml b/openapi.yaml index c352a18b..1847ef3a 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1172,14 +1172,22 @@ paths: $ref: '#/components/responses/server_error' /conformance: get: - summary: OGC specifications this API conforms to + summary: Conformance classes this API implements operationId: conformance - description: >- - Lists all conformance classes specified in OGC standards that the - server conforms to. - - This endpoint is only required if full compliance with OGC API standards is desired. - Therefore, openEO back-ends MAY implement it for compatibility with OGC API clients and openEO clients don't need to request it. + 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 + 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 general openEO conformance class is `https://api.openeo.org/1.1.0`. + See the individual extensions for their conformance classes. + + More details: + - [STAC API](https://github.com/radiantearth/stac-api-spec), especially "STAC API - Collections and Features Specification" + - [OGC APIs](https://ogcapi.ogc.org/) tags: - Capabilities responses: @@ -1201,7 +1209,10 @@ paths: example: http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core example: conformsTo: - - 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core' + - https://api.openeo.org/1.1.0 + - https://api.openeo.org/extensions/commercial-data/0.1.0 + - https://api.openeo.org/extensions/federation/0.1.0 + - https://api.stacspec.org/v1.0.0-rc.2/collections 5XX: $ref: '#/components/responses/server_error' /collections: From 8a112b7fa44056abbc30f484634d63a519e23352 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 17 Nov 2022 12:42:01 +0100 Subject: [PATCH 03/47] Update collection summaries to 1.0.0 #469 --- CHANGELOG.md | 2 +- openapi.yaml | 59 ++++++++++++++++++++++++++++++++++------------------ 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c5eaa8c..83c1da04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Updated STAC specification examples and references to v1.0.0. +- Updated STAC specification examples and references to v1.0.0, please see the [STAC changelog](https://github.com/radiantearth/stac-spec/blob/master/CHANGELOG.md) for all changes between 0.9 and 1.0. - `cube:dimensions`: `reference_system` is allowed to be PROJJSON, too. - Relaxed requirement that unsupported endpoints must return HTTP status code 501. Instead also HTTP status code 404 can be used (and is regularly used in practice). [#415](https://github.com/Open-EO/openeo-api/issues/415) - Minimum value for `costs` and `budget` is 0. diff --git a/openapi.yaml b/openapi.yaml index 1847ef3a..bc10ad7e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4452,9 +4452,9 @@ components: SAR, Satellite or Scientific) or even custom extensions. Summaries are either a unique set of all available - values *or* statistics. Statistics by default only - specify the range (minimum and maximum values), but - can optionally be accompanied by additional + values, statistics *or* a JSON Schema. Statistics only + specify the range (minimum and maximum values) by default, + but can optionally be accompanied by additional statistical values. The range can specify the potential range of values, but it is recommended to be as precise as possible. The set of values MUST contain @@ -4482,6 +4482,7 @@ components: items: description: A value of any type. - $ref: '#/components/schemas/collection_summary_stats' + - $ref: '#/components/schemas/json_schema' assets: description: |- Dictionary of asset objects for data that can be downloaded, @@ -4640,7 +4641,7 @@ components: - metadata collection_summary_stats: type: object - title: Statistics + title: Statistics / Range description: >- By default, only ranges with a minimum and a maximum value can be specified. Ranges can be @@ -4652,14 +4653,16 @@ components: to add other derived statistical values to the object, for example `mean` or `stddev`. required: - - min - - max + - minimum + - maximum properties: - min: + minimum: + description: The minimum value (inclusive). anyOf: - type: string - type: number - max: + maximum: + description: The maximum value (inclusive). anyOf: - type: string - type: number @@ -5703,7 +5706,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/json_schema' + - $ref: '#/components/schemas/process_json_schema' error: title: General Error description: >- @@ -5802,14 +5805,14 @@ components: title: Data Types description: Either a single data type or a list of data types. oneOf: - - $ref: '#/components/schemas/json_schema' + - $ref: '#/components/schemas/process_json_schema' - title: Multiple data types description: A list of data types this parameter supports, specified as JSON Schemas. type: array minItems: 1 uniqueItems: true items: - $ref: '#/components/schemas/json_schema' + $ref: '#/components/schemas/process_json_schema' parameter_schema: title: Parameter Data Types description: Either a single data type or a list of data types. @@ -5848,10 +5851,10 @@ components: schema: $ref: '#/components/schemas/data_type_schema' allOf: - - $ref: '#/components/schemas/json_schema' + - $ref: '#/components/schemas/process_json_schema' allOf: - - $ref: '#/components/schemas/json_schema' - json_schema: + - $ref: '#/components/schemas/process_json_schema' + process_json_schema: type: object title: Single data type description: |- @@ -5869,6 +5872,23 @@ components: JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. Clients are not expected to support dereferencing `$refs`. + Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. + allOf: + - $ref: '#/components/schemas/json_schema' + - properties: + subtype: + type: string + description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. + deprecated: + $ref: '#/components/schemas/deprecated' + json_schema: + type: object + title: JSON Schema + description: |- + A JSON Schema compliant to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html). + JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. + Clients are not expected to support dereferencing `$refs`. + Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. properties: type: @@ -5883,9 +5903,6 @@ components: uniqueItems: true items: $ref: '#/components/schemas/json_schema_type' - subtype: - type: string - description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. pattern: type: "string" format: "regex" @@ -5917,9 +5934,11 @@ components: items: $ref: '#/components/schemas/json_schema' - $ref: '#/components/schemas/json_schema' - deprecated: - $ref: '#/components/schemas/deprecated' - additionalProperties: true + additionalProperties: + description: >- + You can add any other property supported by JSON Schema, either + [draft-07](https://json-schema.org/draft-07/json-schema-validation.html) + or any later version. json_schema_type: type: string enum: From ddccbfde62b37be6801496d18ddf34e00d1acd64 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 9 Dec 2022 15:09:47 +0100 Subject: [PATCH 04/47] Add "pointcloud" to the gis_data_types #475 --- CHANGELOG.md | 1 + openapi.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83c1da04..ce5da842 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `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. +- `GET /file_formats`: Add `pointcloud` to the `gis_data_types`. [#475](https://github.com/Open-EO/openeo-api/issues/475) - `GET /me`: New Relation types `alternate` and `related` for user-specific external pages. [#404](https://github.com/Open-EO/openeo-api/issues/404) - `GET /credentials/oidc`: Allow `authorization_code` and `urn:ietf:params:oauth:grant-type:device_code` (both without PKCE) as grants for `default_clients`. [#410](https://github.com/Open-EO/openeo-api/issues/410) - `GET /jobs` and `GET /jobs/{job_id}`: Added a links property that can for example link to results and logs. [#453](https://github.com/Open-EO/openeo-api/issues/453) diff --git a/openapi.yaml b/openapi.yaml index bc10ad7e..519f3810 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4001,6 +4001,7 @@ components: - raster - vector - table + - pointcloud - other deprecated: $ref: '#/components/schemas/deprecated' From 926fb558f285b512431986b54495ec346b077ef7 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 4 Jan 2023 12:42:27 +0100 Subject: [PATCH 05/47] Clarify that `enabled` is required by removing the default value. #473 (#477) --- CHANGELOG.md | 1 + openapi.yaml | 12 ++++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce5da842..ffcef205 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `GET /me`: Clarify the behavior of the field `budget`. - `GET /jobs/{job_id}/logs`, `GET /services/{service_id}/logs` and `POST /result`: Clarified the formatting of the `message` property. [#455](https://github.com/Open-EO/openeo-api/issues/455) - `GET /jobs/{job_id}/estimate`: Don't require that the costs are the upper limit. Services may specify the costs more freely depending on their terms of service. +- `GET /services` and `GET /services/{service_id}`: Clarify that `enabled` is required by removing the default value. [#473](https://github.com/Open-EO/openeo-api/issues/473) - Several appearances of `nullable` were clarified according to the lint report by Spectral - Clarify how the well-known document works [#460](https://github.com/Open-EO/openeo-api/issues/460) diff --git a/openapi.yaml b/openapi.yaml index 519f3810..6d4037a4 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2668,7 +2668,9 @@ paths: type: $ref: '#/components/schemas/service_type' enabled: - $ref: '#/components/schemas/service_enabled_default' + allOf: + - $ref: '#/components/schemas/service_enabled' + - default: true configuration: $ref: '#/components/schemas/service_configuration' plan: @@ -5598,7 +5600,7 @@ components: type: $ref: '#/components/schemas/service_type' enabled: - $ref: '#/components/schemas/service_enabled_default' + $ref: '#/components/schemas/service_enabled' process: $ref: '#/components/schemas/process_graph_with_metadata' configuration: @@ -5652,12 +5654,6 @@ components: any other service dependant configuration. example: version: 1.3.0 - service_enabled_default: - type: boolean - description: >- - Describes whether a secondary web service is responding to requests - (true) or not (false). Disabled services don't produce any costs. - default: true service_enabled: type: boolean description: >- From 749bfc724c1c4c43205737288c40f30c7f94f50d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 30 Jan 2023 16:18:01 +0100 Subject: [PATCH 06/47] Vector data cubes (#441) --- CHANGELOG.md | 3 + openapi.yaml | 426 +++++++++++++++++++++++++++++++++------------------ 2 files changed, 277 insertions(+), 152 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffcef205..b648b378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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) +- Processes: Added `dimensions` schema for subtype `datacube` +- Collections: Added `vector` dimension type to `cube:dimensions` ### Changed @@ -50,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Clarify the fields `plan` (for processing requests) and `billing_plan` (in `GET /` and `GET /me`). [#425](https://github.com/Open-EO/openeo-api/issues/425) [#426](https://github.com/Open-EO/openeo-api/issues/426) - Reflect that the `debug` process has been renamed to `inspect`. - Clarified uniqueness constraints for identifiers. [#449](https://github.com/Open-EO/openeo-api/issues/449) [#454](https://github.com/Open-EO/openeo-api/issues/454) +- Clarified schematically the applicability of JSON Schema extensions (`parameters`, `returns`, `dimensions`) and their relation to the subtypes - `GET /`: Removed the superfluous default value for `currency`. [#423](https://github.com/Open-EO/openeo-api/issues/423) - `GET /credentials/oidc`: Clarify that clients may add additional scopes - `GET /me`: Clarify the behavior of the field `budget`. diff --git a/openapi.yaml b/openapi.yaml index 6d4037a4..f8bad098 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -267,10 +267,11 @@ info: Each process parameter and the return values of a process define a schema that the value MUST comply to. The schemas are based on [JSON Schema draft-07](http://json-schema.org/). - Three custom keywords have been defined: + Multiple custom keywords have been defined: * `subtype` for more fine-grained data-types than JSON Schema supports. - * `parameters` to specify the parameters of a process graph (object with subtype `process-graph`). - * `returns` to describe the return value of a process graph (object with subtype `process-graph`). + * `dimensions` to further define the dimension types required if the `subtype` is `datacube`. + * `parameters` to specify the parameters of a process graph if the `subtype` is `process-graph`. + * `returns` to describe the return value of a process graph if the `subtype` is `process-graph`. ### Subtypes @@ -280,7 +281,7 @@ info: and standardizes a number of openEO related data types that extend the native data types, for example: `bounding-box` (object with at least `west`, `south`, `east` and `north` properties), `date-time` (string representation of date and time following RFC 3339), - `raster-cube` (the type of data cubes), etc. + `datacube` (a datacube with dimensions), etc. The subtypes should be re-used in process schema definitions whenever suitable. If a general data type such as `string` or `number` is used in a schema, all subtypes with the same parent data type can be passed, too. @@ -1394,7 +1395,7 @@ paths: example: stac_version: 1.0.0 stac_extensions: - - https://stac-extensions.github.io/datacube/v2.0.0/schema.json + - https://stac-extensions.github.io/datacube/v2.2.0/schema.json type: Collection id: Sentinel-2 title: Sentinel-2 MSI L2A @@ -1627,7 +1628,7 @@ paths: description: A data cube. schema: type: object - subtype: raster-cube + subtype: datacube - name: process description: 'A unary process to be applied on each value, may consist of multiple sub-processes.' schema: @@ -1642,7 +1643,7 @@ paths: description: 'A data cube with the newly computed values. The resolution, cardinality and the number of dimensions are the same as for the original data cube.' schema: type: object - subtype: raster-cube + subtype: datacube - id: multiply summary: Multiplication of two numbers description: |- @@ -2471,7 +2472,7 @@ paths: description: List of parameters made available to user-defined processes. type: array items: - $ref: '#/components/schemas/parameter' + $ref: '#/components/schemas/process_parameter' links: description: |- Links related to this service type, e.g. more @@ -3809,6 +3810,12 @@ components: default: finished batch_job_result: title: Batch Job Results Response as STAC Item + description: + The STAC specification should be the main guidance for implementing this. + + Specifying the `bbox` is strongly RECOMMENDED for STAC compliance, + but can be omitted if the result is unlocated and the `geometry` + is set to `null`. type: object required: - stac_version @@ -3835,41 +3842,7 @@ components: enum: - Feature bbox: - description: |- - Potential *spatial extent* covered by the data. - - The bounding box is provided as four or six numbers. Six numbers are - specified, if the coordinate reference system includes a vertical axis - (height or depth). The order of the elements in the array: - - - West (lower left corner, coordinate axis 1) - - South (lower left corner, coordinate axis 2) - - Base (optional, lower left corner, coordinate axis 3) - - East (upper right corner, coordinate axis 1) - - North (upper right corner, coordinate axis 2) - - Height (optional, upper right corner, coordinate axis 3) - - The coordinate reference system of the values is WGS84 - longitude/latitude. - - Specifying the `bbox` is strongly RECOMMENDED for STAC compliance, - but can be omitted if the result is unlocated and the `geometry` - is set to `null`. - type: array - oneOf: - - title: 4 elements - minItems: 4 - maxItems: 4 - - title: 6 elements - minItems: 6 - maxItems: 6 - items: - type: number - example: - - -180 - - -90 - - 180 - - 90 + $ref: '#/components/schemas/bbox' geometry: description: |- Defines the full footprint of the asset represented by this item as @@ -4316,46 +4289,7 @@ components: type: array minItems: 1 items: - description: |- - Each bounding box is provided as four or six numbers, - depending on whether the coordinate reference system - includes a vertical axis (height or depth): - - * West (lower left corner, coordinate axis 1) - * South (lower left corner, coordinate axis 2) - * Base (optional, minimum value, coordinate axis 3) - * East (upper right corner, coordinate axis 1) - * North (upper right corner, coordinate axis 2) - * Height (optional, maximum value, coordinate axis 3) - - The coordinate reference system of the values is WGS 84 - longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84). - - For WGS 84 longitude/latitude the values are in most cases - the sequence of minimum longitude, minimum latitude, maximum - longitude and maximum latitude. - - However, in cases where the box spans the antimeridian the - first value (west-most box edge) is larger than the third value - (east-most box edge). - - If the vertical axis is included, the third and the sixth - number are the bottom and the top of the 3-dimensional bounding box. - type: array - oneOf: - - title: 4 elements - minItems: 4 - maxItems: 4 - - title: 6 elements - minItems: 6 - maxItems: 6 - items: - type: number - example: - - -180 - - -90 - - 180 - - 90 + $ref: '#/components/schemas/bbox' temporal: title: Collection Temporal Extent description: >- @@ -4440,9 +4374,10 @@ components: * `z` for the dimension of type `spatial` with the axis set to `z` * `t` for the dimension of type `temporal` * `bands` for dimensions of type `bands` + * `geometries` for dimensions of type `geometries` - This property REQUIRES to add the data cube extension to the list - of `stac_extensions`: `https://stac-extensions.github.io/datacube/v2.1.0/schema.json`. + This property REQUIRES to add a version of the data cube extension to the list + of `stac_extensions`, e.g. `https://stac-extensions.github.io/datacube/v2.2.0/schema.json`. type: object additionalProperties: x-additionalPropertiesName: Dimension Name @@ -4669,6 +4604,47 @@ components: anyOf: - type: string - type: number + bbox: + description: |- + Each bounding box is provided as four or six numbers, + depending on whether the coordinate reference system + includes a vertical axis (height or depth): + + * West (lower left corner, coordinate axis 1) + * South (lower left corner, coordinate axis 2) + * Base (optional, minimum value, coordinate axis 3) + * East (upper right corner, coordinate axis 1) + * North (upper right corner, coordinate axis 2) + * Height (optional, maximum value, coordinate axis 3) + + The coordinate reference system of the values is WGS 84 + longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84). + + For WGS 84 longitude/latitude the values are in most cases + the sequence of minimum longitude, minimum latitude, maximum + longitude and maximum latitude. + + However, in cases where the box spans the antimeridian the + first value (west-most box edge) is larger than the third value + (east-most box edge). + + If the vertical axis is included, the third and the sixth + number are the bottom and the top of the 3-dimensional bounding box. + type: array + oneOf: + - title: 4 elements + minItems: 4 + maxItems: 4 + - title: 6 elements + minItems: 6 + maxItems: 6 + items: + type: number + example: + - -180 + - -90 + - 180 + - 90 collection_id: type: string description: >- @@ -4678,17 +4654,19 @@ components: example: Sentinel-2A dimension: title: Dimension + description: A dimension, each object represents a distinct dimension with the key being the dimension name. type: object required: - type properties: type: - description: 'Type of the dimension.' + description: Type of the dimension. type: string enum: - spatial - temporal - bands + - geometries - other description: $ref: '#/components/schemas/description' @@ -4698,12 +4676,21 @@ components: spatial: '#/components/schemas/dimension_spatial' temporal: '#/components/schemas/dimension_temporal' bands: '#/components/schemas/dimension_bands' + geometries: '#/components/schemas/dimension_geometries' other: '#/components/schemas/dimension_other' dimension_other: allOf: - $ref: '#/components/schemas/dimension' - title: Additional Dimension type: object +# This is not supported by ReDoc yet: +# oneOf: +# - title: Additional Dimension with Extent +# required: +# - extent +# - title: Additional Dimension with Values +# required: +# - values properties: extent: $ref: '#/components/schemas/collection_dimension_extent_open' @@ -4714,8 +4701,40 @@ components: unit: $ref: '#/components/schemas/collection_dimension_unit' reference_system: - description: The reference system for the data. + description: The reference system for the dimension. type: string + dimension_geometries: + allOf: + - $ref: '#/components/schemas/dimension' + - title: Geometries Dimension + type: object + required: + - bbox + properties: + axes: + description: Axes of the vector dimension as an ordered set of `x`, `y` and `z`. Defaults to `x` and `y`. + default: + - 'x' + - 'y' + type: array + uniqueItems: true + items: + $ref: '#/components/schemas/dimension_axis_xyz' + bbox: + $ref: '#/components/schemas/bbox' + values: + description: Optionally, a representation of the vectors. This can be a list of WKT string or other free-form identifiers. + type: array + items: + type: string + geometry_types: + description: A set of all geometry types included in this dimension. If not present, mixed geometry types must be assumed. + type: array + uniqueItems: true + items: + $ref: '#/components/schemas/geometry_type' + reference_system: + $ref: '#/components/schemas/collection_dimension_srs' dimension_bands: allOf: - $ref: '#/components/schemas/dimension' @@ -4737,18 +4756,13 @@ components: allOf: - $ref: '#/components/schemas/dimension' - title: Spatial Dimension - description: A spatial dimension in one of the horizontal (x or y) or vertical (z) directions. + description: A spatial (raster) dimension in one of the horizontal (x or y) or vertical (z) directions. type: object required: - axis properties: axis: - description: 'Axis of the spatial dimension (`x`, `y` or `z`).' - type: string - enum: - - 'x' - - 'y' - - 'z' + $ref: '#/components/schemas/dimension_axis_xyz' extent: description: >- Extent (lower and upper bounds) of the @@ -4768,22 +4782,21 @@ components: step: $ref: '#/components/schemas/collection_dimension_step' reference_system: - description: >- - The spatial reference system for the data, specified as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html), [PROJJSON object](https://proj.org/specifications/projjson.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to EPSG code 4326. - default: 4326 - oneOf: - - type: number - title: EPSG code - - type: string - title: WKT2 or PROJ definition (deprecated) - - type: object - title: PROJJSON + $ref: '#/components/schemas/collection_dimension_srs' discriminator: propertyName: axis mapping: x: '#/components/schemas/dimension_spatial_horizontal' y: '#/components/schemas/dimension_spatial_horizontal' z: '#/components/schemas/dimension_spatial_vertical' + dimension_axis_xyz: + title: Axis + description: Axis of a geometry or dimension (`x`, `y` or `z`) + type: string + enum: + - 'x' + - 'y' + - 'z' dimension_spatial_horizontal: allOf: - $ref: '#/components/schemas/dimension_spatial' @@ -4851,6 +4864,18 @@ components: spaced steps. type: string nullable: true + collection_dimension_srs: + title: Spatial reference system + description: >- + The spatial reference system for the data, specified as [EPSG code](http://www.epsg-registry.org/), [WKT2 (ISO 19162) string](http://docs.opengeospatial.org/is/18-010r7/18-010r7.html), [PROJJSON object](https://proj.org/specifications/projjson.html) or [PROJ definition (deprecated)](https://proj.org/usage/quickstart.html). Defaults to EPSG code 4326. + default: 4326 + oneOf: + - type: number + title: EPSG code + - type: string + title: WKT2 or PROJ definition (deprecated) + - type: object + title: PROJJSON collection_dimension_extent_open: description: >- If the dimension consists of @@ -5251,7 +5276,7 @@ components: description: $ref: '#/components/schemas/process_description' schema: - $ref: '#/components/schemas/data_type_schema' + $ref: '#/components/schemas/process_schema' experimental: type: boolean description: >- @@ -5388,7 +5413,7 @@ components: - schema properties: schema: - $ref: '#/components/schemas/parameter_schema' + $ref: '#/components/schemas/process_schema' allOf: - $ref: '#/components/schemas/base_parameter' batch_job: @@ -5810,22 +5835,57 @@ components: uniqueItems: true items: $ref: '#/components/schemas/process_json_schema' - parameter_schema: - title: Parameter Data Types - description: Either a single data type or a list of data types. + process_schema: + title: Process Data types + description: Either a single data type or a list of data types for process parameter or process return values. oneOf: - - $ref: '#/components/schemas/parameter_json_schema' + - $ref: '#/components/schemas/process_json_schema' - title: Multiple data types description: A list of data types supported, specified as JSON Schemas. type: array minItems: 1 uniqueItems: true items: - $ref: '#/components/schemas/parameter_json_schema' - parameter_json_schema: + $ref: '#/components/schemas/process_json_schema' + process_json_schema: + type: object title: Single Data Type + description: |- + Specifies a data type supported by a parameter or return value. + + The data types are specified according to the [JSON Schema draft-07](http://json-schema.org/) specification. + See the chapter ['Schemas' in 'Defining Processes'](#section/Processes/Defining-Processes) for more information. + + JSON Schemas SHOULD NOT contain `default`, `anyOf`, `oneOf`, `allOf` or `not` at the top-level of the schema. + Instead specify each data type in a separate array element. + + The following more complex JSON Schema keywords SHOULD NOT be used: + `if`, `then`, `else`, `readOnly`, `writeOnly`, `dependencies`, `minProperties`, `maxProperties`, `patternProperties`. + + JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. + Clients are not expected to support dereferencing `$refs`. + + Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. + properties: + subtype: + type: string + description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. + deprecated: + $ref: '#/components/schemas/deprecated' + allOf: + - $ref: '#/components/schemas/json_schema' + oneOf: + - title: Generic + - $ref: '#/components/schemas/process_graph_json_schema' + - $ref: '#/components/schemas/datacube_json_schema' + process_graph_json_schema: + title: Process Graph type: object properties: + subtype: + type: string + enum: + - process-graph parameters: type: array title: Process Graph Parameters @@ -5839,7 +5899,8 @@ components: returns: type: object title: Process Graph Return Value - description: Description of the data that is returned by the child process graph. + description: |- + Description of the data that is returned by the child process graph. required: - schema properties: @@ -5849,35 +5910,57 @@ components: $ref: '#/components/schemas/data_type_schema' allOf: - $ref: '#/components/schemas/process_json_schema' - allOf: - - $ref: '#/components/schemas/process_json_schema' - process_json_schema: - type: object - title: Single data type - description: |- - Specifies a data type supported by a parameter or return value. - - The data types are specified according to the [JSON Schema draft-07](http://json-schema.org/) specification. - See the chapter ['Schemas' in 'Defining Processes'](#section/Processes/Defining-Processes) for more information. - - JSON Schemas SHOULD NOT contain `default`, `anyOf`, `oneOf`, `allOf` or `not` at the top-level of the schema. - Instead specify each data type in a separate array element. - - The following more complex JSON Schema keywords SHOULD NOT be used: - `if`, `then`, `else`, `readOnly`, `writeOnly`, `dependencies`, `minProperties`, `maxProperties`, `patternProperties`. - - JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. - Clients are not expected to support dereferencing `$refs`. - - Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. - allOf: - - $ref: '#/components/schemas/json_schema' - - properties: - subtype: - type: string - description: The allowed sub data type for a value. See the chapter on [subtypes](#section/Processes/Defining-Processes) for more information. - deprecated: - $ref: '#/components/schemas/deprecated' + datacube_json_schema: + title: Datacube + properties: + subtype: + type: string + enum: + - datacube + dimensions: + title: Datacube constraints + description: |- + Allows to specify requirements the data cube has to fulfill. + Right now, it only allows to specify the dimension types and + adds for specific dimension types: + * axes for `spatial` dimensions in raster datacubes + * geometry types for `geometries` dimensions in vector datacubes + type: array + items: + type: object + required: + - type + oneOf: + - title: Spatial (raster) + properties: + type: + type: string + enum: + - spatial + axis: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/dimension_axis_xyz' + - title: Spatial (vector) + properties: + type: + type: string + enum: + - geometries + geometry_type: + type: array + minItems: 1 + items: + $ref: '#/components/schemas/geometry_type' + - title: Other + properties: + type: + type: string + enum: + - bands + - temporal + - other json_schema: type: object title: JSON Schema @@ -5976,6 +6059,17 @@ components: Date and time the file has lastly been modified, formatted as a [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339.html) date-time. example: '2018-01-03T10:55:29Z' + geometry_type: + title: Geometry type + type: string + enum: + - Point + - MultiPoint + - LineString + - MultiLineString + - Polygon + - MultiPolygon + - GeometryCollection GeoJsonPoint3D: type: array description: Point in 3D space @@ -5996,22 +6090,50 @@ components: - Point coordinates: $ref: '#/components/schemas/GeoJsonPoint3D' - GeoJsonGeometry: - title: GeoJSON Geometry + GeoJsonFeatureCollection: type: object required: - type + - features properties: type: type: string enum: - - Point - - LineString - - Polygon - - MultiPoint - - MultiLineString - - MultiPolygon - - GeometryCollection + - 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 + required: + - type + properties: + type: + $ref: '#/components/schemas/geometry_type' discriminator: propertyName: type mapping: @@ -6146,7 +6268,7 @@ components: Data of any type. It is the back-ends task to decide how to best present passed data to a user. - For example, a raster-cube passed to the `inspect` SHOULD return the + For example, a datacube passed to the `inspect` SHOULD return the metadata similar to the collection metadata, including `cube:dimensions`. There are implementation guidelines available for the `inspect` process. path: From 6da01956eadc12f5ab5389036722585e0e9916e5 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 10 Mar 2023 17:12:59 +0100 Subject: [PATCH 07/47] Update name of the geometries dimension #479 --- CHANGELOG.md | 2 +- openapi.yaml | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b648b378..a96b415e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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) - Processes: Added `dimensions` schema for subtype `datacube` -- Collections: Added `vector` dimension type to `cube:dimensions` +- Collections: Added `geometry` dimension type to `cube:dimensions` ### Changed diff --git a/openapi.yaml b/openapi.yaml index f8bad098..5d06b8f2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4374,7 +4374,7 @@ components: * `z` for the dimension of type `spatial` with the axis set to `z` * `t` for the dimension of type `temporal` * `bands` for dimensions of type `bands` - * `geometries` for dimensions of type `geometries` + * `geometry` for dimensions of type `geometry` This property REQUIRES to add a version of the data cube extension to the list of `stac_extensions`, e.g. `https://stac-extensions.github.io/datacube/v2.2.0/schema.json`. @@ -4666,7 +4666,7 @@ components: - spatial - temporal - bands - - geometries + - geometry - other description: $ref: '#/components/schemas/description' @@ -4676,7 +4676,7 @@ components: spatial: '#/components/schemas/dimension_spatial' temporal: '#/components/schemas/dimension_temporal' bands: '#/components/schemas/dimension_bands' - geometries: '#/components/schemas/dimension_geometries' + geometry: '#/components/schemas/dimension_geometry' other: '#/components/schemas/dimension_other' dimension_other: allOf: @@ -4703,10 +4703,10 @@ components: reference_system: description: The reference system for the dimension. type: string - dimension_geometries: + dimension_geometry: allOf: - $ref: '#/components/schemas/dimension' - - title: Geometries Dimension + - title: Geometry Dimension type: object required: - bbox @@ -5924,7 +5924,7 @@ components: Right now, it only allows to specify the dimension types and adds for specific dimension types: * axes for `spatial` dimensions in raster datacubes - * geometry types for `geometries` dimensions in vector datacubes + * geometry types for `geometry` dimensions in vector datacubes type: array items: type: object @@ -5947,7 +5947,7 @@ components: type: type: string enum: - - geometries + - geometry geometry_type: type: array minItems: 1 From d72b34762f1e8cae68f23ef78cb697167f3a5612 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 30 Mar 2023 11:44:03 +0200 Subject: [PATCH 08/47] Update CI --- .github/workflows/docs.yml | 6 +++--- .github/workflows/tests.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 63e6176d..6480d290 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,10 +12,10 @@ jobs: steps: - name: Inject env variables uses: rlespinasse/github-slug-action@v3.x - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: - node-version: '16' - - uses: actions/checkout@v2 + node-version: 'lts/*' + - uses: actions/checkout@v3 - run: | npm install npm run build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f896959..64b0febd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,10 +4,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: - node-version: '16' - - uses: actions/checkout@v2 + node-version: 'lts/*' + - uses: actions/checkout@v3 - name: Run tests run: | npm install From b7398b3129e0a1d379dab684a0f23528af5c7548 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 30 Mar 2023 11:44:37 +0200 Subject: [PATCH 09/47] Fix batch job result summary #482 --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 5d06b8f2..1eb124ca 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3117,7 +3117,7 @@ paths: parameters: - $ref: '#/components/parameters/job_id' get: - summary: Download results for a batch job + summary: List batch job results operationId: list-results description: |- Lists signed URLs pointing to the processed files, usually after the batch job From c3f8512ca2c7f3a20c49b0b0540e3f255ee86216 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 4 Apr 2023 15:21:24 +0200 Subject: [PATCH 10/47] Fixed broken STAC (internal) link #486 --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 1eb124ca..afe83d34 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -4435,7 +4435,7 @@ components: type: string description: >- The [version of the STAC specification](https://github.com/radiantearth/stac-spec/releases), - which MAY not be equal to the [STAC API version](#section/STAC). + which MAY not be equal to the [STAC API version](#tag/EO-Data-Discovery/STAC). Supports versions 0.9.x and 1.x.x. pattern: '^(0\.9.\d+|1\.\d+.\d+)' example: 1.0.0 From 47ae3226a5cf2b17aed8f76b7f6c149647e6687f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 11 Apr 2023 13:07:45 +0200 Subject: [PATCH 11/47] Explicitly specify metadata filters for collections through queryables #396 (#487) --- CHANGELOG.md | 2 + openapi.yaml | 130 ++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 110 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a96b415e..f507139b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Recommendation for UDF runtime names. [#409](https://github.com/Open-EO/openeo-api/issues/409) - Processes: Added `dimensions` schema for subtype `datacube` - Collections: Added `geometry` dimension type to `cube:dimensions` +- New endpoint for metadata filters (queryables): `/collections/{collection_id}/queryables`. Also adds a new rel type to the collection links. [#396](https://github.com/Open-EO/openeo-api/issues/396) ### Changed @@ -61,6 +62,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `GET /services` and `GET /services/{service_id}`: Clarify that `enabled` is required by removing the default value. [#473](https://github.com/Open-EO/openeo-api/issues/473) - Several appearances of `nullable` were clarified according to the lint report by Spectral - Clarify how the well-known document works [#460](https://github.com/Open-EO/openeo-api/issues/460) +- Clarify handling of JSON Schema versions ## [1.1.0] - 2021-05-17 diff --git a/openapi.yaml b/openapi.yaml index afe83d34..34ef8f05 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1374,12 +1374,7 @@ paths: - {} - Bearer: [] parameters: - - name: collection_id - in: path - description: Collection identifier - required: true - schema: - $ref: '#/components/schemas/collection_id' + - $ref: '#/components/parameters/collection_id' responses: '200': description: JSON object with the full collection metadata. @@ -1436,6 +1431,9 @@ paths: - rel: license href: https://scihub.copernicus.eu/twiki/pub/SciHubWebPortal/TermsConditions/Sentinel_Data_Terms_and_Conditions.pdf type: application/pdf + - rel: http://www.opengis.net/def/rel/ogc/1.0/queryables + href: https://example.openeo.org/api/collections/Sentinel-2A/queryables + type: application/schema+json - rel: about href: https://earth.esa.int/web/sentinel/user-guides/sentinel-2-msi/product-types/level-1c type: text/html @@ -1574,6 +1572,67 @@ paths: $ref: '#/components/responses/client_error_auth' 5XX: $ref: '#/components/responses/server_error' + '/collections/{collection_id}/queryables': + get: + summary: Metadata filters for a specific dataset + operationId: list-collection-queryables + description: |- + Lists **all** supported metadata filters (also called "queryables") for + a specific collection. + + This endpoint is compatible with 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. + + This endpoints provides a JSON Schema for each queryable that openEO + users can use in multiple scenarios: + 1. For loading data from the collection, e.g. in the process `load_collection`. + 2. For filtering items using CQL2 on the `/collections/{collection_id}/items` endpoint + (if [STAC API - Features is implemented in addition to the openEO API](#tag/EO-Data-Discovery/STAC)). + + Note: Providing the Bearer token is REQUIRED for private collections. + tags: + - EO Data Discovery + security: + - {} + - Bearer: [] + parameters: + - $ref: '#/components/parameters/collection_id' + responses: + '200': + description: |- + A JSON Schema defining the queryables. + + It is RECOMMENDED to dereference all "$refs". + content: + application/schema+json: + schema: + $ref: '#/components/schemas/json_schema' + example: + $schema: https://json-schema.org/draft/2019-09/schema + $id: https://example.com/api/v1.0/collections/Sentinel-2A/queryables + type: object + title: Sentinel 2A + properties: + 'eo:cloud_cover': + title: Cloud Cover + type: number + minimum: 0 + maximum: 100 + platform: + title: Platform + description: The satellite platform. + type: string + enum: + - sentinel-2a + - sentinel-2b + additionalProperties: false + + 4XX: + $ref: '#/components/responses/client_error_auth' + 5XX: + $ref: '#/components/responses/server_error' /processes: get: summary: Supported predefined processes @@ -4327,7 +4386,7 @@ components: - '2011-11-11T12:22:11Z' - null links: - description: >- + description: |- Links related to this collection. Could reference to licensing information, other meta data formats with additional information or a preview image. @@ -4352,6 +4411,10 @@ components: catalog service such as OGC CSW, a human-readable HTML version or a metadata document following another standard such as ISO 19115 or DCAT. + 6. `http://www.opengis.net/def/rel/ogc/1.0/queryables`: URL to the + queryables endpoint at `/collections/{collection_id}/queryables`. + For JSON Schema documents, the `type` field must be set to `application/schema+json`. + For additional relation types see also the lists of [common relation types in openEO](#section/API-Principles/Web-Linking) and the STAC specification for Collections. @@ -5159,7 +5222,7 @@ components: description: The return value which can by of any data type. links: type: array - description: >- + description: |- Links related to this process, e.g. additional external documentation. It is RECOMMENDED to provide links with the following `rel` (relation) types: @@ -5965,15 +6028,32 @@ components: type: object title: JSON Schema description: |- - A JSON Schema compliant to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html). - JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). This allows clients to consume the schemas much better. + A JSON Schema compliant to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html) or later. + + JSON Schemas SHOULD always be dereferenced (i.e. all `$refs` should be resolved). + This allows clients to consume the schemas much better. Clients are not expected to support dereferencing `$refs`. - Note: The specified schema is only a common subset of JSON Schema. Additional keywords MAY be used. + Note: The specified schema in the OpenAPI document is only a common subset of JSON Schema. + Additional keywords from the JSON Schema specification MAY be used. properties: + $schema: + description: |- + The JSON Schema version. If not given in the context of openEO, + defaults to `draft-07`. + + You may need to add the default value for `$schema` property explicitly to the JSON Schema + object before passing it to a JSON Schema validator. + type: string + format: uri + default: http://json-schema.org/draft-07/schema# + $id: + description: ID of your JSON Schema. + type: string + format: uri type: description: |- - The allowed basic data type(s) for a value according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.1). + The allowed basic data type(s) for a value. If this property is not present, all data types are allowed. oneOf: @@ -5986,28 +6066,28 @@ components: pattern: type: "string" format: "regex" - description: The regular expression a string value must match against. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.3.3). + description: The regular expression a string value must match against. enum: type: array items: {} - description: An exclusive list of allowed values. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.1.2). + description: An exclusive list of allowed values. minimum: type: number - description: The minimum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.4). + description: The minimum value (inclusive) allowed for a numerical value. maximum: type: number - description: The maximum value (inclusive) allowed for a numerical value. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.2.2). + description: The maximum value (inclusive) allowed for a numerical value. minItems: type: number minimum: 0 default: 0 - description: The minimum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.4). + description: The minimum number of items required in an array. maxItems: type: number minimum: 0 - description: The maximum number of items required in an array. See [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.3). + description: The maximum number of items required in an array. items: - description: Specifies schemas for the items in an array according to [JSON Schema draft-07](https://json-schema.org/draft-07/json-schema-validation.html#rfc.section.6.4.1). + description: Specifies schemas for the items in an array. anyOf: - type: array minItems: 1 @@ -6016,9 +6096,8 @@ components: - $ref: '#/components/schemas/json_schema' additionalProperties: description: >- - You can add any other property supported by JSON Schema, either - [draft-07](https://json-schema.org/draft-07/json-schema-validation.html) - or any later version. + 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. json_schema_type: type: string enum: @@ -6509,6 +6588,13 @@ components: required: true schema: $ref: '#/components/schemas/job_id' + collection_id: + name: collection_id + in: path + description: Collection identifier + required: true + schema: + $ref: '#/components/schemas/collection_id' examples: evi_user_defined_process: description: A user-defined process that computes the EVI. From 380a756700c32408ab1428a59e85a191fe89a5e8 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 18 Apr 2023 15:20:27 +0200 Subject: [PATCH 12/47] Add minimum log_level parameter for GET /../logs #485 (#488) --- CHANGELOG.md | 3 ++- openapi.yaml | 32 ++++++++++++++++++++++++++++---- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f507139b..b36fd047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,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` and `POST /result`: Added `log_level` property in responses to reflect the minimum log level that has been chosen by the user. [#329](https://github.com/Open-EO/openeo-api/issues/329) +- `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) - 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) - 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) diff --git a/openapi.yaml b/openapi.yaml index 34ef8f05..d0efd735 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2857,6 +2857,7 @@ paths: parameters: - $ref: '#/components/parameters/service_id' - $ref: '#/components/parameters/log_offset' + - $ref: '#/components/parameters/log_level' - $ref: '#/components/parameters/pagination_limit' responses: '200': @@ -3164,6 +3165,7 @@ paths: parameters: - $ref: '#/components/parameters/job_id' - $ref: '#/components/parameters/log_offset' + - $ref: '#/components/parameters/log_level' - $ref: '#/components/parameters/pagination_limit' responses: '200': @@ -6458,11 +6460,13 @@ components: - logs - links properties: - log_level: + level: description: |- The minimum severity level for log entries that the back-end returns. - This property MUST reflect the `log_level` that has been specified by the user - for the processing request. + This property MUST reflect the effective lowest `level` that may appear in the document, + which is (if implemented) the highest level of: + 1. the `log_level` specified by the user for the processing request. + 2. the `level` specified by the user for the log request. The order of the levels is as follows (from low to high severity): `debug`, `info`, `warning`, `error`. That means if `warning` is set, the logs will only contain entries with the level `warning` and `error`. @@ -6571,9 +6575,29 @@ components: 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. in: query allowEmptyValue: true - example: "log1234" + example: log1234 schema: type: string + log_level: + name: level + description: |- + The minimum severity level for log entries that the back-end returns. + + 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 return log entries with the level `warning` and `error`. + + The default minimum log level is `debug`, which returns all log levels. + in: query + allowEmptyValue: true + example: error + schema: + type: string + enum: + - error + - warning + - info + - debug + default: info service_id: name: service_id in: path From 23703078b8d8f73d02bef73d2bba2c05a0c5c1d4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Tue, 18 Apr 2023 15:57:56 +0200 Subject: [PATCH 13/47] Better example (openeo) domains #489 and minor clean-up --- extensions/commercial-data/README.md | 2 +- extensions/commercial-data/openapi.yaml | 6 +- openapi.yaml | 167 ++++++++++++------------ 3 files changed, 86 insertions(+), 89 deletions(-) diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index bf32e3f7..3fe7c177 100644 --- a/extensions/commercial-data/README.md +++ b/extensions/commercial-data/README.md @@ -90,7 +90,7 @@ Example response from `GET /collections/PLEIADES/queryables`: ```json { "$schema":"http://json-schema.org/draft-07/schema#", - "$id":"http://example.com/commercial_data/PLEIADES/queryables", + "$id":"http://openeo.example/collections/PLEIADES/queryables", "type":"object", "title":"Queryables of Airbus Pleiades collection.", "description":"Available properties for CQL filtering of products.", diff --git a/extensions/commercial-data/openapi.yaml b/extensions/commercial-data/openapi.yaml index 0bac3678..c2c2d1a2 100644 --- a/extensions/commercial-data/openapi.yaml +++ b/extensions/commercial-data/openapi.yaml @@ -18,7 +18,7 @@ tags: - name: Orders description: Management of commercial data orders servers: - - url: 'https://localhost/api/{version}' + - 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, @@ -26,7 +26,7 @@ servers: secure with HTTP only! variables: version: - default: v1.0 + default: v1 description: >- API versioning is RECOMMENDED. As the openEO API is following [SemVer](https://semver.org/) only the MAJOR part of the stable @@ -130,7 +130,7 @@ paths: unique identifier (ID) of the created order. format: uri type: string - example: 'https://example.openeo.org/api/orders/40264b5-c3ae-46f4-a907-0f612d763d97' + example: 'https://openeo.example/api/v1/orders/40264b5-c3ae-46f4-a907-0f612d763d97' OpenEO-Identifier: required: true schema: diff --git a/openapi.yaml b/openapi.yaml index d0efd735..30b5b287 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -56,8 +56,8 @@ info: 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. 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://example.com/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://example.com/processes/81zjh1tc2pt52gbx/ndvi`. + 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. @@ -80,7 +80,7 @@ info: "id": "936DA01F-9ABD-4D9D-80C7-02AF85C822A8", "code": "SampleError", "message": "A sample error message.", - "url": "https://example.openeo.org/docs/errors/SampleError" + "url": "https://openeo.example/docs/errors/SampleError" } ``` @@ -180,8 +180,8 @@ info: ```http POST /api/v1/jobs HTTP/1.1 - Host: openeo.cloudprovider.com - Origin: https://client.org:8080 + Host: openeo.example + Origin: https://company.example:8080 Authorization: Bearer basic//ZXhhbXBsZTpleGFtcGxl ``` @@ -192,7 +192,7 @@ info: Access-Control-Allow-Origin: * Access-Control-Expose-Headers: Location, OpenEO-Identifier, OpenEO-Costs, Link Content-Type: application/json - Location: https://openeo.cloudprovider.com/api/v1/jobs/abc123 + Location: https://openeo.example/api/v1/jobs/abc123 OpenEO-Identifier: abc123 ``` @@ -213,8 +213,8 @@ info: ```http OPTIONS /api/v1/jobs HTTP/1.1 - Host: openeo.cloudprovider.com - Origin: https://client.org:8080 + Host: openeo.example + Origin: https://company.example:8080 Access-Control-Request-Method: POST Access-Control-Request-Headers: Authorization, Content-Type ``` @@ -546,7 +546,7 @@ tags: - name: File Storage description: Management of user-uploaded assets and processed data. servers: - - url: 'https://localhost/api/{version}' + - 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, @@ -640,7 +640,7 @@ paths: title: type: string description: The name of the service. - example: Cool EO Cloud + example: Example Cloud Corp. description: type: string format: commonmark @@ -651,12 +651,12 @@ paths: [CommonMark 0.29](http://commonmark.org/) syntax MAY be used for rich text representation. example: |- - This service is provided to you by [Cool EO Cloud Corp.](https://cool-eo-cloud-corp.com). It implements the full openEO API and allows to process a range of 999 EO data sets, including + This service is provided to you by [Example Cloud Corp.](https://cloud.example). It implements the full openEO API and allows to process a range of 999 EO data sets, including * Sentinel 1/2/3 and 5 * Landsat 7/8 - A free plan is available to test the service. For further information please contact our customer service at [support@cool-eo-cloud-corp.com](mailto:support@cool-eo-cloud-corp.com). + A free plan is available to test the service. For further information please contact our customer service at [support@cloud.example](mailto:support@cloud.example). production: $ref: '#/components/schemas/production' endpoints: @@ -805,19 +805,19 @@ paths: URL to a web page with more details about the plan. format: uri - example: 'https://cool-cloud-corp.com/plans/free-plan' + example: 'https://cloud.example/plans/free-plan' example: - name: free description: >- Free plan. Calculates one tile per second and a maximum amount of 100 tiles per hour. - url: 'https://cool-cloud-corp.com/plans/free-plan' + url: 'https://cloud.example/plans/free-plan' paid: false - name: premium description: >- Premium plan. Calculates unlimited tiles and each calculated tile costs 0.003 USD. - url: 'https://cool-cloud-corp.com/plans/premium-plan' + url: 'https://cloud.example/plans/premium-plan' paid: true links: description: |- @@ -871,35 +871,35 @@ paths: items: $ref: '#/components/schemas/link' example: - - href: 'http://www.cool-cloud-corp.com' + - href: 'https://cloud.example' rel: about type: text/html title: Homepage of the service provider - - href: 'https://www.cool-cloud-corp.com/tos' + - href: 'https://cloud.example/tos' rel: terms-of-service type: text/html title: Terms of Service - - href: 'https://www.cool-cloud-corp.com/privacy' + - href: 'https://cloud.example/privacy' rel: privacy-policy type: text/html title: Privacy Policy - - href: 'https://www.cool-cloud-corp.com/register' + - href: 'https://cloud.example/register' rel: create-form type: text/html title: User Registration - - href: 'https://www.cool-cloud-corp.com/lost-password' + - href: 'https://cloud.example/lost-password' rel: recovery-form type: text/html title: Reset Password - - href: 'http://www.cool-cloud-corp.com/.well-known/openeo' + - href: 'https://cloud.example/.well-known/openeo' rel: version-history type: application/json title: List of supported openEO versions - - href: 'http://www.cool-cloud-corp.com/api/v1.0/conformance' + - href: 'https://cloud.example/api/v1/conformance' rel: conformance type: application/json title: OGC Conformance Classes - - href: 'http://www.cool-cloud-corp.com/api/v1.0/collections' + - href: 'https://cloud.example/api/v1/collections' rel: data type: application/json title: List of Datasets @@ -945,9 +945,11 @@ paths: given by the user. **This URI MUST NOT be versioned as the other endpoints.** - If your API is available at `https://example.com/openeo/api/v1.0`, and - you instruct your API users to use `https://example.com/openeo` as connection URI, - the Well-Known URI SHOULD be located at `https://example.com/openeo/.well-known/openeo`. + If your API is available at `https://openeo.example/api/v1`, and + you instruct your API users to use `https://openeo.example` as connection URI, + the Well-Known URI SHOULD be located at `https://openeo.example/.well-known/openeo`. + The Well-Known URI is usually directly located at the top-level, but it is not a + requirement. For example, `https://openeo.example/eo/.well-known/openeo` is also allowed. Clients MAY get additional information (e.g. title or description) about a back-end from the most recent version that has the `production` flag @@ -957,7 +959,7 @@ paths: security: - {} servers: - - url: 'https://localhost' + - url: 'https://openeo.example' description: >- The Well-Known URI SHOULD be available directly at `https://{{domain}}/.well-known/openeo` in contrast to the other @@ -989,7 +991,7 @@ paths: type: string format: uri description: '*Absolute* URLs to the service.' - example: 'https://example.com/api/v1.0' + example: 'https://openeo.example/api/v1' production: $ref: '#/components/schemas/production' api_version: @@ -999,13 +1001,13 @@ paths: back-end implements. example: versions: - - url: 'https://example.openeo.org/api/v0.5' + - url: 'https://openeo.example/api/v0' api_version: 0.5.1 - - url: 'https://example.openeo.org/api/v1.0' - api_version: 1.0.0 - - url: 'https://example.openeo.org/api/v1.1' + - url: 'https://openeo.example/api/v1' + api_version: 1.2.0 + - url: 'https://dev.openeo.example/api/v2' production: false - api_version: 1.1.0-beta + api_version: 2.0.0-beta 4XX: $ref: '#/components/responses/client_error' 5XX: @@ -1343,10 +1345,10 @@ paths: - null links: - rel: license - href: 'https://example.openeo.org/api/collections/MOD09Q1/license' + href: 'https://openeo.example/api/v1/collections/MOD09Q1/license' links: - rel: alternate - href: 'https://example.openeo.org/csw' + href: 'https://openeo.example/csw' title: openEO catalog (OGC Catalogue Services 3.0) 4XX: $ref: '#/components/responses/client_error_auth' @@ -1432,18 +1434,18 @@ paths: href: https://scihub.copernicus.eu/twiki/pub/SciHubWebPortal/TermsConditions/Sentinel_Data_Terms_and_Conditions.pdf type: application/pdf - rel: http://www.opengis.net/def/rel/ogc/1.0/queryables - href: https://example.openeo.org/api/collections/Sentinel-2A/queryables + href: https://openeo.example/api/v1/collections/Sentinel-2A/queryables type: application/schema+json - rel: about href: https://earth.esa.int/web/sentinel/user-guides/sentinel-2-msi/product-types/level-1c type: text/html title: ESA Sentinel-2 MSI Level-1C User Guide - rel: example - href: 'https://example.openeo.org/api/collections/Sentinel-2/examples/true-color.json' + href: 'https://openeo.example/api/v1/collections/Sentinel-2/examples/true-color.json' type: application/json title: Example Process for True-Color Visualization - rel: example - href: 'https://example.openeo.org/api/collections/Sentinel-2/examples/ndvi.json' + href: 'https://openeo.example/api/v1/collections/Sentinel-2/examples/ndvi.json' type: application/json title: Example Process for NDVI Calculation and Visualization 'cube:dimensions': @@ -1556,13 +1558,13 @@ paths: max: 32660 assets: thumbnail: - href: 'https://example.openeo.org/api/collections/Sentinel-2/thumbnail.png' + href: 'https://openeo.example/api/v1/collections/Sentinel-2/thumbnail.png' type: image/png title: Preview roles: - thumbnail inspire: - href: 'https://example.openeo.org/api/collections/Sentinel-2/inspire.xml' + href: 'https://openeo.example/api/v1/collections/Sentinel-2/inspire.xml' type: application/xml title: INSPIRE metadata description: INSPIRE compliant XML metadata @@ -1611,7 +1613,7 @@ paths: $ref: '#/components/schemas/json_schema' example: $schema: https://json-schema.org/draft/2019-09/schema - $id: https://example.com/api/v1.0/collections/Sentinel-2A/queryables + $id: https://openeo.example/api/v1/collections/Sentinel-2A/queryables type: object title: Sentinel 2A properties: @@ -1757,7 +1759,7 @@ paths: title: IEEE Standard 754-2019 for Floating-Point Arithmetic links: - rel: alternate - href: 'https://provider.com/processes' + href: 'https://openeo.example/processes' type: text/html title: HTML version of the processes 4XX: @@ -2255,7 +2257,7 @@ paths: schema: type: string pattern: ^<[^>]+>;\s?rel="monitor" - example: ; rel="monitor" + example: ; rel="monitor" 4XX: $ref: '#/components/responses/client_error_auth' 5XX: @@ -2699,7 +2701,7 @@ paths: metadata endpoint in the property `url`. format: uri type: string - example: 'https://example.openeo.org/api/services/123' + example: 'https://openeo.example/api/v1/services/123' OpenEO-Identifier: required: true schema: @@ -2935,7 +2937,7 @@ paths: unique identifier (ID) of the created batch job. format: uri type: string - example: 'https://example.openeo.org/api/jobs/123' + example: 'https://openeo.example/api/v1/jobs/123' OpenEO-Identifier: required: true schema: @@ -3284,13 +3286,13 @@ paths: description: Deriving minimum NDVI measurements over pixel time series of Sentinel 2 license: Apache-2.0 providers: - - name: Cool EO Cloud Corp + - name: Example Cloud Corp. description: No further processing applied. roles: - producer - licensor - host - url: http://cool-eo-cloud-corp.com + url: https://cloud.example extent: temporal: interval: @@ -3304,30 +3306,30 @@ paths: - 90 assets: preview.png: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/preview.png' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/preview.png' type: image/png title: Thumbnail roles: - thumbnail process.json: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/process.json' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/process.json' type: application/json title: Original Process roles: - process - reproduction 1.tif: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/1.tif' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/1.tif' type: image/tiff; application=geotiff roles: - data 2.tif: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/2.tif' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/2.tif' type: image/tiff; application=geotiff roles: - data inspire.xml: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/inspire.xml' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/inspire.xml' type: application/xml title: INSPIRE metadata description: INSPIRE compliant XML metadata @@ -3336,13 +3338,13 @@ paths: links: - rel: canonical type: application/json - href: https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/collection.json + href: https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/collection.json - rel: item type: application/geo+json - href: https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/item_1.json + href: https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/item_1.json - rel: item type: application/geo+json - href: https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/item_2.json + href: https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/item_2.json application/geo+json: schema: $ref: '#/components/schemas/batch_job_result' @@ -3698,19 +3700,19 @@ paths: items: $ref: '#/components/schemas/link' example: - - href: 'https://example.openeo.org/john_doe/payment/' + - href: 'https://openeo.example/john_doe/payment/' rel: payment - - href: 'https://example.openeo.org/john_doe/edit/' + - href: 'https://openeo.example/john_doe/edit/' rel: edit-form - - href: 'https://example.openeo.org/john_doe/' + - href: 'https://openeo.example/john_doe/' rel: alternate type: text/html title: User profile - - href: 'https://example.openeo.org/john_doe.vcf' + - href: 'https://openeo.example/john_doe.vcf' rel: alternate type: text/vcard title: vCard of John Doe - - href: 'https://example.openeo.org/john_doe/invoices' + - href: 'https://openeo.example/john_doe/invoices' rel: related type: text/html title: Invoices @@ -4009,7 +4011,7 @@ components: example: - rel: canonical type: application/geo+json - href: https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/item.json + href: https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/item.json file_format: x-additionalPropertiesName: File Format Name title: File Format @@ -4113,7 +4115,7 @@ components: type: string description: The value MUST be a valid URL. format: uri - example: 'https://example.openeo.org' + example: 'https://openeo.example' type: type: string description: >- @@ -4516,7 +4518,7 @@ components: - title: Reference to a JSON Schema type: string format: uri - example: 'https://www.example.com/stac/custom-extemsion/v1.0/schema.json' + 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) type: string example: datacube @@ -4550,7 +4552,7 @@ components: name: description: The name of the organization or the individual. type: string - example: Cool EO Cloud Corp + example: Example Cloud Corp. description: description: >- Multi-line description to add further provider information such as @@ -4562,24 +4564,19 @@ components: type: string example: No further processing applied. roles: - description: >- + description: |- Roles of the provider. - The provider's role(s) can be one or more of the following elements: - - * licensor: The organization that is licensing the dataset under + * `licensor`: The organization that is licensing the dataset under the license specified in the collection's license field. - - * producer: The producer of the data is the provider that + * `producer`: The producer of the data is the provider that initially captured and processed the source data, e.g. ESA for Sentinel-2 data. - - * processor: A processor is any provider who processed data to a + * `processor`: A processor is any provider who processed data to a derived product. - - * host: The host is the actual provider offering the data on their + * `host`: The host is the actual provider offering the data on their storage. There SHOULD be no more than one host, specified as last element of the list. type: array @@ -4600,7 +4597,7 @@ components: contact information. type: string format: uri - example: http://cool-eo-cloud-corp.com + example: https://cloud.example stac_assets: type: object title: Assets @@ -4611,32 +4608,32 @@ components: $ref: '#/components/schemas/asset' example: preview.png: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/preview.png' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/preview.png' type: image/png title: Thumbnail roles: - thumbnail process.json: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/process.json' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/process.json' type: application/json title: Original Process roles: - process - reproduction 1.tif: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/1.tif' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/1.tif' type: image/tiff; application=geotiff title: Band 1 roles: - data 2.tif: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/2.tif' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/2.tif' type: image/tiff; application=geotiff title: Band 2 roles: - data inspire.xml: - href: 'https://example.openeo.org/api/download/583fba8b2ce583fba8b2ce/inspire.xml' + href: 'https://openeo.example/api/v1/download/583fba8b2ce583fba8b2ce/inspire.xml' type: application/xml title: INSPIRE metadata description: INSPIRE compliant XML metadata @@ -5590,11 +5587,11 @@ components: - rel: result type: application/json title: Batch Job Results - href: https://www.cool-cloud-corp.com/api/v1.0/jobs/123/logs + href: https://openeo.example/api/v1/jobs/123/logs - rel: result type: application/json title: Batch Job Logs - href: https://www.cool-cloud-corp.com/api/v1.0/jobs/123/logs + href: https://openeo.example/api/v1/jobs/123/logs job_id: type: string description: >- @@ -5686,7 +5683,7 @@ components: description: >- URL at which the secondary web service is accessible. Doesn't necessarily need to be located within the API. - example: 'https://example.openeo.org/wms/wms-a3cca9' + example: 'https://openeo.example/wms/wms-a3cca9' type: $ref: '#/components/schemas/service_type' enabled: @@ -5843,7 +5840,7 @@ components: items: $ref: '#/components/schemas/link' example: - - href: 'https://example.openeo.org/docs/errors/SampleError' + - href: 'https://openeo.example/docs/errors/SampleError' rel: about log_level: description: |- @@ -6335,7 +6332,7 @@ components: It is NOT RECOMMENDED to add stacktraces to the `message`. example: >- - Can't load the UDF file from the URL `https://example.com/invalid/file.txt`. + Can't load the UDF file from the URL `https://openeo.example/invalid/file.txt`. Server responded with error 404. time: type: string From 9fcebd104c9854ee302a2a4ee3873eb2e20fc1c4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr <8262166+m-mohr@users.noreply.github.com> Date: Tue, 2 May 2023 16:04:19 +0200 Subject: [PATCH 14/47] Add experimental and deprecated to back-ends in federation extension (#491) --- extensions/federation/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/extensions/federation/README.md b/extensions/federation/README.md index f3d32ea8..3c8aa4a7 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -64,6 +64,18 @@ schema: description: >- If the `status` is `offline`: The time at which the back-end was checked and available the last time. Otherwise, this is equal to the property `last_status_check`. + experimental: + type: boolean + description: >- + Declares the back-end to be experimental, which means that + it is likely to change or may produce unpredictable behaviour. + default: false + deprecated: + type: boolean + description: |- + Declares the back-end to be deprecated with the potential + to be removed in any of the next versions. + default: false ``` ### Example @@ -84,7 +96,8 @@ schema: "title": "WWU Münster", "url": "https://openeo.wwu.de", "status": "offline", - "description": "Experimental integration of the WWU HPC" + "description": "Experimental integration of the WWU HPC", + "experimental": true } }, ... From b2dd2fa94b7a4f0a53ea5b0f9e7f384f46f4986e Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 3 May 2023 15:40:25 +0200 Subject: [PATCH 15/47] Update conformance classes #186 --- CHANGELOG.md | 2 +- README.md | 8 ++++---- openapi.yaml | 38 ++++++++++++++++++++++++++------------ 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b36fd047..7b2c2a22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Relaxed requirement that unsupported endpoints must return HTTP status code 501. Instead also HTTP status code 404 can be used (and is regularly used in practice). [#415](https://github.com/Open-EO/openeo-api/issues/415) - Minimum value for `costs` and `budget` is 0. - `GET /jobs/{job_id}/estimate`: If a batch job can't be estimated reliably, a `EstimateComplexity` error should be returned. [#443](https://github.com/Open-EO/openeo-api/issues/443) -- The `/conformance` endpoint is now generally used for OGC APIs, STAC API and openEO. All openEO and all extensions got individual conformance classes. [#186](https://github.com/Open-EO/openeo-api/issues/186) +- The `/conformance` endpoint is now generally used for OGC APIs, STAC API and openEO. `conformsTo` is also exposed in `GET /` for STAC APIs. The openEO API and all extensions got individual conformance classes. [#186](https://github.com/Open-EO/openeo-api/issues/186) ### Fixed diff --git a/README.md b/README.md index a1cc5883..44fd9ce1 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,10 @@ 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.1.0 | experimental | Covers federation aspects, i.e. where multiple back-ends are exposed as a single API. | ## Repository diff --git a/openapi.yaml b/openapi.yaml index 30b5b287..c25186b6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5,6 +5,8 @@ info: description: |- The openEO API specification for interoperable cloud-based processing of large Earth observation datasets. + **Conformance class:** `https://api.openeo.org/1.1.0` + # API Principles ## Language @@ -657,6 +659,8 @@ paths: * Landsat 7/8 A free plan is available to test the service. For further information please contact our customer service at [support@cloud.example](mailto:support@cloud.example). + conformsTo: + $ref: '#/components/schemas/conformsTo' production: $ref: '#/components/schemas/production' endpoints: @@ -1186,7 +1190,10 @@ paths: the [capabilties](#tag/Capabilities/operation/capabilities) in openEO. The general openEO conformance class is `https://api.openeo.org/1.1.0`. - See the individual extensions for their conformance classes. + See the individual openEO API extensions for their conformance classes. + + The conformance classes listed at this endpoint and listed in the + corresponding `conformsTo` property in `GET /` MUST be equal. More details: - [STAC API](https://github.com/radiantearth/stac-api-spec), especially "STAC API - Collections and Features Specification" @@ -1205,17 +1212,7 @@ paths: - conformsTo properties: conformsTo: - type: array - items: - type: string - format: uri - example: http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core - example: - conformsTo: - - https://api.openeo.org/1.1.0 - - https://api.openeo.org/extensions/commercial-data/0.1.0 - - https://api.openeo.org/extensions/federation/0.1.0 - - https://api.stacspec.org/v1.0.0-rc.2/collections + $ref: '#/components/schemas/conformsTo' 5XX: $ref: '#/components/responses/server_error' /collections: @@ -3722,6 +3719,23 @@ paths: $ref: '#/components/responses/server_error' components: schemas: + conformsTo: + 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. + + The general openEO conformance class is `https://api.openeo.org/1.1.0`. + See the individual openEO API extensions for their conformance classes. + type: array + items: + type: string + format: uri + example: + - https://api.openeo.org/1.1.0 + - https://api.openeo.org/extensions/commercial-data/0.1.0 + - https://api.openeo.org/extensions/federation/0.1.0 + - https://api.stacspec.org/v1.0.0/collections udf_runtime: type: object required: From 34ae614a036cd930f2bb6ea856ffa9dba1389184 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 3 May 2023 15:57:18 +0200 Subject: [PATCH 16/47] Update STAC references #469 --- openapi.yaml | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index c25186b6..90378bb7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -515,7 +515,7 @@ tags: 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 only implements [STAC API version 0.9.0](https://github.com/radiantearth/stac-spec/blob/v0.9.0/api-spec/README.md), which allows to serve all STAC specification versions in the range of 0.9.x and 1.x.x (see the `stac_version` property). + 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). ### Content Extensions @@ -534,6 +534,10 @@ 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). + + ### 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)'. @@ -1196,7 +1200,7 @@ paths: corresponding `conformsTo` property in `GET /` MUST be equal. More details: - - [STAC API](https://github.com/radiantearth/stac-api-spec), especially "STAC API - Collections and Features Specification" + - [STAC API](https://github.com/radiantearth/stac-api-spec), especially the conformance class "STAC API - Collections" - [OGC APIs](https://ogcapi.ogc.org/) tags: - Capabilities @@ -1228,10 +1232,9 @@ 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](https://stacspec.org) and - [OGC API - Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html). - [STAC API](https://github.com/radiantearth/stac-spec/tree/v0.9.0/api-spec) - features / extensions and + This endpoint is compatible with [STAC API 0.9.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) can be implemented in addition to what is documented here. @@ -1359,10 +1362,9 @@ paths: Lists **all** information about a specific collection specified by the identifier `collection_id`. - This endpoint is compatible with [STAC API](https://stacspec.org) and - [OGC API - Features](http://docs.opengeospatial.org/is/17-069r3/17-069r3.html). - [STAC API](https://github.com/radiantearth/stac-spec/tree/v0.9.0/api-spec) - features / extensions and + This endpoint is compatible with [STAC API 0.9.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) can be implemented in addition to what is documented here. @@ -3727,6 +3729,8 @@ components: The general openEO conformance class is `https://api.openeo.org/1.1.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 @@ -4309,7 +4313,7 @@ components: Version of the collection. This property REQUIRES to add `version` (STAC < 1.0.0-rc.1) or - `https://stac-extensions.github.io/version/v1.0.0/schema.json` (STAC >= 1.0.0-rc.1) + `https://stac-extensions.github.io/version/v1.2.0/schema.json` (STAC >= 1.0.0-rc.1) to the list of `stac_extensions`. deprecated: type: boolean @@ -4323,7 +4327,7 @@ components: links and MUST refer to the collection that can be used instead. This property REQUIRES to add `version` (STAC < 1.0.0-rc.1) or - `https://stac-extensions.github.io/version/v1.0.0/schema.json` (STAC >= 1.0.0-rc.1) + `https://stac-extensions.github.io/version/v1.2.0/schema.json` (STAC >= 1.0.0-rc.1) to the list of `stac_extensions`. license: $ref: '#/components/schemas/stac_license' From f47c072ca41315b32ed4910797aef167e965ff57 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 3 May 2023 17:37:14 +0200 Subject: [PATCH 17/47] Clarified ambiguous batch job status changes (#444) * Clarified ambiguous batch job status changes. * Update openapi.yaml Co-authored-by: Stefaan Lippens * Allow back-ends to not restart. --------- Co-authored-by: Stefaan Lippens --- CHANGELOG.md | 1 + openapi.yaml | 31 ++++++++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2c2a22..23093c42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Clarify that the relation type `version-history` should include `/.well-known/openeo` in the URL. - Clarify that clients should (re-)request capabilities and discovery endpoints with token if available and supported. [#416](https://github.com/Open-EO/openeo-api/issues/416) - Clarify the fields `plan` (for processing requests) and `billing_plan` (in `GET /` and `GET /me`). [#425](https://github.com/Open-EO/openeo-api/issues/425) [#426](https://github.com/Open-EO/openeo-api/issues/426) +- Clarified ambiguous batch job status changes. - Reflect that the `debug` process has been renamed to `inspect`. - Clarified uniqueness constraints for identifiers. [#449](https://github.com/Open-EO/openeo-api/issues/449) [#454](https://github.com/Open-EO/openeo-api/issues/454) - Clarified schematically the applicability of JSON Schema extensions (`parameters`, `returns`, `dimensions`) and their relation to the subtypes diff --git a/openapi.yaml b/openapi.yaml index 90378bb7..030d9791 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2976,13 +2976,14 @@ paths: patch: summary: Modify a batch job operationId: update-job - description: >- + description: |- Modifies an existing job at the back-end, but maintains the identifier. Changes can be grouped in a single request. + The job status does not change. - Jobs can only be modified when the job is not queued or running. - Otherwise requests to this endpoint MUST be rejected with openEO error + Jobs can only be modified when the job is not queued and not running. + Otherwise, requests to this endpoint MUST be rejected with openEO error `JobLocked`. tags: - Data Processing @@ -3371,12 +3372,12 @@ paths: The result will be stored in the format specified in the process. To specify the format use a process such as `save_result`. - This endpoint has no effect if the job status is already `queued` or - `running`. In particular, it doesn't restart a running job. Processing - MUST be canceled before to restart it. - The job status is set to `queued`, if processing doesn't start - instantly. + 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. + Clients SHOULD warn users and ask for confirmation if results may get + discarded. * Once the processing starts the status is set to `running`. * Once the data is available to download the status is set to @@ -3384,6 +3385,10 @@ paths: * Whenever an error occurs during processing, the status MUST be set to `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. + 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 process the request. Alternatively, back-ends MAY provide partial results @@ -3405,20 +3410,20 @@ paths: delete: summary: Cancel processing a batch job operationId: stop-job - description: >- + description: |- Cancels all related computations for this job at the back-end. It will stop generating additional costs for processing. - A subset of processed results may be available for downloading depending - on the state of the job as it was canceled. Finished results MUST NOT be - deleted until the job is deleted or job processing is started again. + on the state of the job at the time it was canceled. + Results MUST NOT be deleted until the job processing is started again or + the job is completely deleted through a request to + `DELETE /jobs/{job_id}`. This endpoint only has an effect if the job status is `queued` or `running`. - The job 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`. From a98c588273eb3a51154e138a56ad413c3e0f4640 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 3 May 2023 17:51:09 +0200 Subject: [PATCH 18/47] Update version number to v1.2.0 --- CHANGELOG.md | 3 +++ README.md | 5 +++-- extensions/federation/README.md | 2 +- openapi.yaml | 12 ++++++------ package.json | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2c2a22..366fa0df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased / Draft +## [1.2.0] - 2021-05-31 + ### Added - **New extensions:** @@ -428,6 +430,7 @@ Initial version. [Unreleased]: +[1.2.0]: [1.1.0]: [1.0.1]: [1.0.0]: diff --git a/README.md b/README.md index 44fd9ce1..aef37924 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.1.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.2.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.1.0**](https://api.openeo.org) | **current** | 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.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.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). | | [1.0.0-rc.2](https://api.openeo.org/1.0.0-rc.2) | legacy | Introduced user-defined processes. [Changelog](CHANGELOG.md#100-rc2---2020-02-20). | diff --git a/extensions/federation/README.md b/extensions/federation/README.md index 3c8aa4a7..16e0d2ae 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -82,7 +82,7 @@ schema: ```json { - "api_version": "1.1.0", + "api_version": "1.2.0", "federation": { "vito": { "title": "VITO", diff --git a/openapi.yaml b/openapi.yaml index 90378bb7..a69c1bff 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1,11 +1,11 @@ openapi: 3.0.2 info: title: openEO API - version: 1.1.0 + version: 1.2.0 description: |- The openEO API specification for interoperable cloud-based processing of large Earth observation datasets. - **Conformance class:** `https://api.openeo.org/1.1.0` + **Conformance class:** `https://api.openeo.org/1.2.0` # API Principles @@ -618,7 +618,7 @@ paths: Version number of the openEO specification this back-end implements. enum: - - 1.1.0 + - 1.2.0 backend_version: type: string description: >- @@ -1193,7 +1193,7 @@ paths: Otherwise, the implemented functionality can usually be retrieved from the [capabilties](#tag/Capabilities/operation/capabilities) in openEO. - The general openEO conformance class is `https://api.openeo.org/1.1.0`. + The general openEO conformance class is `https://api.openeo.org/1.2.0`. See the individual openEO API extensions for their conformance classes. The conformance classes listed at this endpoint and listed in the @@ -3727,7 +3727,7 @@ components: implementation conforms to. Conformance classes are commonly used in all OGC APIs and the STAC API specification. - The general openEO conformance class is `https://api.openeo.org/1.1.0`. + The general openEO conformance class is `https://api.openeo.org/1.2.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. @@ -3736,7 +3736,7 @@ components: type: string format: uri example: - - https://api.openeo.org/1.1.0 + - https://api.openeo.org/1.2.0 - https://api.openeo.org/extensions/commercial-data/0.1.0 - https://api.openeo.org/extensions/federation/0.1.0 - https://api.stacspec.org/v1.0.0/collections diff --git a/package.json b/package.json index 4cc5beaf..8a19865b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openeo/api", - "version": "1.1.0", + "version": "1.2.0", "author": "openEO Consortium", "license": "Apache-2.0", "description": "The openEO API specification.", From 820b01f143bb3a4df37191c4f5b6fa50284f3afa Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 25 May 2023 11:11:25 +0200 Subject: [PATCH 19/47] Fix example #493 --- openapi.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index b3917a07..aafd67fc 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1493,8 +1493,8 @@ paths: 'instruments': - MSI 'eo:cloud_cover': - min: 0 - max: 75 + minimum: 0 + maximum: 75 'sat:orbit_state': - ascending - descending @@ -1553,8 +1553,8 @@ paths: center_wavelength: 2.2024 gsd: 20 'proj:epsg': - min: 32601 - max: 32660 + minimum: 32601 + maximum: 32660 assets: thumbnail: href: 'https://openeo.example/api/v1/collections/Sentinel-2/thumbnail.png' From dd7428d9183646a369f82539544b2ab88edee8b0 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 25 May 2023 11:17:08 +0200 Subject: [PATCH 20/47] Update changelog date for 1.2.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bced4c98..020a1c35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased / Draft -## [1.2.0] - 2021-05-31 +## [1.2.0] - 2021-05-25 ### Added From 2396ac11b2d7564e14b12080807891d20f699825 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 7 Jul 2023 17:27:01 +0200 Subject: [PATCH 21/47] Fix that file format parameters show datacube and process parameter subtypes --- CHANGELOG.md | 4 ++++ openapi.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 020a1c35..ddfeaf2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased / Draft +### Fixed + +- `GET /file_formats`: Base paramater on top of normal JSON Schema, not Process JSON Schema + ## [1.2.0] - 2021-05-25 ### Added diff --git a/openapi.yaml b/openapi.yaml index aafd67fc..29f68527 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5813,7 +5813,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: >- From 814c3867087f04aeb5f2320c49a3a213d8406e34 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 12 Jul 2023 16:05:29 +0200 Subject: [PATCH 22/47] Clarifications in extensions --- extensions/commercial-data/README.md | 2 +- extensions/federation/README.md | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index 3fe7c177..191bd5d8 100644 --- a/extensions/commercial-data/README.md +++ b/extensions/commercial-data/README.md @@ -155,7 +155,7 @@ Example request payload to `GET /search` for `PLEIADES` products from "Living Li ### Ordering products -Backends should implement the following endpoints: +Backends must implement the following endpoints: - `GET /orders`: Get a list of all created orders - `POST /orders`: Create an order diff --git a/extensions/federation/README.md b/extensions/federation/README.md index 16e0d2ae..9343f0ab 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -155,8 +155,19 @@ schema: ## 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. +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. Examples of where this could apply to (**not** comprehensive): + +- `GET /collections/{id}` +- `GET /processes` (per process, per parameter) +- `GET /file_formats` (per file format) +- `GET /udf_runtimes` (per UDF runtime, per version) +- `POST /validation` (the back-ends that can run the process) +- `GET /process_graphs/{id}` +- `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/{id}` + +This can also be embedded deeply into a hierarchical structure, e.g. for process or file format parameters. ```yaml schema: @@ -207,10 +218,7 @@ schema: "stac_version": "1.0.0", "id": "example", "description": "...", - "summaries": { - "federation:backends": ["vito", "eodc"], - ... - }, + "federation:backends": ["vito", "eodc"], ... } ``` \ No newline at end of file From 9555433eb8829f5524a5f2ef6c66d9dd69c8742b Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 14 Jul 2023 13:50:29 +0200 Subject: [PATCH 23/47] `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`) --- CHANGELOG.md | 2 ++ openapi.yaml | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddfeaf2c..fb557834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - `GET /file_formats`: Base paramater 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`) ## [1.2.0] - 2021-05-25 diff --git a/openapi.yaml b/openapi.yaml index 29f68527..966bdbcb 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2789,6 +2789,8 @@ paths: $ref: '#/components/schemas/budget_update' log_level: $ref: '#/components/schemas/min_log_level_update' + additionalProperties: + description: You can add additional back-end specific properties here. description: The data to change for the specified secondary web service. get: summary: Full metadata for a service @@ -2810,7 +2812,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: @@ -3017,6 +3021,8 @@ paths: $ref: '#/components/schemas/budget_update' log_level: $ref: '#/components/schemas/min_log_level_update' + additionalProperties: + description: You can add additional back-end specific properties here. description: Specifies the job details to update. get: summary: Full metadata for a batch job @@ -3038,6 +3044,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: From cecc3f49733362aa7672cdd96f1fc08d1c81559b Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 11 Oct 2023 17:30:08 +0200 Subject: [PATCH 24/47] Minor updates to wording and tooling --- extensions/commercial-data/README.md | 2 +- extensions/commercial-data/openapi.yaml | 8 ++++---- extensions/commercial-data/package.json | 6 +++--- openapi.yaml | 2 +- package.json | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index 191bd5d8..6e6ae84a 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** diff --git a/extensions/commercial-data/openapi.yaml b/extensions/commercial-data/openapi.yaml index c2c2d1a2..00506f60 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 diff --git a/extensions/commercial-data/package.json b/extensions/commercial-data/package.json index 0fd067ed..aa9bc101 100644 --- a/extensions/commercial-data/package.json +++ b/extensions/commercial-data/package.json @@ -13,12 +13,12 @@ "url": "git+https://github.com/Open-EO/openeo-api.git" }, "devDependencies": { - "@stoplight/spectral": "^5.9.1", - "redoc-cli": "^0.13.18" + "@stoplight/spectral": "^6.6.0", + "redoc-cli": "^0.13.21" }, "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", + "build": "redoc-cli bundle openapi.yaml -o redoc.html --title \"openEO API - Commercial Data Extension\" --cdn --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", "test": "spectral lint openapi.yaml" } } diff --git a/openapi.yaml b/openapi.yaml index 966bdbcb..7e9a7984 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2751,7 +2751,7 @@ 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 in a single request. User have to create a new service to change the service type. tags: diff --git a/package.json b/package.json index 8a19865b..dbbb4094 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@stoplight/spectral-cli": "^6.6.0", - "redoc-cli": "^0.13.18" + "redoc-cli": "^0.13.21" }, "scripts": { "start": "redoc-cli serve openapi.yaml --watch --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", From e40ad4a3b6d9a3b6f651338ccb6cfbce829a4c6b Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 12 Oct 2023 01:40:00 +0200 Subject: [PATCH 25/47] Enable tests for commercial data extension --- .github/workflows/tests.yml | 7 ++++++- extensions/commercial-data/.spectral.yml | 12 ++++++++++++ extensions/commercial-data/package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 extensions/commercial-data/.spectral.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64b0febd..9345633d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,7 +8,12 @@ jobs: with: node-version: 'lts/*' - uses: actions/checkout@v3 - - name: Run tests + - name: Run core tests run: | + npm install + npm test + - name: Run commercial-data tests + run: | + cd extensions/commercial-data npm install npm test \ No newline at end of file diff --git a/extensions/commercial-data/.spectral.yml b/extensions/commercial-data/.spectral.yml new file mode 100644 index 00000000..ad10553b --- /dev/null +++ b/extensions/commercial-data/.spectral.yml @@ -0,0 +1,12 @@ +extends: "spectral:oas" +rules: + contact-properties: true + tag-description: true + oas3-parameter-description: true + oas3-unused-component: true + operation-id-kebab-case: + given: "$..operationId" + then: + function: pattern + functionOptions: + match: ^[a-z][a-z0-9\-]*$ \ No newline at end of file diff --git a/extensions/commercial-data/package.json b/extensions/commercial-data/package.json index aa9bc101..87e80dfa 100644 --- a/extensions/commercial-data/package.json +++ b/extensions/commercial-data/package.json @@ -13,7 +13,7 @@ "url": "git+https://github.com/Open-EO/openeo-api.git" }, "devDependencies": { - "@stoplight/spectral": "^6.6.0", + "@stoplight/spectral-cli": "^6.6.0", "redoc-cli": "^0.13.21" }, "scripts": { From 476b78a46be788c9a1f0bd64b3c6b9d0ab6e6c9f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 11 Oct 2023 17:34:50 +0200 Subject: [PATCH 26/47] First draft --- .github/workflows/tests.yml | 5 + extensions/workspaces/.spectral.yml | 12 + extensions/workspaces/README.md | 16 ++ extensions/workspaces/openapi.yaml | 410 ++++++++++++++++++++++++++++ extensions/workspaces/package.json | 24 ++ openapi.yaml | 28 +- 6 files changed, 483 insertions(+), 12 deletions(-) create mode 100644 extensions/workspaces/.spectral.yml create mode 100644 extensions/workspaces/README.md create mode 100644 extensions/workspaces/openapi.yaml create mode 100644 extensions/workspaces/package.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9345633d..52364fe1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,4 +16,9 @@ jobs: run: | cd extensions/commercial-data npm install + npm test + - name: Run workspaces tests + run: | + cd extensions/workspaces + npm install npm test \ No newline at end of file diff --git a/extensions/workspaces/.spectral.yml b/extensions/workspaces/.spectral.yml new file mode 100644 index 00000000..ad10553b --- /dev/null +++ b/extensions/workspaces/.spectral.yml @@ -0,0 +1,12 @@ +extends: "spectral:oas" +rules: + contact-properties: true + tag-description: true + oas3-parameter-description: true + oas3-unused-component: true + operation-id-kebab-case: + given: "$..operationId" + then: + function: pattern + functionOptions: + match: ^[a-z][a-z0-9\-]*$ \ No newline at end of file diff --git a/extensions/workspaces/README.md b/extensions/workspaces/README.md new file mode 100644 index 00000000..b2a92614 --- /dev/null +++ b/extensions/workspaces/README.md @@ -0,0 +1,16 @@ +# 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 opens the possibility to register such a file storage system as a data source for new collections, so-called "User Collections". +Additionally, batch job results can be stored 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. The User Collections are not aligned with EOEPCA. \ No newline at end of file diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml new file mode 100644 index 00000000..5d22fd34 --- /dev/null +++ b/extensions/workspaces/openapi.yaml @@ -0,0 +1,410 @@ +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 opens the possibility to register such a file storage system as a data source for new collections, so-called "User Collections". + Additionally, batch job results can be stored 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. The User Collections are not aligned with EOEPCA. + 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 + - name: User Collections + description: Management of User Collections +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: + /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: + intent: + type: string + quota: + $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' + oneOf: + - title: Create workspace + properties: + intent: + enum: + - create + example: create + - title: Register existing workspace + required: + - url + - credentials + properties: + intent: + enum: + - register + example: register + url: + $ref: '#/components/schemas/workspace_url' + credentials: + $ref: '#/components/schemas/workspace_credentials' + required: true + 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 backend. + + Associated User Collections MAY also be removed. + 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: + quota: + $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' + 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' + /collections: + post: + summary: Create a new User Collection + operationId: create-collection + description: |- + Registers a new collection. + + The data must be available in the workspace provided via the query parameter. The data must be a STAC catalog in the given https://github.com/Open-EO/openeo-api/blob/draft/extensions/workspaces/README.md + + The default entry point is a `catalog.json` or `collection.json` in the "root folder". The entry point can be customized by providing a relative link with the relation type `entrypoint` in the STAC metadata. + + The collection metadata is provided via the request body. If no `id` is specified, the back-end assigns an ID. + tags: + - User Collections + - Workspaces + security: + - Bearer: [] + parameters: + - name: workspace + in: query + required: true + description: The ID of the workspace where the data for the collection is located. + schema: + $ref: '#/components/schemas/workspace_id' + requestBody: + required: true + description: |- + The metadata to use for the specified User Collection. + + **TODO:** The schema describes a generic collection. Required fields don't apply. + content: + application/json: + schema: + $ref: '../../openapi.yaml#/components/schemas/collection' + responses: + '201': + description: The collection has been created successfully. + headers: + Location: + required: true + schema: + description: |- + Absolute URL to the newly created collection. + + The URL points to the metadata endpoint + `GET /collections/{collection_id}` with the `{collection_id}` being the + id of the created collection. + format: uri + type: string + example: 'https://openeo.example/api/v1/collections/my-collection' + OpenEO-Identifier: + required: true + schema: + $ref: '../../openapi.yaml#/components/schemas/collection_id' + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + /collections/{collection_id}: + parameters: + - $ref: '../../openapi.yaml#/components/parameters/collection_id' + patch: + summary: Modify a User Collection + operationId: update-collection + description: |- + Modifies an existing User Collection at the back-end, + but maintains the identifier and associated workspace. Changes can be grouped in a single request. + + User have to create a new collection to change the associated workspace or the collection identifier. + tags: + - User Collections + security: + - Bearer: [] + responses: + '204': + description: Changes to the User Collection were applied successfully. + 4XX: + $ref: '../../openapi.yaml#/components/responses/client_error_auth' + 5XX: + $ref: '../../openapi.yaml#/components/responses/server_error' + requestBody: + required: true + description: |- + The metadata to change for the specified User Collection. + + **TODO:** The schema describes a generic collection. Required fields don't apply. The `id` can't be updated. + content: + application/json: + schema: + $ref: '../../openapi.yaml#/components/schemas/collection_id' + delete: + summary: Delete a User Collection + operationId: delete-collection + description: |- + Deletes the User Collection. + + Does NOT delete jobs or services that reference this User Collection. Also, does NOT remove any data from the workspace or the workspace itself. + tags: + - User Collections + security: + - Bearer: [] + responses: + '204': + description: The User Collection has been successfully deleted + 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-collection + workspace: + title: Workspace + required: + - id + - status + type: object + properties: + id: + $ref: '#/components/schemas/workspace_id' + status: + type: string + description: The status of the workspace. + 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' + credentials: + $ref: '#/components/schemas/workspace_credentials' + 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_credentials: + type: object + description: >- + Credentials to access the workspace as required by the workspace provider. + The structure is not specified by the API. + additionalProperties: + type: string + example: + username: john_doe + password: secret123 + 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 + securitySchemes: + Bearer: + $ref: '../../openapi.yaml#/components/securitySchemes/Bearer' diff --git a/extensions/workspaces/package.json b/extensions/workspaces/package.json new file mode 100644 index 00000000..08897e2f --- /dev/null +++ b/extensions/workspaces/package.json @@ -0,0 +1,24 @@ +{ + "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-cli": "^6.6.0", + "redoc-cli": "^0.13.21" + }, + "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 - Workspace Extension\" --cdn --options.expandResponses \"200,201,202,203,204\" --options.pathInMiddlePanel true", + "test": "spectral lint openapi.yaml" + } +} diff --git a/openapi.yaml b/openapi.yaml index 7e9a7984..ee119cb3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3667,19 +3667,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 @@ -4280,6 +4270,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 From 9eb872ed65002900e6dd950e7977e8d58812db9d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 1 Dec 2023 10:51:20 +0100 Subject: [PATCH 27/47] Add title and description to workspaces, removed updating the quota --- extensions/workspaces/openapi.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml index 5d22fd34..9a06bb96 100644 --- a/extensions/workspaces/openapi.yaml +++ b/extensions/workspaces/openapi.yaml @@ -100,6 +100,10 @@ paths: required: - intent properties: + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' intent: type: string quota: @@ -205,8 +209,10 @@ paths: schema: type: object properties: - quota: - $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' required: true responses: '204': @@ -337,6 +343,17 @@ components: type: string pattern: '^[\w\-\.~]+$' example: my-collection + 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: @@ -346,6 +363,10 @@ components: properties: id: $ref: '#/components/schemas/workspace_id' + title: + $ref: '#/components/schemas/workspace_title' + description: + $ref: '#/components/schemas/workspace_description' status: type: string description: The status of the workspace. From 829bc79a9180979d56bdc8cc78cf695a694f394d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 8 Dec 2023 15:02:39 +0100 Subject: [PATCH 28/47] Remove user collections --- extensions/workspaces/README.md | 7 +- extensions/workspaces/openapi.yaml | 121 +---------------------------- extensions/workspaces/package.json | 2 +- 3 files changed, 6 insertions(+), 124 deletions(-) diff --git a/extensions/workspaces/README.md b/extensions/workspaces/README.md index b2a92614..1d1be677 100644 --- a/extensions/workspaces/README.md +++ b/extensions/workspaces/README.md @@ -1,9 +1,6 @@ # 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 opens the possibility to register such a file storage system as a data source for new collections, so-called "User Collections". -Additionally, batch job results can be stored on such file storage systems. +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** @@ -13,4 +10,4 @@ Additionally, batch job results can be stored on such file storage systems. **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. The User Collections are not aligned with EOEPCA. \ No newline at end of file +The Workspace API is inspired by the [EOEPCA Workspace API](https://github.com/EOEPCA/rm-workspace-api) with regards to workspace management. \ No newline at end of file diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml index 9a06bb96..9bfab4b3 100644 --- a/extensions/workspaces/openapi.yaml +++ b/extensions/workspaces/openapi.yaml @@ -3,12 +3,9 @@ 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. + 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. - This opens the possibility to register such a file storage system as a data source for new collections, so-called "User Collections". - Additionally, batch job results can be stored 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. The User Collections are not aligned with EOEPCA. + 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' @@ -21,8 +18,6 @@ externalDocs: tags: - name: Workspaces description: Management of User Workspaces - - name: User Collections - description: Management of User Collections servers: - url: 'https://openeo.example/api/{version}' description: >- @@ -181,8 +176,6 @@ paths: operationId: delete-workspace description: |- Removes the workspace from the backend. - - Associated User Collections MAY also be removed. tags: - Workspaces security: @@ -221,114 +214,6 @@ paths: $ref: '../../openapi.yaml#/components/responses/client_error_auth' 5XX: $ref: '../../openapi.yaml#/components/responses/server_error' - /collections: - post: - summary: Create a new User Collection - operationId: create-collection - description: |- - Registers a new collection. - - The data must be available in the workspace provided via the query parameter. The data must be a STAC catalog in the given https://github.com/Open-EO/openeo-api/blob/draft/extensions/workspaces/README.md - - The default entry point is a `catalog.json` or `collection.json` in the "root folder". The entry point can be customized by providing a relative link with the relation type `entrypoint` in the STAC metadata. - - The collection metadata is provided via the request body. If no `id` is specified, the back-end assigns an ID. - tags: - - User Collections - - Workspaces - security: - - Bearer: [] - parameters: - - name: workspace - in: query - required: true - description: The ID of the workspace where the data for the collection is located. - schema: - $ref: '#/components/schemas/workspace_id' - requestBody: - required: true - description: |- - The metadata to use for the specified User Collection. - - **TODO:** The schema describes a generic collection. Required fields don't apply. - content: - application/json: - schema: - $ref: '../../openapi.yaml#/components/schemas/collection' - responses: - '201': - description: The collection has been created successfully. - headers: - Location: - required: true - schema: - description: |- - Absolute URL to the newly created collection. - - The URL points to the metadata endpoint - `GET /collections/{collection_id}` with the `{collection_id}` being the - id of the created collection. - format: uri - type: string - example: 'https://openeo.example/api/v1/collections/my-collection' - OpenEO-Identifier: - required: true - schema: - $ref: '../../openapi.yaml#/components/schemas/collection_id' - 4XX: - $ref: '../../openapi.yaml#/components/responses/client_error_auth' - 5XX: - $ref: '../../openapi.yaml#/components/responses/server_error' - /collections/{collection_id}: - parameters: - - $ref: '../../openapi.yaml#/components/parameters/collection_id' - patch: - summary: Modify a User Collection - operationId: update-collection - description: |- - Modifies an existing User Collection at the back-end, - but maintains the identifier and associated workspace. Changes can be grouped in a single request. - - User have to create a new collection to change the associated workspace or the collection identifier. - tags: - - User Collections - security: - - Bearer: [] - responses: - '204': - description: Changes to the User Collection were applied successfully. - 4XX: - $ref: '../../openapi.yaml#/components/responses/client_error_auth' - 5XX: - $ref: '../../openapi.yaml#/components/responses/server_error' - requestBody: - required: true - description: |- - The metadata to change for the specified User Collection. - - **TODO:** The schema describes a generic collection. Required fields don't apply. The `id` can't be updated. - content: - application/json: - schema: - $ref: '../../openapi.yaml#/components/schemas/collection_id' - delete: - summary: Delete a User Collection - operationId: delete-collection - description: |- - Deletes the User Collection. - - Does NOT delete jobs or services that reference this User Collection. Also, does NOT remove any data from the workspace or the workspace itself. - tags: - - User Collections - security: - - Bearer: [] - responses: - '204': - description: The User Collection has been successfully deleted - 4XX: - $ref: '../../openapi.yaml#/components/responses/client_error_auth' - 5XX: - $ref: '../../openapi.yaml#/components/responses/server_error' components: parameters: workspace_id: @@ -342,7 +227,7 @@ components: workspace_id: type: string pattern: '^[\w\-\.~]+$' - example: my-collection + example: my-workspace workspace_title: type: string description: A short title for the workspace. diff --git a/extensions/workspaces/package.json b/extensions/workspaces/package.json index 08897e2f..05b2a0f1 100644 --- a/extensions/workspaces/package.json +++ b/extensions/workspaces/package.json @@ -1,5 +1,5 @@ { - "name": "@openeo/api-extension-commercial-data", + "name": "@openeo/api-extension-workspaces", "version": "0.1.0", "author": "openEO Consortium", "license": "Apache-2.0", From 82102c37745421dda7e0c4462809caee8516e936 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 17 Jan 2024 15:01:59 +0100 Subject: [PATCH 29/47] Add missing conformance class for STAC API Core to example --- openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi.yaml b/openapi.yaml index 7e9a7984..bd566aea 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -3752,6 +3752,7 @@ components: - https://api.openeo.org/1.2.0 - https://api.openeo.org/extensions/commercial-data/0.1.0 - https://api.openeo.org/extensions/federation/0.1.0 + - https://api.stacspec.org/v1.0.0/core - https://api.stacspec.org/v1.0.0/collections udf_runtime: type: object From 6ea99c3ae4ab342c54f9cd39a7403085fa6ca79f Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 17 Jan 2024 16:22:57 +0100 Subject: [PATCH 30/47] Clarified for log levels which default values apply --- CHANGELOG.md | 1 + openapi.yaml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb557834..fdd0e0eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `GET /file_formats`: Base paramater 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`) +- Clarified for log levels which default values apply ## [1.2.0] - 2021-05-25 diff --git a/openapi.yaml b/openapi.yaml index bd566aea..93eff76d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5895,7 +5895,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: @@ -6626,7 +6627,7 @@ components: - warning - info - debug - default: info + default: debug service_id: name: service_id in: path From 7d40f9d7274db69e4c70239108e3c4d2948eed6a Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 8 Feb 2024 21:56:08 +0100 Subject: [PATCH 31/47] Editorial changes based on OGC review (#525) --- openapi.yaml | 204 +++++++++++++++++++++++++-------------------------- 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 93eff76d..bf98aec3 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -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 (propertty `title`) and media type information (propertty `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 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/cors/). 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 | @@ -484,7 +484,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 @@ -533,14 +533,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-spec/tree/v0.9.0/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 @@ -738,7 +738,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 +753,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 @@ -1042,15 +1042,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 +1102,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,7 +1188,7 @@ 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. @@ -1201,7 +1201,7 @@ 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 responses: @@ -1581,7 +1581,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. @@ -1911,7 +1911,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 @@ -1988,7 +1988,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 @@ -2281,7 +2281,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 +2410,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 +2477,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 +2741,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 +2751,9 @@ paths: operationId: update-service description: |- Modifies an existing secondary web service at the back-end, - but maintains 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: @@ -2790,7 +2790,7 @@ paths: log_level: $ref: '#/components/schemas/min_log_level_update' additionalProperties: - description: You can add additional back-end specific properties here. + 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 @@ -2824,9 +2824,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: @@ -2918,7 +2918,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 @@ -2972,7 +2972,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: @@ -3022,7 +3022,7 @@ paths: log_level: $ref: '#/components/schemas/min_log_level_update' additionalProperties: - description: You can add additional back-end specific properties here. + description: Additional back-end specific properties are allowed. description: Specifies the job details to update. get: summary: Full metadata for a batch job @@ -3054,8 +3054,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 @@ -3201,7 +3201,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 @@ -3233,8 +3233,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`. @@ -3259,7 +3259,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: @@ -3358,7 +3358,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. @@ -3380,10 +3380,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. @@ -3394,8 +3394,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 @@ -3556,7 +3556,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 @@ -3607,7 +3607,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 @@ -3692,7 +3692,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. @@ -3738,7 +3738,7 @@ 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`. See the individual openEO API extensions for their conformance classes. @@ -4252,7 +4252,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`. @@ -4427,8 +4427,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`. @@ -5256,7 +5255,7 @@ 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` @@ -5335,7 +5334,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`. @@ -5375,7 +5374,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 @@ -5449,7 +5448,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. @@ -5470,7 +5469,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' @@ -5544,7 +5543,7 @@ components: 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`. @@ -5557,11 +5556,11 @@ components: 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`, @@ -5595,10 +5594,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). @@ -5713,7 +5712,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: @@ -5729,7 +5728,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: @@ -5770,14 +5769,14 @@ 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: >- @@ -5910,7 +5909,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 @@ -5988,7 +5987,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: @@ -6072,9 +6071,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 @@ -6085,7 +6084,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: @@ -6128,8 +6127,7 @@ 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. json_schema_type: type: string enum: @@ -6365,7 +6363,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 @@ -6516,7 +6514,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. @@ -6536,7 +6534,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. @@ -6556,7 +6554,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. @@ -6583,14 +6581,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. @@ -6602,7 +6600,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 @@ -6651,7 +6649,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 From bd5468871998e052fc35144f68b9e643814d336e Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Thu, 8 Feb 2024 22:03:44 +0100 Subject: [PATCH 32/47] Fix typo in ProcessGraphComplexity error message (#526) --- errors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.json b/errors.json index 7288ba6b..e9a60522 100644 --- a/errors.json +++ b/errors.json @@ -242,7 +242,7 @@ }, "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.", + "message": "The process is too complex for synchronous processing. Please use a batch job instead.", "http": 400, "tags": [ "Data Processing" From e669dbed719b35a65d6b42994dfd507238d9f70b Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Mon, 10 Jun 2024 17:40:08 +0200 Subject: [PATCH 33/47] Minor "ProcessInvalid" error typo fix (#535) --- errors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors.json b/errors.json index e9a60522..41381277 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": [ From b70b43c6f449661e28493f47d5985d9bef46e592 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Thu, 13 Jun 2024 11:18:05 +0200 Subject: [PATCH 34/47] Fix CI --- .spectral.yml | 1 + 1 file changed, 1 insertion(+) 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'' )]' From 13dc6bb4329f5779584e82e467340c93cbcd7983 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Fri, 14 Jun 2024 12:32:23 +0200 Subject: [PATCH 35/47] Document additional relation types for process metadata #531 (#536) * Document additional relation types for process metadata #531 * Fix bullet points, add canonical --- CHANGELOG.md | 1 + openapi.yaml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd0e0eb..7622bc24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `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`) - 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) ## [1.2.0] - 2021-05-25 diff --git a/openapi.yaml b/openapi.yaml index bf98aec3..a97d448f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5262,11 +5262,21 @@ components: (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: From caef6e4f90c35657a0845a477c7d585909f4d898 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 1 Jul 2024 15:06:46 +0200 Subject: [PATCH 36/47] Add Remote UDP extension #515 (#538) Co-authored-by: Stefaan Lippens --- CHANGELOG.md | 5 +++ README.md | 1 + extensions/remote-udp/README.md | 69 +++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 extensions/remote-udp/README.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7622bc24..baf9432a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased / Draft +### Added + +- **New extensions:** + - [Remote UDP Extension](./extensions/remote-udp/README.md) + ### Fixed - `GET /file_formats`: Base paramater on top of normal JSON Schema, not Process JSON Schema diff --git a/README.md b/README.md index aef37924..2a9ac639 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ See also the [changelog](CHANGELOG.md) and the [milestones](https://github.com/O | ---------------------------------------------- | ------- | ------------ | ----------- | | [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. | +| [Remote UDP](extensions/remote-udp/) | 0.1.0 | experimental | Load user-defined processes that are hosted externally through the process namespace into process graphs. | ## Repository diff --git a/extensions/remote-udp/README.md b/extensions/remote-udp/README.md new file mode 100644 index 00000000..812568bc --- /dev/null +++ b/extensions/remote-udp/README.md @@ -0,0 +1,69 @@ +# Remote UDP 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-udp/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 backend, 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 +} +``` From 777fa7c3f55b0f2e36aa7b0be3ca4fa18662f74d Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 8 Jul 2024 20:41:43 +0200 Subject: [PATCH 37/47] Rename Remote UDP extension #540 --- CHANGELOG.md | 6 +++--- README.md | 12 ++++++------ .../README.md | 7 ++++--- 3 files changed, 13 insertions(+), 12 deletions(-) rename extensions/{remote-udp => remote-process-definition}/README.md (91%) diff --git a/CHANGELOG.md b/CHANGELOG.md index baf9432a..9a395e96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - **New extensions:** - - [Remote UDP Extension](./extensions/remote-udp/README.md) + - [Remote Process Definition Extension](./extensions/remote-process-definition/README.md) ### Fixed @@ -24,8 +24,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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. diff --git a/README.md b/README.md index 2a9ac639..9917cdfa 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ 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. | -| [Remote UDP](extensions/remote-udp/) | 0.1.0 | experimental | Load user-defined processes that are hosted externally through the process namespace into process graphs. | +| 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. | +| [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. | ## Repository @@ -44,7 +44,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. diff --git a/extensions/remote-udp/README.md b/extensions/remote-process-definition/README.md similarity index 91% rename from extensions/remote-udp/README.md rename to extensions/remote-process-definition/README.md index 812568bc..d120d48b 100644 --- a/extensions/remote-udp/README.md +++ b/extensions/remote-process-definition/README.md @@ -1,4 +1,4 @@ -# Remote UDP Extension +# Remote Process Definition Extension The openEO API is a specification for interoperable cloud-based processing of large Earth observation datasets. @@ -6,12 +6,13 @@ This extension enables user to load user-defined processes that are hosted exter - Version: **0.1.0** - Stability: **experimental** -- Conformance class: `https://api.openeo.org/extensions/remote-udp/0.1.0` +- 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. + +> 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` [...] From 23d47fb9bce61c48473bb641f024ebbac37b93bd Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 28 Aug 2024 14:48:03 +0200 Subject: [PATCH 38/47] More possibilities for federation extension --- extensions/federation/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/federation/README.md b/extensions/federation/README.md index 9343f0ab..2bcb9f7b 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -115,9 +115,11 @@ Applies to: - `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` The following endpoints define the resources (UDF runtimes / service types) at the top level of their response as key-value pairs. @@ -160,6 +162,7 @@ Every discoverable resource that is defined as an object and allows to contain a - `GET /collections/{id}` - `GET /processes` (per process, per parameter) - `GET /file_formats` (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) - `GET /process_graphs/{id}` From 5feccf793a88f6c13b39c4f0ba4cca1601050282 Mon Sep 17 00:00:00 2001 From: Stefaan Lippens Date: Tue, 3 Sep 2024 11:43:15 +0200 Subject: [PATCH 39/47] Issue #527 Generalize ProcessGraphComplexity error message/description (#528) --- errors.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/errors.json b/errors.json index 41381277..7e23b496 100644 --- a/errors.json +++ b/errors.json @@ -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 synchronous processing. Please use a batch job instead.", + "description": "The process graph is computationally too heavy for synchronous processing and will likely time out. Please use a batch job instead.", + "message": "The process graph is too heavy for synchronous processing. Please use a batch job instead.", "http": 400, "tags": [ "Data Processing" From 7eccf0bdd876bbb9ddda88783890242cd63389a1 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 9 Sep 2024 13:39:25 +0200 Subject: [PATCH 40/47] Add workspace_providers endpoint, add intent/type to other endpoints --- extensions/workspaces/openapi.yaml | 164 ++++++++++++++++++++++++----- 1 file changed, 139 insertions(+), 25 deletions(-) diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml index 9bfab4b3..f7eb7bc2 100644 --- a/extensions/workspaces/openapi.yaml +++ b/extensions/workspaces/openapi.yaml @@ -38,6 +38,93 @@ servers: 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. + intents: + - create + - register + parameters: + username: + title: Username + type: string + password: + title: Password + type: string + links: [] /workspaces: get: summary: List all workspaces @@ -104,26 +191,14 @@ paths: quota: $ref: '../../openapi.yaml#/components/schemas/max_storage_quota' oneOf: - - title: Create workspace - properties: - intent: - enum: - - create - example: create - - title: Register existing workspace - required: - - url - - credentials - properties: - intent: - enum: - - register - example: register - url: - $ref: '#/components/schemas/workspace_url' - credentials: - $ref: '#/components/schemas/workspace_credentials' - required: true + - $ref: '#/components/schemas/create_workspace' + - $ref: '#/components/schemas/register_workspace' + discriminator: + propertyName: intent + mapping: + create: '#/components/schemas/create_workspace' + register: '#/components/schemas/register_workspace' + required: true responses: '201': description: The workspace creation has been queued successfully. @@ -244,6 +319,7 @@ components: required: - id - status + - type type: object properties: id: @@ -252,9 +328,15 @@ components: $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: >- @@ -280,8 +362,6 @@ components: example: ready url: $ref: '#/components/schemas/workspace_url' - credentials: - $ref: '#/components/schemas/workspace_credentials' properties: $ref: '#/components/schemas/workspace_properties' free: @@ -291,13 +371,13 @@ components: 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_credentials: + workspace_parameters: type: object description: >- - Credentials to access the workspace as required by the workspace provider. + Additional parameters to register the workspace as defined in `GET /workspace_types`. The structure is not specified by the API. additionalProperties: - type: string + description: Any type example: username: john_doe password: secret123 @@ -311,6 +391,40 @@ components: 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 + - credentials + 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' From 162952e62012a667172bcf9ec222712041f6a828 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Mon, 21 Oct 2024 15:06:28 +0200 Subject: [PATCH 41/47] Fix field name in OpenAPI document for Workspace extension --- extensions/workspaces/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml index f7eb7bc2..a8e64da3 100644 --- a/extensions/workspaces/openapi.yaml +++ b/extensions/workspaces/openapi.yaml @@ -411,7 +411,7 @@ components: required: - type - url - - credentials + - parameters properties: intent: enum: From 16f4c27280d2a7aa62c1bc15b1f909222c062b40 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 20 Nov 2024 07:46:47 -0600 Subject: [PATCH 42/47] Add openEO processes version #517 (#549) * Add openEO processes version #517 * Update openapi.yaml * Update openapi.yaml Co-authored-by: Stefaan Lippens * Update openapi.yaml --------- Co-authored-by: Stefaan Lippens --- CHANGELOG.md | 1 + openapi.yaml | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a395e96..c2a179ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **New extensions:** - [Remote Process Definition Extension](./extensions/remote-process-definition/README.md) +- Added `version` property to `GET /processes` [#517](https://github.com/Open-EO/openeo-api/issues/517) ### Fixed diff --git a/openapi.yaml b/openapi.yaml index bcf8266d..3237fafb 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -615,7 +615,7 @@ paths: api_version: type: string description: >- - Version number of the openEO specification this back-end + Version number of the openEO API specification this back-end implements. enum: - 1.2.0 @@ -1660,6 +1660,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: 1.2.0 processes: type: array items: From 8393536b6d894d0f79a4c291026c7dde52d28cc8 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Sun, 1 Dec 2024 21:30:35 +0100 Subject: [PATCH 43/47] backend -> back-end --- extensions/commercial-data/README.md | 15 ++++++++------- extensions/commercial-data/openapi.yaml | 6 +++--- extensions/federation/README.md | 4 ++-- extensions/remote-process-definition/README.md | 2 +- extensions/workspaces/openapi.yaml | 2 +- openapi.yaml | 8 ++++---- 6 files changed, 19 insertions(+), 18 deletions(-) diff --git a/extensions/commercial-data/README.md b/extensions/commercial-data/README.md index 6e6ae84a..ed2b8782 100644 --- a/extensions/commercial-data/README.md +++ b/extensions/commercial-data/README.md @@ -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 must 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 must 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 00506f60..bab5637d 100644 --- a/extensions/commercial-data/openapi.yaml +++ b/extensions/commercial-data/openapi.yaml @@ -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: @@ -176,7 +176,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/federation/README.md b/extensions/federation/README.md index 2bcb9f7b..4e846125 100644 --- a/extensions/federation/README.md +++ b/extensions/federation/README.md @@ -11,7 +11,7 @@ This is an extension for federation aspects, i.e. where multiple back-ends are e **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. @@ -157,7 +157,7 @@ schema: ## 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. Examples of where this could apply to (**not** comprehensive): +Every discoverable resource that is defined as an object and allows to contain additional properties, can list the back-ends that support or host the exposed resource/functionality. Examples of where this could apply to (**not** comprehensive): - `GET /collections/{id}` - `GET /processes` (per process, per parameter) diff --git a/extensions/remote-process-definition/README.md b/extensions/remote-process-definition/README.md index d120d48b..7ee7f76e 100644 --- a/extensions/remote-process-definition/README.md +++ b/extensions/remote-process-definition/README.md @@ -41,7 +41,7 @@ This extension extends the `namespace` property of process graph nodes so that i ### Client Considerations -If a client is conncected to a specific backend, 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. +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. diff --git a/extensions/workspaces/openapi.yaml b/extensions/workspaces/openapi.yaml index a8e64da3..e0115195 100644 --- a/extensions/workspaces/openapi.yaml +++ b/extensions/workspaces/openapi.yaml @@ -250,7 +250,7 @@ paths: summary: Delete Workspace operationId: delete-workspace description: |- - Removes the workspace from the backend. + Removes the workspace from the back-end. tags: - Workspaces security: diff --git a/openapi.yaml b/openapi.yaml index 3237fafb..7db07d80 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -25,7 +25,7 @@ info: 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 sending 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 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. @@ -1935,7 +1935,7 @@ paths: id: type: string description: >- - A per-backend **unique** identifier for the OpenID Connect Provider to + A per-back-end **unique** identifier for the OpenID Connect Provider to be as prefix for the Bearer token. pattern: '[\d\w]{1,20}' issuer: @@ -5651,7 +5651,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 @@ -5805,7 +5805,7 @@ components: 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 From 29318ff223c44d7a00b28538a83678a82a4afc2e Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Sun, 1 Dec 2024 21:55:33 +0100 Subject: [PATCH 44/47] Update CI --- .github/workflows/docs.yml | 10 +++++----- .github/workflows/tests.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1f305979..c60a86bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -11,11 +11,11 @@ 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@v4 with: node-version: 'lts/*' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | npm install npm run build @@ -33,7 +33,7 @@ jobs: cp errors.json gh-pages/errors.json 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 52364fe1..905d920b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,10 +4,10 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run core tests run: | npm install From c4da5e1fe7ef3ddefc8df9baee2cc067b4163cba Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Sun, 1 Dec 2024 22:38:17 +0100 Subject: [PATCH 45/47] Consortium -> Project Steering Committee --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 7db07d80..14a65bbf 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -473,7 +473,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: From 5a8ce51e0636a986e4bc0d335ad086df089f43b4 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Sun, 1 Dec 2024 22:41:43 +0100 Subject: [PATCH 46/47] Fix CORS link --- openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi.yaml b/openapi.yaml index 14a65bbf..68cf74d7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -161,7 +161,7 @@ info: 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 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/cors/). The following chapters 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, a proxy server may be used to add the headers and OPTIONS responses. From 7833f9376e47818fcc6f0512f183ac9505d10d38 Mon Sep 17 00:00:00 2001 From: Matthias Mohr Date: Wed, 11 Dec 2024 14:44:20 +0100 Subject: [PATCH 47/47] Review comments by Scott Simmons --- openapi.yaml | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index 68cf74d7..52313981 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -61,7 +61,7 @@ info: 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 adding 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 @@ -137,7 +137,7 @@ info: ## Temporal data - Date, time, 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 @@ -437,7 +437,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 main process graph in blue, child process graphs in yellow: ![Graph with processing instructions](assets/pg-evi-example.png) @@ -451,7 +451,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 @@ -615,7 +615,7 @@ paths: api_version: type: string description: >- - Version number of the openEO API specification this back-end + Version number of the openEO API specification the back-end implements. enum: - 1.2.0 @@ -947,7 +947,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. @@ -1191,7 +1191,7 @@ paths: 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`. See the individual openEO API extensions for their conformance classes. @@ -1614,7 +1614,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 @@ -1908,7 +1908,7 @@ paths: - {} responses: '200': - description: Lists the the OpenID Connect Providers. + description: Lists the OpenID Connect Providers. content: application/json: schema: @@ -2225,7 +2225,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`. @@ -3132,8 +3132,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 @@ -3301,8 +3301,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. @@ -4965,9 +4965,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 @@ -5692,7 +5691,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 @@ -5703,7 +5702,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