-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
245 lines (238 loc) · 6.82 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
openapi: 3.0.3
info:
title: Geospatial Data Service
description: |
This microservice allows access to the different layers of geospatial data
stored on the WISdoM platform.
The geospatial data is always returned in the same way to allow a coherent
output for all layers stored.
Since some layers contain additional information and properties on a
geometry these are also returned has a hash map
version: 2.0.0
servers:
- url: '/api/geodata'
components:
responses:
BadRequest:
description: Bad Request
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
UnknownLayer:
description: The Layer is unknown
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ErrorResponse'
parameters:
LayerID:
in: path
required: true
name: layer-ref
description: The UUID or Key for the layer that should be shown
schemas:
ErrorResponse:
type: object
required:
- type
- status
- title
- detail
- instance
properties:
type:
type: string
status:
type: integer
title:
type: string
detail:
type: string
instance:
type: string
error:
type: string
Object:
type: object
properties:
id:
type: integer
description: database-generated
name:
type: string
key:
type: string
description: |
identifies an object in requests as it is specific to the layer and
the key definition
additionalProperties:
additionalProperties: true
geometry:
type: object
description: A GeoJSON representation of the objects geometry
Layer:
type: object
required:
- id
- name
- key
properties:
id:
type: string
format: uuid
name:
type: string
description:
type: string
key:
type: string
attribution:
type: string
description: |
A attribution for the data contained in the layer
crs:
type: integer
title: Coordinate Reference System
description: |
The EPSG code for the coordinate reference system used in the layer
paths:
/:
get:
summary: Retrieve available Layers
responses:
200:
description: Layers
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Layer'
204:
description: No layers available
/{layer-ref}/:
parameters:
- $ref: '#/components/parameters/LayerID'
get:
summary: Get layer information
responses:
404:
$ref: '#/components/responses/UnknownLayer'
200:
description: Layer Information
content:
application/json:
schema:
$ref: '#/components/schemas/Layer'
/content/{layer-ref}/:
parameters:
- $ref: '#/components/parameters/LayerID'
get:
summary: Layer Contents
responses:
404:
$ref: '#/components/responses/UnknownLayer'
200:
description: The layers contents
content:
application/json:
schema:
type: array
description: |
An array containing the single entries of the layer
represented in GeoJSON.
Due to the possibility of mixed entries in a layer no actual
information is available on a single entry of this response.
items:
$ref: "#/components/schemas/Object"
/content/{layer-ref}/filtered:
parameters:
- $ref: '#/components/parameters/LayerID'
get:
parameters:
- in: query
name: relation
required: true
schema:
type: string
enum:
- within
- overlaps
- contains
description: >
The geospatial relation between the base layer and the other layer
- in: query
name: other_layer
required: true
schema:
type: string
description: |
The UUID or URL key of the other layer used for the geospatial
relation
- in: query
name: key
required: true
schema:
type: array
items:
type: string
description: >
One or multiple keys which are taken from the other layer and
intersected with the base layer
summary: Filtered Layer Contents
externalDocs:
url: https://postgis.net/docs/reference.html#idm12722
description: |
This endpoint allows filtering the contents of the given layer (set by
layer-id) against different geospatial relations.
Currently the service supports the following geospatial relations:
* `contains`
* `overlaps`
* `within`
These functions all use the names as they are used in the PostGIS
extension to allow a consistent usage throughout the service
responses:
404:
$ref: '#/components/responses/UnknownLayer'
200:
description: The layers contents
content:
application/json:
schema:
type: array
description: |
An array containing the single entries of the layer
represented in GeoJSON.
Due to the possibility of mixed entries in a layer no actual
information is available on a single entry of this response.
items:
$ref: "#/components/schemas/Object"
204:
description: No Objects available after filter application
400:
$ref: '#/components/responses/BadRequest'
/identify:
get:
parameters:
- in: query
name: key
required: true
schema:
type: array
items:
type: string
description: An array of keys which should be identified
responses:
200:
description: The identified objects
content:
application/json:
schema:
type: object
additionalProperties:
type: object
additionalProperties:
$ref: '#/components/schemas/Object'
400:
$ref: '#/components/responses/BadRequest'