Release notes update for 3.4.8
[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       requestBody:
202         description: xpath
203         content:
204           application/json:
205             schema:
206               type: string
207         required: true
208       responses:
209         200:
210           description: OK
211           content:
212             application/json:
213               schema:
214                 type: object
215         401:
216           description: Unauthorized
217           content: {}
218         403:
219           description: Forbidden
220           content: {}
221         404:
222           description: Not Found
223           content: {}
224       x-codegen-request-body-name: xpath
225   /v1/dataspaces/{dataspace-name}/modules:
226     get:
227       tags:
228         - cps-rest
229       summary: Read all yang modules in the store
230       operationId: getModule
231       parameters:
232         - name: dataspace-name
233           in: path
234           description: dataspace-name
235           required: true
236           schema:
237             type: string
238         - name: namespace-name
239           in: query
240           description: namespace-name
241           schema:
242             type: string
243         - name: revision
244           in: query
245           description: revision
246           schema:
247             type: string
248       responses:
249         200:
250           description: OK
251           content:
252             application/json:
253               schema:
254                 type: object
255         401:
256           description: Unauthorized
257           content: {}
258         403:
259           description: Forbidden
260           content: {}
261         404:
262           description: Not Found
263           content: {}
264     post:
265       tags:
266         - cps-rest
267       summary: Create modules for the given dataspace
268       operationId: createModules
269       parameters:
270         - name: dataspace-name
271           in: path
272           description: dataspace-name
273           required: true
274           schema:
275             type: string
276       requestBody:
277         content:
278           multipart/form-data:
279             schema:
280               required:
281                 - file
282               properties:
283                 multipartFile:
284                   type: string
285                   description: multipartFile
286                   format: binary
287         required: true
288       responses:
289         200:
290           description: OK
291           content:
292             application/json:
293               schema:
294                 type: object
295         201:
296           description: Created
297           content: {}
298         401:
299           description: Unauthorized
300           content: {}
301         403:
302           description: Forbidden
303           content: {}
304         404:
305           description: Not Found
306           content: {}
307   /v1/dataspaces/{dataspace-name}/nodes:
308     get:
309       tags:
310         - cps-rest
311       summary: Get all nodes for a given dataspace using an xpath or schema node identifier
312       operationId: getNode
313       parameters:
314         - name: dataspace-name
315           in: path
316           description: dataspace-name
317           required: true
318           schema:
319             type: string
320       requestBody:
321         description: requestBody
322         content:
323           application/json:
324             schema:
325               type: string
326         required: true
327       responses:
328         200:
329           description: OK
330           content:
331             application/json:
332               schema:
333                 type: object
334         401:
335           description: Unauthorized
336           content: {}
337         403:
338           description: Forbidden
339           content: {}
340         404:
341           description: Not Found
342           content: {}
343       x-codegen-request-body-name: requestBody
344     post:
345       tags:
346         - cps-rest
347       summary: Create a node for a given anchor for the given dataspace
348       operationId: createNode
349       parameters:
350         - name: dataspace-name
351           in: path
352           description: dataspace-name
353           required: true
354           schema:
355             type: string
356       requestBody:
357         content:
358           multipart/form-data:
359             schema:
360               required:
361                 - file
362               properties:
363                 multipartFile:
364                   type: string
365                   description: multipartFile
366                   format: binary
367         required: true
368       responses:
369         200:
370           description: OK
371           content:
372             application/json:
373               schema:
374                 type: object
375         201:
376           description: Created
377           content: {}
378         401:
379           description: Unauthorized
380           content: {}
381         403:
382           description: Forbidden
383           content: {}
384         404:
385           description: Not Found
386           content: {}
387 components: {}