blob: 0c7c83c561a7a81304a9936d9708deca1c915b27 [file] [log] [blame]
niamhcoref7ba3592020-10-19 12:48:06 +01001openapi: 3.0.1
2info:
3 title: CPS API
4 description: Configuration Persistence Service API
5 version: "1.0"
6servers:
7 - url: //localhost:8088/
8tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +00009 - name: cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +010010 description: cps Resource
11paths:
12 /v1/dataspaces/{dataspace-name}/:
13 delete:
14 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +000015 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +010016 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +000024 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010025 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:
puthuparambil.aditya47598112020-11-02 11:31:39 +000044 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +010045 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +000053 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010054 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:
puthuparambil.aditya47598112020-11-02 11:31:39 +000072 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +010073 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +000081 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010082 requestBody:
83 content:
Rishi.Chail48830f12020-11-09 03:28:44 +000084 application/json:
niamhcoref7ba3592020-10-19 12:48:06 +010085 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +000086 title: Anchor
87 description: anchor
88 $ref: '#/components/schemas/Anchor'
niamhcoref7ba3592020-10-19 12:48:06 +010089 required: true
90 responses:
Rishi.Chail48830f12020-11-09 03:28:44 +000091 201:
92 description: Created
niamhcoref7ba3592020-10-19 12:48:06 +010093 content:
94 application/json:
95 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +000096 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010097 401:
98 description: Unauthorized
99 content: {}
100 403:
101 description: Forbidden
102 content: {}
103 404:
104 description: Not Found
105 content: {}
106 /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
107 get:
108 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000109 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100110 summary: Read an anchor given a anchor and a dataspace
111 operationId: getAnchor
112 parameters:
113 - name: dataspace-name
114 in: path
115 description: dataspace-name
116 required: true
117 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000118 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100119 - name: anchor-name
120 in: path
121 description: anchor-name
122 required: true
123 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000124 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100125 responses:
126 200:
127 description: OK
128 content:
129 application/json:
130 schema:
131 type: object
132 401:
133 description: Unauthorized
134 content: {}
135 403:
136 description: Forbidden
137 content: {}
138 404:
139 description: Not Found
140 content: {}
141 delete:
142 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000143 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100144 summary: Delete an anchor given a anchor and a dataspace
145 operationId: deleteAnchor
146 parameters:
147 - name: dataspace-name
148 in: path
149 description: dataspace-name
150 required: true
151 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000152 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100153 - name: anchor-name
154 in: path
155 description: anchor-name
156 required: true
157 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000158 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100159 responses:
160 200:
161 description: OK
162 content:
163 application/json:
164 schema:
165 type: object
166 204:
167 description: No Content
168 content: {}
169 401:
170 description: Unauthorized
171 content: {}
172 403:
173 description: Forbidden
174 content: {}
175 /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
176 get:
177 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000178 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100179 summary: Get a node given an anchor for the given dataspace
180 operationId: getNodeByDataspaceAndAnchor
181 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000182 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100183 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000184 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100185 required: true
186 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000187 type: string
188 - name: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100189 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000190 description: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100191 required: true
192 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000193 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100194 responses:
195 200:
196 description: OK
197 content:
198 application/json:
199 schema:
200 type: object
201 401:
202 description: Unauthorized
203 content: {}
204 403:
205 description: Forbidden
206 content: {}
207 404:
208 description: Not Found
209 content: {}
210 x-codegen-request-body-name: xpath
211 /v1/dataspaces/{dataspace-name}/modules:
212 get:
213 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000214 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100215 summary: Read all yang modules in the store
216 operationId: getModule
217 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000218 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100219 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000220 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100221 required: true
222 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000223 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100224 - name: namespace-name
225 in: query
226 description: namespace-name
227 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000228 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100229 - name: revision
230 in: query
231 description: revision
232 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000233 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100234 responses:
235 200:
236 description: OK
237 content:
238 application/json:
239 schema:
240 type: object
241 401:
242 description: Unauthorized
243 content: {}
244 403:
245 description: Forbidden
246 content: {}
247 404:
248 description: Not Found
249 content: {}
250 post:
251 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000252 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100253 summary: Create modules for the given dataspace
254 operationId: createModules
255 parameters:
256 - name: dataspace-name
257 in: path
258 description: dataspace-name
259 required: true
260 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000261 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100262 requestBody:
263 content:
264 multipart/form-data:
265 schema:
266 required:
267 - file
268 properties:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000269 multipartFile:
niamhcoref7ba3592020-10-19 12:48:06 +0100270 type: string
puthuparambil.aditya47598112020-11-02 11:31:39 +0000271 description: multipartFile
niamhcoref7ba3592020-10-19 12:48:06 +0100272 format: binary
273 required: true
274 responses:
275 200:
276 description: OK
277 content:
278 application/json:
279 schema:
280 type: object
281 201:
282 description: Created
283 content: {}
284 401:
285 description: Unauthorized
286 content: {}
287 403:
288 description: Forbidden
289 content: {}
290 404:
291 description: Not Found
292 content: {}
293 /v1/dataspaces/{dataspace-name}/nodes:
294 get:
295 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000296 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100297 summary: Get all nodes for a given dataspace using an xpath or schema node identifier
298 operationId: getNode
299 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000300 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100301 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000302 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100303 required: true
304 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000305 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100306 responses:
307 200:
308 description: OK
309 content:
310 application/json:
311 schema:
312 type: object
313 401:
314 description: Unauthorized
315 content: {}
316 403:
317 description: Forbidden
318 content: {}
319 404:
320 description: Not Found
321 content: {}
322 x-codegen-request-body-name: requestBody
323 post:
324 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000325 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100326 summary: Create a node for a given anchor for the given dataspace
327 operationId: createNode
328 parameters:
329 - name: dataspace-name
330 in: path
331 description: dataspace-name
332 required: true
333 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000334 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100335 requestBody:
336 content:
337 multipart/form-data:
338 schema:
339 required:
340 - file
341 properties:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000342 multipartFile:
niamhcoref7ba3592020-10-19 12:48:06 +0100343 type: string
puthuparambil.aditya47598112020-11-02 11:31:39 +0000344 description: multipartFile
niamhcoref7ba3592020-10-19 12:48:06 +0100345 format: binary
346 required: true
347 responses:
348 200:
349 description: OK
350 content:
351 application/json:
352 schema:
353 type: object
354 201:
355 description: Created
356 content: {}
357 401:
358 description: Unauthorized
359 content: {}
360 403:
361 description: Forbidden
362 content: {}
363 404:
364 description: Not Found
365 content: {}
Rishi.Chail48830f12020-11-09 03:28:44 +0000366components:
367 schemas:
368 Anchor:
369 type: object
370 title: Anchor
371 required:
372 - anchorName
373 - namespace
374 - revision
375 properties:
376 anchorName:
377 type: string
378 namespace:
379 type: string
380 revision:
381 type: string