niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 9 | - name: cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 10 | description: cps Resource |
11 | paths: | ||||
12 | /v1/dataspaces/{dataspace-name}/: | ||||
13 | delete: | ||||
14 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 15 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 24 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 44 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 53 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 54 | responses: |
55 | 200: | ||||
56 | description: OK | ||||
57 | content: | ||||
58 | application/json: | ||||
59 | schema: | ||||
60 | type: object | ||||
61 | 401: | ||||
62 | description: Unauthorized | ||||
63 | content: {} | ||||
puthuparambil.aditya | e182a6b | 2020-12-10 16:49:53 +0000 | [diff] [blame^] | 64 | 400: |
65 | description: Bad Request | ||||
66 | content: {} | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 67 | 403: |
68 | description: Forbidden | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 69 | 404: |
70 | description: Not Found | ||||
71 | content: {} | ||||
puthuparambil.aditya | e182a6b | 2020-12-10 16:49:53 +0000 | [diff] [blame^] | 72 | 204: |
73 | description: No Content | ||||
74 | content: {} | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 75 | post: |
76 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 77 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 78 | summary: Create a new anchor in the given dataspace |
79 | operationId: createAnchor | ||||
80 | parameters: | ||||
81 | - name: dataspace-name | ||||
82 | in: path | ||||
83 | description: dataspace-name | ||||
84 | required: true | ||||
85 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 86 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 87 | requestBody: |
88 | content: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 89 | application/json: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 90 | schema: |
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 91 | title: Anchor |
92 | description: anchor | ||||
93 | $ref: '#/components/schemas/Anchor' | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 94 | required: true |
95 | responses: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 96 | 201: |
97 | description: Created | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 98 | content: |
99 | application/json: | ||||
100 | schema: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 101 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 102 | 401: |
103 | description: Unauthorized | ||||
104 | content: {} | ||||
105 | 403: | ||||
106 | description: Forbidden | ||||
107 | content: {} | ||||
108 | 404: | ||||
109 | description: Not Found | ||||
110 | content: {} | ||||
111 | /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}: | ||||
112 | get: | ||||
113 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 114 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 115 | summary: Read an anchor given a anchor and a dataspace |
116 | operationId: getAnchor | ||||
117 | parameters: | ||||
118 | - name: dataspace-name | ||||
119 | in: path | ||||
120 | description: dataspace-name | ||||
121 | required: true | ||||
122 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 123 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 124 | - name: anchor-name |
125 | in: path | ||||
126 | description: anchor-name | ||||
127 | required: true | ||||
128 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 129 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 130 | responses: |
131 | 200: | ||||
132 | description: OK | ||||
133 | content: | ||||
134 | application/json: | ||||
135 | schema: | ||||
136 | type: object | ||||
137 | 401: | ||||
138 | description: Unauthorized | ||||
139 | content: {} | ||||
140 | 403: | ||||
141 | description: Forbidden | ||||
142 | content: {} | ||||
143 | 404: | ||||
144 | description: Not Found | ||||
145 | content: {} | ||||
146 | delete: | ||||
147 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 148 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 149 | summary: Delete an anchor given a anchor and a dataspace |
150 | operationId: deleteAnchor | ||||
151 | parameters: | ||||
152 | - name: dataspace-name | ||||
153 | in: path | ||||
154 | description: dataspace-name | ||||
155 | required: true | ||||
156 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 157 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 158 | - name: anchor-name |
159 | in: path | ||||
160 | description: anchor-name | ||||
161 | required: true | ||||
162 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 163 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 164 | responses: |
165 | 200: | ||||
166 | description: OK | ||||
167 | content: | ||||
168 | application/json: | ||||
169 | schema: | ||||
170 | type: object | ||||
171 | 204: | ||||
172 | description: No Content | ||||
173 | content: {} | ||||
174 | 401: | ||||
175 | description: Unauthorized | ||||
176 | content: {} | ||||
177 | 403: | ||||
178 | description: Forbidden | ||||
179 | content: {} | ||||
180 | /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes: | ||||
181 | get: | ||||
182 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 183 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 184 | summary: Get a node given an anchor for the given dataspace |
185 | operationId: getNodeByDataspaceAndAnchor | ||||
186 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 187 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 188 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 189 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 190 | required: true |
191 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 192 | type: string |
193 | - name: anchor-name | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 194 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 195 | description: anchor-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 196 | required: true |
197 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 198 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 199 | responses: |
200 | 200: | ||||
201 | description: OK | ||||
202 | content: | ||||
203 | application/json: | ||||
204 | schema: | ||||
205 | type: object | ||||
206 | 401: | ||||
207 | description: Unauthorized | ||||
208 | content: {} | ||||
209 | 403: | ||||
210 | description: Forbidden | ||||
211 | content: {} | ||||
212 | 404: | ||||
213 | description: Not Found | ||||
214 | content: {} | ||||
215 | x-codegen-request-body-name: xpath | ||||
216 | /v1/dataspaces/{dataspace-name}/modules: | ||||
217 | get: | ||||
218 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 219 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 220 | summary: Read all yang modules in the store |
221 | operationId: getModule | ||||
222 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 223 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 224 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 225 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 226 | required: true |
227 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 228 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 229 | - name: namespace-name |
230 | in: query | ||||
231 | description: namespace-name | ||||
232 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 233 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 234 | - name: revision |
235 | in: query | ||||
236 | description: revision | ||||
237 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 238 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 239 | responses: |
240 | 200: | ||||
241 | description: OK | ||||
242 | content: | ||||
243 | application/json: | ||||
244 | schema: | ||||
245 | type: object | ||||
246 | 401: | ||||
247 | description: Unauthorized | ||||
248 | content: {} | ||||
249 | 403: | ||||
250 | description: Forbidden | ||||
251 | content: {} | ||||
252 | 404: | ||||
253 | description: Not Found | ||||
254 | content: {} | ||||
255 | post: | ||||
256 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 257 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 258 | summary: Create modules for the given dataspace |
259 | operationId: createModules | ||||
260 | parameters: | ||||
261 | - name: dataspace-name | ||||
262 | in: path | ||||
263 | description: dataspace-name | ||||
264 | required: true | ||||
265 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 266 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 267 | requestBody: |
268 | content: | ||||
269 | multipart/form-data: | ||||
270 | schema: | ||||
271 | required: | ||||
272 | - file | ||||
273 | properties: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 274 | multipartFile: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 275 | type: string |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 276 | description: multipartFile |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 277 | format: binary |
278 | required: true | ||||
279 | responses: | ||||
280 | 200: | ||||
281 | description: OK | ||||
282 | content: | ||||
283 | application/json: | ||||
284 | schema: | ||||
285 | type: object | ||||
286 | 201: | ||||
287 | description: Created | ||||
288 | content: {} | ||||
289 | 401: | ||||
290 | description: Unauthorized | ||||
291 | content: {} | ||||
292 | 403: | ||||
293 | description: Forbidden | ||||
294 | content: {} | ||||
295 | 404: | ||||
296 | description: Not Found | ||||
297 | content: {} | ||||
298 | /v1/dataspaces/{dataspace-name}/nodes: | ||||
299 | get: | ||||
300 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 301 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 302 | summary: Get all nodes for a given dataspace using an xpath or schema node identifier |
303 | operationId: getNode | ||||
304 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 305 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 306 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 307 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 308 | required: true |
309 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 310 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 311 | responses: |
312 | 200: | ||||
313 | description: OK | ||||
314 | content: | ||||
315 | application/json: | ||||
316 | schema: | ||||
317 | type: object | ||||
318 | 401: | ||||
319 | description: Unauthorized | ||||
320 | content: {} | ||||
321 | 403: | ||||
322 | description: Forbidden | ||||
323 | content: {} | ||||
324 | 404: | ||||
325 | description: Not Found | ||||
326 | content: {} | ||||
327 | x-codegen-request-body-name: requestBody | ||||
328 | post: | ||||
329 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 330 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 331 | summary: Create a node for a given anchor for the given dataspace |
332 | operationId: createNode | ||||
333 | parameters: | ||||
334 | - name: dataspace-name | ||||
335 | in: path | ||||
336 | description: dataspace-name | ||||
337 | required: true | ||||
338 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 339 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 340 | requestBody: |
341 | content: | ||||
342 | multipart/form-data: | ||||
343 | schema: | ||||
344 | required: | ||||
345 | - file | ||||
346 | properties: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 347 | multipartFile: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 348 | type: string |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 349 | description: multipartFile |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 350 | format: binary |
351 | required: true | ||||
352 | responses: | ||||
353 | 200: | ||||
354 | description: OK | ||||
355 | content: | ||||
356 | application/json: | ||||
357 | schema: | ||||
358 | type: object | ||||
359 | 201: | ||||
360 | description: Created | ||||
361 | content: {} | ||||
362 | 401: | ||||
363 | description: Unauthorized | ||||
364 | content: {} | ||||
365 | 403: | ||||
366 | description: Forbidden | ||||
367 | content: {} | ||||
368 | 404: | ||||
369 | description: Not Found | ||||
370 | content: {} | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 371 | components: |
Ruslan Kashapov | 828136e | 2020-11-30 09:45:09 +0200 | [diff] [blame] | 372 | schemas: |
373 | ErrorMessage: | ||||
374 | type: object | ||||
375 | title: Error | ||||
376 | properties: | ||||
377 | status: | ||||
378 | type: string | ||||
379 | message: | ||||
380 | type: string | ||||
381 | details: | ||||
382 | type: string | ||||
383 | Anchor: | ||||
384 | type: object | ||||
385 | title: Anchor | ||||
386 | required: | ||||
387 | - anchorName | ||||
388 | - namespace | ||||
389 | - revision | ||||
390 | properties: | ||||
391 | anchorName: | ||||
392 | type: string | ||||
393 | namespace: | ||||
394 | type: string | ||||
395 | revision: | ||||
396 | type: string |