Skip to content

Commit 8d7f364

Browse files
committed
Align searching commercial data products with STAC /search.
1 parent 8c37ad4 commit 8d7f364

File tree

1 file changed

+190
-16
lines changed

1 file changed

+190
-16
lines changed

openapi.yaml

Lines changed: 190 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,7 +3687,7 @@ paths:
36873687
5XX:
36883688
$ref: '#/components/responses/server_error'
36893689
/commercial_data/search:
3690-
post:
3690+
get:
36913691
summary: Search for available products in a commercial data collection
36923692
operationId: commercial-data-search
36933693
description: |-
@@ -3707,10 +3707,15 @@ paths:
37073707
title: Available Products
37083708
type: object
37093709
required:
3710-
- products
3710+
- type
3711+
- features
37113712
- links
37123713
properties:
3713-
products:
3714+
type:
3715+
type: string
3716+
enum:
3717+
- FeatureCollection
3718+
features:
37143719
type: array
37153720
description: An array of available products as STAC Items.
37163721
title: Item
@@ -3719,7 +3724,8 @@ paths:
37193724
links:
37203725
$ref: '#/components/schemas/links_pagination'
37213726
example:
3722-
products:
3727+
type: FeatureCollection
3728+
features:
37233729
- type: Feature
37243730
stac_version: 0.9.0
37253731
id: c8a1f88d-89cf-4933-9118-45e9c1a5df20
@@ -3768,19 +3774,26 @@ paths:
37683774
schema:
37693775
title: Search Commercial Products Request
37703776
type: object
3771-
required:
3772-
- collection_id
3773-
- parameters
37743777
properties:
3775-
collection_id:
3776-
type: string
3777-
description: Unique identifier of the collection.
3778-
parameters:
3779-
type: object
3780-
description: Key-value pairs of available `search_parameters` as listed at `GET /commercial_data/collections/{collection_id}` for filtering available products.
3781-
additionalProperties:
3782-
x-additionalPropertiesName: Search Parameter Name
3783-
description: Value of the search parameter to be used in the request.
3778+
bbox:
3779+
$ref: '#/components/schemas/bbox'
3780+
datetime:
3781+
$ref: '#/components/schemas/datetime'
3782+
intersects:
3783+
$ref: '#/components/schemas/intersects'
3784+
limit:
3785+
$ref: '#/components/schemas/limit'
3786+
collectionsArray:
3787+
$ref: '#/components/schemas/collectionsArray'
3788+
filter:
3789+
description: |-
3790+
**Extension:** Filter
3791+
A CQL2 filter expression for filtering items.
3792+
3793+
The names and types of the properties or keys that may be used to construct a filter expression for a collection must accessible at `GET commercial_data/{collectionId}/queryables`.
3794+
oneOf:
3795+
- $ref: '#/components/schemas/filter-cql2-json'
3796+
- $ref: '#/components/schemas/filter-cql2-text'
37843797
example:
37853798
collection_id: "PLEIADES"
37863799
parameters:
@@ -4158,6 +4171,167 @@ paths:
41584171
$ref: '#/components/responses/server_error'
41594172
components:
41604173
schemas:
4174+
intersects:
4175+
type: object
4176+
description: Only returns items that intersect with the provided polygon.
4177+
properties:
4178+
intersects:
4179+
$ref: https://geojson.org/schema/Geometry.json
4180+
filter-cql2-text:
4181+
description: |
4182+
A CQL2 filter expression in the 'cql2-text' encoding.
4183+
type: string
4184+
filter-cql2-json:
4185+
$ref: 'https://github.com/raw/opengeospatial/ogcapi-features/master/cql2/standard/schema/cql2.yml#/components/schemas/booleanExpression'
4186+
bbox:
4187+
name: bbox
4188+
in: query
4189+
description: >-
4190+
Only features that have a geometry that intersects the bounding box are
4191+
selected.
4192+
4193+
The bounding box is provided as four or six numbers, depending on
4194+
4195+
whether the coordinate reference system includes a vertical axis (height
4196+
4197+
or depth):
4198+
4199+
4200+
* Lower left corner, coordinate axis 1
4201+
4202+
* Lower left corner, coordinate axis 2
4203+
4204+
* Minimum value, coordinate axis 3 (optional)
4205+
4206+
* Upper right corner, coordinate axis 1
4207+
4208+
* Upper right corner, coordinate axis 2
4209+
4210+
* Maximum value, coordinate axis 3 (optional)
4211+
4212+
4213+
The coordinate reference system of the values is WGS 84
4214+
4215+
longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84).
4216+
4217+
4218+
For WGS 84 longitude/latitude the values are in most cases the sequence
4219+
4220+
of minimum longitude, minimum latitude, maximum longitude and maximum
4221+
4222+
latitude. However, in cases where the box spans the antimeridian the
4223+
4224+
first value (west-most box edge) is larger than the third value
4225+
4226+
(east-most box edge).
4227+
4228+
4229+
If the vertical axis is included, the third and the sixth number are
4230+
4231+
the bottom and the top of the 3-dimensional bounding box.
4232+
4233+
4234+
If a feature has multiple spatial geometry properties, it is the
4235+
4236+
decision of the server whether only a single spatial geometry property
4237+
4238+
is used to determine the extent or all relevant geometries.
4239+
4240+
4241+
Example: The bounding box of the New Zealand Exclusive Economic Zone in
4242+
4243+
WGS 84 (from 160.6°E to 170°W and from 55.95°S to 25.89°S) would be
4244+
4245+
represented in JSON as `[160.6, -55.95, -170, -25.89]` and in a query as
4246+
4247+
`bbox=160.6,-55.95,-170,-25.89`.
4248+
required: false
4249+
schema:
4250+
type: array
4251+
minItems: 4
4252+
maxItems: 6
4253+
items:
4254+
type: number
4255+
style: form
4256+
explode: false
4257+
collectionId:
4258+
name: collectionId
4259+
in: path
4260+
description: local identifier of a collection
4261+
required: true
4262+
schema:
4263+
type: string
4264+
datetime:
4265+
name: datetime
4266+
in: query
4267+
description: >-
4268+
Either a date-time or an interval, open or closed. Date and time
4269+
expressions
4270+
4271+
adhere to RFC 3339. Open intervals are expressed using double-dots.
4272+
4273+
4274+
Examples:
4275+
4276+
4277+
* A date-time: "2018-02-12T23:20:50Z"
4278+
4279+
* A closed interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z"
4280+
4281+
* Open intervals: "2018-02-12T00:00:00Z/.." or "../2018-03-18T12:31:12Z"
4282+
4283+
4284+
Only features that have a temporal property that intersects the value of
4285+
4286+
`datetime` are selected.
4287+
4288+
4289+
If a feature has multiple temporal properties, it is the decision of the
4290+
4291+
server whether only a single temporal property is used to determine
4292+
4293+
the extent or all relevant temporal properties.
4294+
required: false
4295+
schema:
4296+
type: string
4297+
style: form
4298+
explode: false
4299+
limit:
4300+
name: limit
4301+
in: query
4302+
description: >-
4303+
The optional limit parameter limits the number of items that are
4304+
presented in the response document.
4305+
4306+
4307+
Only items are counted that are on the first level of the collection in
4308+
the response document.
4309+
4310+
Nested objects contained within the explicitly requested items shall not
4311+
be counted.
4312+
4313+
4314+
Minimum = 1. Maximum = 100. Default = 10.
4315+
required: false
4316+
schema:
4317+
type: integer
4318+
minimum: 1
4319+
maximum: 100
4320+
default: 10
4321+
style: form
4322+
explode: false
4323+
collectionsArray:
4324+
name: collections
4325+
description: |
4326+
Array with the id of the collection to search products for.
4327+
required: false
4328+
schema:
4329+
type: array
4330+
items:
4331+
type: string
4332+
explode: false
4333+
minItems: 1
4334+
maxItems: 1
41614335
order_id:
41624336
type: string
41634337
description: >-

0 commit comments

Comments
 (0)