Fixing errors in openapi.yaml
[cps.git] / cps-rest / docs / api / swagger / openapi.yml
1 openapi: 3.0.1
2 info:
3   title: CPS API
4   description: Configuration Persistence Service API
5   version: "1.0"
6 servers:
7   - url: //localhost:8088/
8 tags:
9   - name: cps-rest
10     description: cps Resource
11 paths:
12   /v1/dataspaces/{dataspace-name}/:
13     delete:
14       tags:
15         - cps-rest
16       summary: Delete the given dataspace
17       operationId: deleteDataspace
18       parameters:
19         - name: dataspace-name
20           in: path
21           description: dataspace-name
22           required: true
23           schema:
24             type: string
25       responses:
26         200:
27           description: OK
28           content:
29             application/json:
30               schema:
31                 type: object
32         204:
33           description: No Content
34           content: {}
35         401:
36           description: Unauthorized
37           content: {}
38         403:
39           description: Forbidden
40           content: {}
41   /v1/dataspaces/{dataspace-name}/anchors:
42     get:
43       tags:
44         - cps-rest
45       summary: Read all anchors, given a dataspace
46       operationId: getAnchors
47       parameters:
48         - name: dataspace-name
49           in: path
50           description: dataspace-name
51           required: true
52           schema:
53             type: string
54       responses:
55         200:
56           description: OK
57           content:
58             application/json:
59               schema:
60                 type: object
61         401:
62           description: Unauthorized
63           content: {}
64         403:
65           description: Forbidden
66           content: {}
67         404:
68           description: Not Found
69           content: {}
70     post:
71       tags:
72         - cps-rest
73       summary: Create a new anchor in the given dataspace
74       operationId: createAnchor
75       parameters:
76         - name: dataspace-name
77           in: path
78           description: dataspace-name
79           required: true
80           schema:
81             type: string
82       requestBody:
83         content:
84           multipart/form-data:
85             schema:
86               required:
87                 - file
88               properties:
89                 multipartFile:
90                   type: string
91                   description: multipartFile
92                   format: binary
93         required: true
94       responses:
95         200:
96           description: OK
97           content:
98             application/json:
99               schema:
100                 type: object
101         201:
102           description: Created
103           content: {}
104         401:
105           description: Unauthorized
106           content: {}
107         403:
108           description: Forbidden
109           content: {}
110         404:
111           description: Not Found
112           content: {}
113   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
114     get:
115       tags:
116         - cps-rest
117       summary: Read an anchor given a anchor and a dataspace
118       operationId: getAnchor
119       parameters:
120         - name: dataspace-name
121           in: path
122           description: dataspace-name
123           required: true
124           schema:
125             type: string
126         - name: anchor-name
127           in: path
128           description: anchor-name
129           required: true
130           schema:
131             type: string
132       responses:
133         200:
134           description: OK
135           content:
136             application/json:
137               schema:
138                 type: object
139         401:
140           description: Unauthorized
141           content: {}
142         403:
143           description: Forbidden
144           content: {}
145         404:
146           description: Not Found
147           content: {}
148     delete:
149       tags:
150         - cps-rest
151       summary: Delete an anchor given a anchor and a dataspace
152       operationId: deleteAnchor
153       parameters:
154         - name: dataspace-name
155           in: path
156           description: dataspace-name
157           required: true
158           schema:
159             type: string
160         - name: anchor-name
161           in: path
162           description: anchor-name
163           required: true
164           schema:
165             type: string
166       responses:
167         200:
168           description: OK
169           content:
170             application/json:
171               schema:
172                 type: object
173         204:
174           description: No Content
175           content: {}
176         401:
177           description: Unauthorized
178           content: {}
179         403:
180           description: Forbidden
181           content: {}
182   /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
183     get:
184       tags:
185         - cps-rest
186       summary: Get a node given an anchor for the given dataspace
187       operationId: getNodeByDataspaceAndAnchor
188       parameters:
189         - name: dataspace-name
190           in: path
191           description: dataspace-name
192           required: true
193           schema:
194             type: string
195         - name: anchor-name
196           in: path
197           description: anchor-name
198           required: true
199           schema:
200             type: string
201       responses:
202         200:
203           description: OK
204           content:
205             application/json:
206               schema:
207                 type: object
208         401:
209           description: Unauthorized
210           content: {}
211         403:
212           description: Forbidden
213           content: {}
214         404:
215           description: Not Found
216           content: {}
217       x-codegen-request-body-name: xpath
218   /v1/dataspaces/{dataspace-name}/modules:
219     get:
220       tags:
221         - cps-rest
222       summary: Read all yang modules in the store
223       operationId: getModule
224       parameters:
225         - name: dataspace-name
226           in: path
227           description: dataspace-name
228           required: true
229           schema:
230             type: string
231         - name: namespace-name
232           in: query
233           description: namespace-name
234           schema:
235             type: string
236         - name: revision
237           in: query
238           description: revision
239           schema:
240             type: string
241       responses:
242         200:
243           description: OK
244           content:
245             application/json:
246               schema:
247                 type: object
248         401:
249           description: Unauthorized
250           content: {}
251         403:
252           description: Forbidden
253           content: {}
254         404:
255           description: Not Found
256           content: {}
257     post:
258       tags:
259         - cps-rest
260       summary: Create modules for the given dataspace
261       operationId: createModules
262       parameters:
263         - name: dataspace-name
264           in: path
265           description: dataspace-name
266           required: true
267           schema:
268             type: string
269       requestBody:
270         content:
271           multipart/form-data:
272             schema:
273               required:
274                 - file
275               properties:
276                 multipartFile:
277                   type: string
278                   description: multipartFile
279                   format: binary
280         required: true
281       responses:
282         200:
283           description: OK
284           content:
285             application/json:
286               schema:
287                 type: object
288         201:
289           description: Created
290           content: {}
291         401:
292           description: Unauthorized
293           content: {}
294         403:
295           description: Forbidden
296           content: {}
297         404:
298           description: Not Found
299           content: {}
300   /v1/dataspaces/{dataspace-name}/nodes:
301     get:
302       tags:
303         - cps-rest
304       summary: Get all nodes for a given dataspace using an xpath or schema node identifier
305       operationId: getNode
306       parameters:
307         - name: dataspace-name
308           in: path
309           description: dataspace-name
310           required: true
311           schema:
312             type: string
313       responses:
314         200:
315           description: OK
316           content:
317             application/json:
318               schema:
319                 type: object
320         401:
321           description: Unauthorized
322           content: {}
323         403:
324           description: Forbidden
325           content: {}
326         404:
327           description: Not Found
328           content: {}
329       x-codegen-request-body-name: requestBody
330     post:
331       tags:
332         - cps-rest
333       summary: Create a node for a given anchor for the given dataspace
334       operationId: createNode
335       parameters:
336         - name: dataspace-name
337           in: path
338           description: dataspace-name
339           required: true
340           schema:
341             type: string
342       requestBody:
343         content:
344           multipart/form-data:
345             schema:
346               required:
347                 - file
348               properties:
349                 multipartFile:
350                   type: string
351                   description: multipartFile
352                   format: binary
353         required: true
354       responses:
355         200:
356           description: OK
357           content:
358             application/json:
359               schema:
360                 type: object
361         201:
362           description: Created
363           content: {}
364         401:
365           description: Unauthorized
366           content: {}
367         403:
368           description: Forbidden
369           content: {}
370         404:
371           description: Not Found
372           content: {}
373 components: {}