forked from open-source-labs/Docketeer
-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathopenapi.yml
303 lines (282 loc) · 6.7 KB
/
openapi.yml
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
openapi: 3.0.0
info:
title: Docketeer Extension API
description: API for managing Docketeer resources.
version: 1.0.0
paths:
# Container endpoints
/api/docker/container/running:
get:
tags:
- container
summary: List all running containers
responses:
'200':
description: List of running containers
/api/docker/container/stopped:
get:
tags:
- container
summary: List all stopped containers
responses:
'200':
description: List of stopped containers
/api/docker/container/{id}/inspect:
get:
tags:
- container
summary: Inspect a container by ID
parameters:
- name: id
in: path
required: true
description: Container ID
responses:
'200':
description: Container details
content:
application/json:
schema:
$ref:
/api/docker/container/start:
post:
tags:
- container
summary: Start a container
requestBody:
description: Container start parameters
required: true
content:
application/json:
schema:
type: object
properties:
containerId:
type: string
description: ID of the container to start
responses:
'200':
description: Container started
/api/docker/container/stop:
post:
tags:
- container
summary: Stop a container
requestBody:
description: Container stop parameters
required: true
content:
application/json:
schema:
type: object
properties:
containerId:
type: string
description: ID of the container to stop
responses:
'200':
description: Container stopped
/api/docker/container/{id}:
delete:
tags:
- container
summary: Delete a container by ID
parameters:
- name: id
in: path
required: true
description: Container ID
responses:
'204':
description: Container deleted
# Image endpoints
/api/docker/image:
get:
tags:
- image
summary: List all images
responses:
'200':
description: List of images
/api/docker/image/{id}:
get:
tags:
- image
summary: Get image by ID
parameters:
- name: id
in: path
required: true
description: Image ID
responses:
'200':
description: Image details
delete:
tags:
- image
summary: Delete an image by ID
parameters:
- name: id
in: path
required: true
description: Image ID
responses:
'204':
description: Image deleted
/api/docker/image/run:
post:
tags:
- image
summary: Run an image
requestBody:
description: Image run parameters
required: true
content:
application/json:
schema:
type: object
properties:
imageId:
type: string
description: ID of the image to run
responses:
'200':
description: Image ran
# Network endpoints
/api/docker/network:
get:
tags:
- network
summary: List all networks
responses:
'200':
description: List of networks
delete:
tags:
- network
summary: Delete all networks
responses:
'204':
description: Networks deleted
post:
tags:
- network
summary: Create a network
requestBody:
description: Network creation parameters
required: true
content:
application/json:
schema:
type: object
properties:
networkName:
type: string
description: Name of the network to create
responses:
'201':
description: Network created
/api/docker/network/{id}:
delete:
tags:
- network
summary: Delete a network by ID
parameters:
- name: id
in: path
required: true
description: Network ID
responses:
'204':
description: Network deleted
/api/docker/network/container:
post:
tags:
- network
summary: Add container to network
requestBody:
description: Container to network parameters
required: true
content:
application/json:
schema:
type: object
properties:
containerId:
type: string
description: ID of the container to add
networkId:
type: string
description: ID of the network
responses:
'200':
description: Container added to network
/api/docker/network/{id}/container/{containerId}:
delete:
tags:
- network
summary: Remove container from network by IDs
parameters:
- name: id
in: path
required: true
description: Network ID
- name: containerId
in: path
required: true
description: Container ID
responses:
'204':
description: Container removed from network
# Volume endpoints
/api/docker/volume:
get:
tags:
- volume
summary: List all volumes
responses:
'200':
description: List of volumes
/api/docker/volume/{id}/containers:
get:
tags:
- volume
summary: List containers associated with volume by ID
parameters:
- name: id
in: path
required: true
description: Volume ID
responses:
'200':
description: List of containers for a volume
/api/docker/volume/remove:
post:
tags:
- volume
summary: Remove a volume
requestBody:
description: Volume removal parameters
required: true
content:
application/json:
schema:
type: object
properties:
volumeId:
type: string
description: ID of the volume to remove
responses:
'204':
description: Volume removed
# System endpoints
/api/docker/system:
delete:
tags:
- system
summary: Clear system (perhaps pruning unused resources?)
responses:
'204':
description: System cleared
# components:
# schemas: