-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathopenapi3.yaml
More file actions
189 lines (189 loc) · 4.65 KB
/
Copy pathopenapi3.yaml
File metadata and controls
189 lines (189 loc) · 4.65 KB
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
openapi: 3.0.1
info:
title: dump-server
description: A RESTful API for querying and saving planet dump's metadata
version: 2.0.0
license:
name: MIT
url: https://opensource.org/licenses/MIT
paths:
/dumps:
get:
operationId: getDumps
tags:
- dump
summary: Get dumps by optional filters
parameters:
- in: query
name: limit
schema:
type: integer
default: 10
minimum: 1
maximum: 100
description: The number of dumps to be returned in a request
- in: query
name: from
schema:
$ref: '#/components/schemas/dumpDate'
description: The date to fetch dumps from
- in: query
name: to
schema:
$ref: '#/components/schemas/dumpDate'
description: The date to fetch dumps until
- in: query
name: sort
description: Date sort order
schema:
type: string
enum:
- asc
- desc
default: desc
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/dumpResponse'
'400':
$ref: '#/components/responses/BadRequest'
5XX:
$ref: '#/components/responses/UnexpectedError'
post:
operationId: postDump
tags:
- dump
summary: Create a dump
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/dumpCreation'
responses:
'201':
description: Created
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
5XX:
$ref: '#/components/responses/UnexpectedError'
/dumps/{dumpId}:
get:
operationId: getDumpById
tags:
- dump
summary: Get a dump by id
parameters:
- in: path
name: dumpId
schema:
$ref: '#/components/schemas/dumpId'
required: true
description: id of the dump to get
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/dumpResponse'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/UnprocessableEntity'
5XX:
$ref: '#/components/responses/UnexpectedError'
components:
responses:
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/error'
NotFound:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
Unauthorized:
description: Unauthorized Error
content:
application/json:
schema:
$ref: '#/components/schemas/error'
UnexpectedError:
description: Unexpected Error
content:
application/json:
schema:
$ref: '#/components/schemas/error'
UnprocessableEntity:
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/error'
schemas:
dumpDate:
type: string
format: date-time
dumpId:
type: string
format: uuid
error:
type: object
required:
- message
properties:
message:
type: string
baseDump:
type: object
required:
- name
- timestamp
properties:
name:
type: string
maxLength: 100
timestamp:
$ref: '#/components/schemas/dumpDate'
description:
type: string
maxLength: 256
sequenceNumber:
type: integer
format: int64
dumpResponse:
allOf:
- $ref: '#/components/schemas/baseDump'
- type: object
- required:
- id
- url
- properties:
id:
$ref: '#/components/schemas/dumpId'
url:
type: string
dumpCreation:
allOf:
- $ref: '#/components/schemas/baseDump'
- type: object
- required:
- bucket
- properties:
bucket:
type: string
minLength: 3
maxLength: 63