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: {} | ||||
64 | 403: | ||||
65 | description: Forbidden | ||||
66 | content: {} | ||||
67 | 404: | ||||
68 | description: Not Found | ||||
69 | content: {} | ||||
70 | post: | ||||
71 | tags: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 72 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 81 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 82 | requestBody: |
83 | content: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame^] | 84 | application/json: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 85 | schema: |
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame^] | 86 | title: Anchor |
87 | description: anchor | ||||
88 | $ref: '#/components/schemas/Anchor' | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 89 | required: true |
90 | responses: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame^] | 91 | 201: |
92 | description: Created | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 93 | content: |
94 | application/json: | ||||
95 | schema: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame^] | 96 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 97 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 109 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 110 | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 118 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 119 | - name: anchor-name |
120 | in: path | ||||
121 | description: anchor-name | ||||
122 | required: true | ||||
123 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 124 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 125 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 143 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 144 | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 152 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 153 | - name: anchor-name |
154 | in: path | ||||
155 | description: anchor-name | ||||
156 | required: true | ||||
157 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 158 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 159 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 178 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 179 | summary: Get a node given an anchor for the given dataspace |
180 | operationId: getNodeByDataspaceAndAnchor | ||||
181 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 182 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 183 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 184 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 185 | required: true |
186 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 187 | type: string |
188 | - name: anchor-name | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 189 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 190 | description: anchor-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 191 | required: true |
192 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 193 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 194 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 214 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 215 | summary: Read all yang modules in the store |
216 | operationId: getModule | ||||
217 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 218 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 219 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 220 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 221 | required: true |
222 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 223 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 224 | - name: namespace-name |
225 | in: query | ||||
226 | description: namespace-name | ||||
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: revision |
230 | in: query | ||||
231 | description: revision | ||||
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 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 252 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 253 | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 261 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 262 | requestBody: |
263 | content: | ||||
264 | multipart/form-data: | ||||
265 | schema: | ||||
266 | required: | ||||
267 | - file | ||||
268 | properties: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 269 | multipartFile: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 270 | type: string |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 271 | description: multipartFile |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 272 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 296 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 297 | summary: Get all nodes for a given dataspace using an xpath or schema node identifier |
298 | operationId: getNode | ||||
299 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 300 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 301 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 302 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 303 | required: true |
304 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 305 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 306 | 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.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 325 | - cps-rest |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 326 | 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: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 334 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 335 | requestBody: |
336 | content: | ||||
337 | multipart/form-data: | ||||
338 | schema: | ||||
339 | required: | ||||
340 | - file | ||||
341 | properties: | ||||
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 342 | multipartFile: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 343 | type: string |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 344 | description: multipartFile |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 345 | 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.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame^] | 366 | components: |
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 |