-
Notifications
You must be signed in to change notification settings - Fork 47
/
openapi.yaml
433 lines (411 loc) · 16.8 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
openapi: 3.0.3
info:
title: STAC API - Features
version: '1.0.0-beta.4'
description: >-
This is an OpenAPI definition of the SpatioTemporal Asset Catalog API - Features
specification. This extends OGC API - Features - Part 1: Core.
contact:
name: STAC Specification
url: 'http://stacspec.org'
license:
name: Apache License 2.0
url: 'http://www.apache.org/licenses/LICENSE-2.0'
tags:
- name: Features
description: |-
All endpoints related to OGC API - Features - Part 1: Core
paths:
'/':
get:
tags:
- Features
summary: landing page
description: |-
The landing page provides links to the sub-resources.
operationId: getLandingPage
responses:
'200':
description: |-
The landing page provides links to the API definition
(link relations `service-desc` and `service-doc`),
the Conformance declaration (path `/conformance`,
link relation `conformance`), and the Feature
Collections (path `/collections`, link relation
`data`).
content:
application/json:
schema:
$ref: '../core/openapi.yaml#/components/schemas/landingPage'
example:
stac_version: 1.0.0-beta.4
type: Catalog
id: sentinel
title: Copernicus Sentinel Imagery
description: Catalog of Copernicus Sentinel 1 and 2 imagery.
conformsTo:
- 'https://api.stacspec.org/v1.0.0-beta.4/core'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson'
links:
- href: 'http://data.example.org/'
rel: self
type: application/json
title: this document
- href: 'http://data.example.org/api'
rel: service-desc
type: application/vnd.oai.openapi+json;version=3.0
title: the API definition
- href: 'http://data.example.org/api.html'
rel: service-doc
type: text/html
title: the API documentation
- href: 'http://data.example.org/sentinel-1'
rel: child
type: application/json
title: Sentinel 1 Catalog
- href: 'http://data.example.org/sentinel-2'
rel: child
type: application/json
title: Sentinel 2 Catalog
- href: 'http://data.example.org/conformance'
rel: conformance
type: application/json
title: OGC API conformance classes implemented by this server
- href: 'http://data.example.org/collections'
rel: data
type: application/json
title: Information about the feature collections
'/conformance':
get:
tags:
- Features
summary: information about specifications that this API conforms to
description: |-
A list of all conformance classes specified in a standard that the
server conforms to.
operationId: getConformanceDeclaration
responses:
'200':
$ref: '#/components/responses/ConformanceDeclaration'
'500':
$ref: '#/components/responses/ServerError'
'/collections':
get:
tags:
- Features
summary: the feature collections in the dataset
description: |-
A body of Feature Collections that belong or are used together with additional links.
Request may not return the full set of metadata per Feature Collection.
operationId: getCollections
responses:
'200':
$ref: '#/components/responses/Collections'
'500':
$ref: '#/components/responses/ServerError'
'/collections/{collectionId}':
get:
tags:
- Features
summary: |-
describe the feature collection with id `collectionId`
description: |-
A single Feature Collection for the given if `collectionId`.
Request this endpoint to get a full list of metadata for the Feature Collection.
operationId: describeCollection
parameters:
- $ref: '#/components/parameters/collectionId'
responses:
'200':
$ref: '#/components/responses/Collection'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
'/collections/{collectionId}/items':
get:
tags:
- Features
summary: fetch features
description: |-
Fetch features of the feature collection with id `collectionId`.
Every feature in a dataset belongs to a collection. A dataset may
consist of multiple feature collections. A feature collection is often a
collection of features of a similar type, based on a common schema.
operationId: getFeatures
parameters:
- $ref: '#/components/parameters/collectionId'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/bbox'
- $ref: '#/components/parameters/datetime'
responses:
'200':
$ref: '#/components/responses/Features'
'400':
$ref: '#/components/responses/InvalidParameter'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
'/collections/{collectionId}/items/{featureId}':
get:
tags:
- Features
summary: fetch a single feature
description: |-
Fetch the feature with id `featureId` in the feature collection
with id `collectionId`.
operationId: getFeature
parameters:
- $ref: '#/components/parameters/collectionId'
- $ref: '#/components/parameters/featureId'
responses:
'200':
$ref: '#/components/responses/Feature'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/ServerError'
components:
parameters:
bbox:
name: bbox
in: query
description: |-
Only features that have a geometry that intersects the bounding box are selected.
The bounding box is provided as four or six numbers, depending on whether the
coordinate reference system includes a vertical axis (height or depth):
* Lower left corner, coordinate axis 1
* Lower left corner, coordinate axis 2
* Minimum value, coordinate axis 3 (optional)
* Upper right corner, coordinate axis 1
* Upper right corner, coordinate axis 2
* Maximum value, coordinate axis 3 (optional)
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.
If a feature has multiple spatial geometry properties, it is the decision of the
server whether only a single spatial geometry property is used to determine
the extent or all relevant geometries.
required: false
schema:
type: array
oneOf:
- minItems: 4
maxItems: 4
- minItems: 6
maxItems: 6
items:
type: number
style: form
explode: false
collectionId:
name: collectionId
in: path
description: local identifier of a collection
required: true
schema:
type: string
datetime:
name: datetime
in: query
description: |-
Either a date-time or an interval, open or closed. Date and time expressions
adhere to RFC 3339. Open intervals are expressed using double-dots.
Examples:
* A date-time: "2018-02-12T23:20:50Z"
* A closed interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z"
* Open intervals: "2018-02-12T00:00:00Z/.." or "../2018-03-18T12:31:12Z"
Only features that have a temporal property that intersects the value of
`datetime` are selected.
If a feature has multiple temporal properties, it is the decision of the
server whether only a single temporal property is used to determine
the extent or all relevant temporal properties.
required: false
schema:
type: string
style: form
explode: false
featureId:
name: featureId
in: path
description: local identifier of a feature
required: true
schema:
type: string
limit:
name: limit
in: query
description: |-
The optional limit parameter limits the number of items that are presented in the response document.
Only items are counted that are on the first level of the collection in the response document.
Nested objects contained within the explicitly requested items shall not be counted.
Minimum = 1. Maximum = 10000. Default = 10.
required: false
schema:
type: integer
minimum: 1
maximum: 10000
default: 10
style: form
explode: false
schemas:
collections:
type: object
required:
- links
- collections
properties:
links:
$ref: '../core/commons.yaml#/components/schemas/links'
collections:
type: array
items:
$ref: '../core/commons.yaml#/components/schemas/collection'
featureCollectionGeoJSON:
allOf:
- $ref: '../core/commons.yaml#/components/schemas/featureCollectionGeoJSON'
- type: object
required:
- features
properties:
features:
type: array
items:
$ref: '../core/commons.yaml#/components/schemas/item'
links:
$ref: '../core/commons.yaml#/components/schemas/links'
timeStamp:
$ref: '#/components/schemas/timeStamp'
numberMatched:
$ref: '#/components/schemas/numberMatched'
numberReturned:
$ref: '#/components/schemas/numberReturned'
numberMatched:
description: |-
The number of features of the feature type that match the selection
parameters like `bbox`.
type: integer
minimum: 0
example: 127
numberReturned:
description: |-
The number of features in the feature collection.
A server may omit this information in a response, if the information
about the number of features is not known or difficult to compute.
If the value is provided, the value shall be identical to the number
of items in the "features" array.
type: integer
minimum: 0
example: 10
timeStamp:
description: This property indicates the time and date when the response was generated.
type: string
format: date-time
example: '2017-08-17T08:05:32Z'
responses:
ConformanceDeclaration:
description: |-
The URIs of all conformance classes supported by the server.
To support "generic" clients that want to access multiple
OGC API Features implementations - and not "just" a specific
API / server, the server declares the conformance
classes it implements and conforms to.
content:
application/json:
schema:
$ref: '../core/commons.yaml#/components/schemas/conformanceClasses'
example:
conformsTo:
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30'
- 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson'
Collections:
description: |-
The feature collections shared by this API.
The dataset is organized as one or more feature collections. This resource
provides information about and access to the collections.
The response contains the list of collections. For each collection, a link
to the items in the collection (path `/collections/{collectionId}/items`,
link relation `items`) as well as key information about the collection.
This information includes:
* A local identifier for the collection that is unique for the dataset;
* A list of coordinate reference systems (CRS) in which geometries may be returned by the server. The first CRS is the default coordinate reference system (the default is always WGS 84 with axis order longitude/latitude);
* An optional title and description for the collection;
* An optional extent that can be used to provide an indication of the spatial and temporal extent of the collection - typically derived from the data;
* An optional indicator about the type of the items in the collection (the default value, if the indicator is not provided, is 'feature').
content:
application/json:
schema:
$ref: '#/components/schemas/collections'
Collection:
description: |-
Information about the feature collection with id `collectionId`.
The response contains a link to the items in the collection
(path `/collections/{collectionId}/items`, link relation `items`)
as well as key information about the collection. This information
includes:
* A local identifier for the collection that is unique for the dataset;
* A list of coordinate reference systems (CRS) in which geometries may be returned by the server. The first CRS is the default coordinate reference system (the default is always WGS 84 with axis order longitude/latitude);
* An optional title and description for the collection;
* An optional extent that can be used to provide an indication of the spatial and temporal extent of the collection - typically derived from the data;
* An optional indicator about the type of the items in the collection (the default value, if the indicator is not provided, is 'feature').
content:
application/json:
schema:
$ref: '../core/commons.yaml#/components/schemas/collection'
Features:
description: |-
The response is a document consisting of features in the collection.
The features included in the response are determined by the server
based on the query parameters of the request. To support access to
larger collections without overloading the client, the API supports
paged access with links to the next page, if more features are selected
that the page size.
The `bbox` and `datetime` parameter can be used to select only a
subset of the features in the collection (the features that are in the
bounding box or time interval). The `bbox` parameter matches all features
in the collection that are not associated with a location, too. The
`datetime` parameter matches all features in the collection that are
not associated with a time stamp or interval, too.
The `limit` parameter may be used to control the subset of the
selected features that should be returned in the response, the page size.
Each page may include information about the number of selected and
returned features (`numberMatched` and `numberReturned`) as well as
links to support paging (link relation `next`).
content:
application/geo+json:
schema:
$ref: '#/components/schemas/featureCollectionGeoJSON'
Feature:
description: |-
fetch the feature with id `featureId` in the feature collection
with id `collectionId`
content:
application/geo+json:
schema:
$ref: '../core/commons.yaml#/components/schemas/item'
InvalidParameter:
description: |-
A query parameter has an invalid value.
content:
application/json:
schema:
$ref: '../core/commons.yaml#/components/schemas/exception'
NotFound:
description: |-
The requested URI was not found.
ServerError:
description: |-
A server error occurred.
content:
application/json:
schema:
$ref: '../core/commons.yaml#/components/schemas/exception'