-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathopenapi.yaml
381 lines (380 loc) · 13.9 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
openapi: 3.0.1
info:
title: The SpatioTemporal Asset Catalog API - Collection Transaction
version: 1.0.0-beta.1
description: >-
This is an OpenAPI definition of the SpatioTemporal Asset Catalog API Collection Transaction
specification.
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: Collection Transaction
description: >-
STAC-specific operations to add, remove, and edit Collections within STAC API - Collections
server.
paths:
"/collections":
post:
summary: Add a new Collection
description: add a new STAC Collection or add multiple collections from a list of Collections to a server
operationId: postCollection
tags:
- Collection Transaction
requestBody:
content:
application/json:
schema:
oneOf:
- $ref: "#/components/schemas/postOrPutCollectionCollection"
- $ref: "#/components/schemas/postOrPutCollection"
responses:
"201":
description: Status of the create request.
headers:
Location:
description: The URL of the newly added resource (i.e. path of the resource end point)
schema:
type: string
format: url
ETag:
schema:
type: string
description: A string to ensure the item has not been modified
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/collection"
"202":
description: The item was accepted for asynchronous action
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/NotFound"
"500":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
default:
description: An error occurred.
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"
"/collections/{collectionId}":
parameters:
- $ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/parameters/collectionId"
get:
tags:
- Collection Transaction
summary: Get a specific Collection
description: |-
Fetch the Collection with ID `collectionId`
operationId: getCollection
responses:
"200":
description: Adds a ETag header to the response
headers:
ETag:
schema:
type: string
description: A string to ensure the item has not been modified
put:
summary: Replace a Collection completely
description: >-
Use this method to update an existing Collection. Requires the entire
Collection description be submitted.
operationId: updateCollection
tags:
- Collection Transaction
parameters:
- $ref: "#/components/parameters/IfMatch"
requestBody:
description: The request body must contain a representation of the replacement Collection.
content:
application/json:
schema:
$ref: "#/components/schemas/postOrPutCollection"
responses:
"200":
description: The Collection was replaced
headers:
ETag:
schema:
type: string
description: An updated string to track changes
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/collection"
"202":
description: The Collection was accepted for asynchronous action
"204":
description: The Collection was replaced
headers:
ETag:
schema:
type: string
description: An updated string to track changes
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/NotFound"
"412":
$ref: "#/components/responses/PreconditionFailed"
"500":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
default:
description: An error occurred.
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"
patch:
summary: Update a Collection partially
description: >-
Use this method to update an existing Collection. Requires a Collection
fragment (containing the fields to be updated) be submitted.
operationId: patchCollection
tags:
- Collection Transaction
parameters:
- $ref: "#/components/parameters/IfMatchOptional"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/patchCollection"
responses:
"200":
description: The Collection was replaced
headers:
ETag:
schema:
type: string
description: An updated string to track changes
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/collection"
"202":
description: The Collection was accepted for asynchronous action
"204":
description: Status of the update request.
headers:
ETag:
schema:
type: string
description: A string to ensure the Collection has not been modified
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/NotFound"
"500":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
default:
description: An error occurred.
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"
delete:
summary: Delete a Collection
description: Use this method to delete an existing Collection.
operationId: deleteCollection
tags:
- Collection Transaction
parameters:
- $ref: "#/components/parameters/IfMatch"
responses:
"200":
description: The resource was deleted.
"202":
description: The operation was accepted for asynchronous executiona.
"204":
description: The resource was deleted.
"400":
$ref: "#/components/responses/BadRequest"
"404":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/NotFound"
"500":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
default:
description: An error occurred.
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"
components:
parameters:
IfMatch:
name: If-Match
in: header
description: >-
Only take the action if the ETag of the Collection still matches
required: true
schema:
type: string
IfMatchOptional:
name: If-Match
in: header
description: >-
Only take the action if the ETag of the Collection still matches
required: false
schema:
type: string
schemas:
collectionId:
type: string
description: A unique identifier for the Collection.
collectionType:
type: string
description: The STAC type for Collections.
enum:
- Collection
collectionTitle:
description: human readable title of the collection
type: string
collectionDescription:
type: string
description: >-
Detailed multi-line description to fully explain the collection.
[CommonMark 0.29](http://commonmark.org/) syntax MAY be used for
rich text representation.
collectionKeywords:
type: array
description: List of keywords describing the collection.
items:
type: string
collectionSummaries:
description: |-
A map of Item property summaries, either a set of values, a range of values or a JSON Schema.
type: object
additionalProperties:
oneOf:
- title: JSON Schema (draft-07)
type: object
minProperties: 1
- type: array
title: Set of values
minItems: 1
items:
description: >-
For each field only the original data type of the property can occur (except for arrays).
- type: object
title: Range / Statistics
required:
- minimum
- maximum
properties:
minimum:
title: Minimum value
anyOf:
- type: string
- type: number
maximum:
title: Maximum value
anyOf:
- type: string
- type: number
patchCollection:
description: >-
An object that contains at least a subset of the fields for a STAC Collection.
type: object
properties:
stac_version:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/stac_version"
stac_extensions:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/stac_extensions"
type:
$ref: "#/components/schemas/collectionType"
id:
$ref: "#/components/schemas/collectionId"
title:
$ref: "#/components/schemas/collectionTitle"
description:
$ref: "#/components/schemas/collectionDescription"
keywords:
$ref: "#/components/schemas/collectionKeywords"
license:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/license"
extent:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/extent"
providers:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/providers"
links:
$ref: "#/components/schemas/collectionLinks"
assets:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/assets"
summaries:
$ref: "#/components/schemas/collectionSummaries"
collectionLinks:
type: array
items:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/link"
postOrPutCollectionCollection:
description: >-
A list of Collections augmented with foreign members that contain values relevant to a STAC entity
type: object
required:
- collections
properties:
collections:
type: array
items:
$ref: "#/components/schemas/postOrPutCollection"
links:
$ref: "#/components/schemas/collectionLinks"
postOrPutCollection:
description: >-
An object that is a STAC Collection.
type: object
required:
- stac_version
- type
- id
- description
- license
- extent
- links
properties:
stac_version:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/stac_version"
stac_extensions:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/stac_extensions"
type:
$ref: "#/components/schemas/collectionType"
id:
$ref: "#/components/schemas/collectionId"
title:
$ref: "#/components/schemas/collectionTitle"
description:
$ref: "#/components/schemas/collectionDescription"
keywords:
$ref: "#/components/schemas/collectionKeywords"
license:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/license"
extent:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/extent"
providers:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/providers"
links:
$ref: "#/components/schemas/collectionLinks"
assets:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/assets"
summaries:
$ref: "#/components/schemas/collectionSummaries"
responses:
BadRequest:
description: The request was malformed or semantically invalid
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"
PreconditionFailed:
description: Some condition specified by the request could not be met in the server
content:
application/json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/schemas/exception"