-
Notifications
You must be signed in to change notification settings - Fork 4
/
openapi.yaml
289 lines (281 loc) · 9.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
openapi: 3.0.3
info:
title: The SpatioTemporal Asset Catalog API - Filter
description: Adds parameters to compare properties and only return the items that match
version: 1.0.0-rc.3
tags:
- name: Core
description: Part of STAC API - Core definition
- name: Collections
description: Part of STAC API - Collections definition
- name: Features
description: Part of STAC API - Features definition
- name: Item Search
description: Part of STAC API - Item Search definition
- name: Filter Extension
description: Part of STAC API - Filter extension definition
paths:
"/":
get:
description: Landing Page
tags:
- Core
responses:
"200":
description: Landing Page
links:
queryables:
operationId: getQueryables
description: |-
A link with rel=queryables for the entire catalog.
/queryables:
get:
summary: Get the JSON Schema defining the list of variable terms that can be used in CQL2 expressions.
operationId: getQueryables
description: |-
This endpoint returns a list of variable terms that can be used in CQL2 expressions. The
precise definition of this can be found in the OGC API - Features - Part 3: Filtering and the
Common Query Language (CQL2) specification.
tags:
- Filter Extension
responses:
"200":
$ref: "#/components/responses/Queryables"
default:
$ref: "#/components/responses/Error"
/collections/{collectionId}:
get:
description: |-
This endpoint returns a list of Collections.
tags:
- Features
- Collections
parameters:
- in: path
name: collectionId
schema:
type: string
required: true
description: ID of Collection
responses:
"200":
description: Collection description
links:
queryables:
operationId: getQueryablesForCollection
description: |-
A link with rel=queryables for queryables to only apply to this collection.
/collections/{collectionId}/items:
get:
tags:
- Features
- Filter Extension
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:
- in: path
name: collectionId
schema:
type: string
required: true
description: ID of Collection
- $ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/parameters/limit"
- $ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/parameters/bbox"
- $ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/parameters/datetime"
- $ref: "#/components/parameters/filter"
- $ref: "#/components/parameters/filter-lang"
- $ref: "#/components/parameters/filter-crs"
responses:
"200":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Features"
"404":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/NotFound"
"4XX":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
"5XX":
$ref: "https://api.stacspec.org/v1.0.0/ogcapi-features/openapi.yaml#/components/responses/Error"
/collections/{collectionId}/queryables:
get:
summary: Get the JSON Schema defining the list of variable terms that can be used in CQL2 expressions.
operationId: getQueryablesForCollection
description: |-
This endpoint returns a list of variable terms that can be used in CQL2 expressions. The
precise definition of this can be found in the OGC API - Features - Part 3: Filtering and the
Common Query Language (CQL) specification.
parameters:
- in: path
name: collectionId
schema:
type: string
required: true
description: ID of Collection
tags:
- Filter Extension
responses:
"200":
$ref: "#/components/responses/Queryables"
default:
$ref: "#/components/responses/Error"
/search:
get:
summary: Search STAC items with full-featured filtering.
operationId: getItemSearch
description: |-
Retrieve Items matching filters. Intended as a shorthand API for simple
queries.
This method is required to implement.
If this endpoint is implemented on a server, it is required to add a
link referring to this endpoint with `rel` set to `search` to the
`links` array in `GET /`. As `GET` is the default method, the `method`
may not be set explicitly in the link.
tags:
- Item Search
- Filter Extension
parameters:
- $ref: "#/components/parameters/filter"
- $ref: "#/components/parameters/filter-lang"
- $ref: "#/components/parameters/filter-crs"
responses:
"200":
description: A feature collection.
content:
application/geo+json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/item-search/openapi.yaml#/components/schemas/itemCollection"
text/html:
schema:
type: string
"4XX":
$ref: "#/components/responses/Error"
"5XX":
$ref: "#/components/responses/Error"
post:
summary: Search STAC items with full-featured filtering.
operationId: postItemSearch
description: |-
Retrieve items matching filters. Intended as the standard, full-featured
query API.
If this endpoint is implemented on a server, it is required to add a
link referring to this endpoint with `rel` set to `search` and `method`
set to `POST` to the `links` array in `GET /`.
tags:
- Item Search
- Filter Extension
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/searchBody"
responses:
"200":
description: A feature collection.
content:
application/geo+json:
schema:
$ref: "https://api.stacspec.org/v1.0.0/item-search/openapi.yaml#/components/schemas/itemCollection"
text/html:
schema:
type: string
"4XX":
$ref: "#/components/responses/Error"
"5XX":
$ref: "#/components/responses/Error"
components:
parameters:
filter:
name: filter
x-stac-api-fragment: filter
in: query
description: |-
**Extension:** Filter
A CQL2 filter expression for filtering items.
required: true
schema:
oneOf:
- $ref: "#/components/schemas/filter-cql2-json"
- $ref: "#/components/schemas/filter-cql2-text"
filter-lang:
name: filter-lang
x-stac-api-fragment: filter
in: query
description: |-
**Extension:** Filter
The CQL2 filter encoding that the 'filter' value uses. Must be one of 'cql2-text' or 'cql2-json'.
required: false
schema:
$ref: "#/components/schemas/filter-lang"
filter-crs:
name: filter-crs
x-stac-api-fragment: filter
in: query
description: |-
**Extension:** Filter
The CRS used by spatial predicates in the filter parameter. In STAC API, only value that must be accepted
is 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'.
required: false
schema:
$ref: "#/components/schemas/filter-crs"
schemas:
searchBody:
type: object
x-stac-api-fragment: filter
description: |-
**Extension:** Filter
A filter for properties in Items.
allOf: # Combines the searchBody of Item-filter and the inline model
- $ref: "https://api.stacspec.org/v1.0.0/item-search/openapi.yaml#/components/schemas/searchBody"
properties:
filter:
$ref: "#/components/schemas/filter-cql2-json"
filter-lang:
$ref: "#/components/schemas/filter-lang"
filter-crs:
$ref: "#/components/schemas/filter-crs"
filter-cql2-text:
description: |
A CQL2 filter expression in the 'cql2-text' encoding.
type: string
filter-cql2-json:
$ref: "https://raw.githubusercontent.com/opengeospatial/ogcapi-features/master/cql2/standard/schema/cql2.yml#/components/schemas/booleanExpression"
filter-lang:
description: |
The CQL2 filter encoding that the 'filter' value uses.
type: string
enum:
- "cql2-text"
- "cql2-json"
filter-crs:
description: |
The coordinate reference system (CRS) used by spatial literals in the 'filter' value. The only value that STAC APIs must
accept is 'http://www.opengis.net/def/crs/OGC/1.3/CRS84'.
type: string
format: uri
exception:
type: object
description: |-
Information about the exception: an error code plus an optional description.
required:
- code
properties:
code:
type: string
description:
type: string
responses:
Queryables:
description: A JSON Schema defining the Queryables allowed in CQL2 expressions
content:
application/schema+json:
schema:
type: object
Error:
description: An error occurred.
content:
application/json:
schema:
$ref: "#/components/schemas/exception"