blob: 2eed7e633db5d734075e88c34b59b7526b9fdab1 [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: {}
puthuparambil.adityae182a6b2020-12-10 16:49:53 +000064 400:
65 description: Bad Request
66 content: {}
niamhcoref7ba3592020-10-19 12:48:06 +010067 403:
68 description: Forbidden
niamhcoref7ba3592020-10-19 12:48:06 +010069 404:
70 description: Not Found
71 content: {}
puthuparambil.adityae182a6b2020-12-10 16:49:53 +000072 204:
73 description: No Content
74 content: {}
niamhcoref7ba3592020-10-19 12:48:06 +010075 post:
76 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +000077 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +010078 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +000086 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010087 requestBody:
88 content:
Rishi.Chail48830f12020-11-09 03:28:44 +000089 application/json:
niamhcoref7ba3592020-10-19 12:48:06 +010090 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +000091 title: Anchor
92 description: anchor
93 $ref: '#/components/schemas/Anchor'
niamhcoref7ba3592020-10-19 12:48:06 +010094 required: true
95 responses:
Rishi.Chail48830f12020-11-09 03:28:44 +000096 201:
97 description: Created
niamhcoref7ba3592020-10-19 12:48:06 +010098 content:
99 application/json:
100 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +0000101 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100102 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.aditya47598112020-11-02 11:31:39 +0000114 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100115 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000123 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100124 - name: anchor-name
125 in: path
126 description: anchor-name
127 required: true
128 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000129 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100130 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.aditya47598112020-11-02 11:31:39 +0000148 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100149 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000157 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100158 - name: anchor-name
159 in: path
160 description: anchor-name
161 required: true
162 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000163 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100164 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.aditya47598112020-11-02 11:31:39 +0000183 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100184 summary: Get a node given an anchor for the given dataspace
185 operationId: getNodeByDataspaceAndAnchor
186 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000187 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100188 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000189 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100190 required: true
191 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000192 type: string
193 - name: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100194 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000195 description: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100196 required: true
197 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000198 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100199 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.aditya47598112020-11-02 11:31:39 +0000219 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100220 summary: Read all yang modules in the store
221 operationId: getModule
222 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000223 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100224 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000225 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100226 required: true
227 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000228 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100229 - name: namespace-name
230 in: query
231 description: namespace-name
232 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000233 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100234 - name: revision
235 in: query
236 description: revision
237 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000238 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100239 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: {}
niamhcoref7ba3592020-10-19 12:48:06 +0100255 /v1/dataspaces/{dataspace-name}/nodes:
256 get:
257 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000258 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100259 summary: Get all nodes for a given dataspace using an xpath or schema node identifier
260 operationId: getNode
261 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000262 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100263 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000264 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100265 required: true
266 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000267 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100268 responses:
269 200:
270 description: OK
271 content:
272 application/json:
273 schema:
274 type: object
275 401:
276 description: Unauthorized
277 content: {}
278 403:
279 description: Forbidden
280 content: {}
281 404:
282 description: Not Found
283 content: {}
284 x-codegen-request-body-name: requestBody
285 post:
286 tags:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000287 - cps-rest
niamhcoref7ba3592020-10-19 12:48:06 +0100288 summary: Create a node for a given anchor for the given dataspace
289 operationId: createNode
290 parameters:
291 - name: dataspace-name
292 in: path
293 description: dataspace-name
294 required: true
295 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000296 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100297 requestBody:
298 content:
299 multipart/form-data:
300 schema:
301 required:
302 - file
303 properties:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000304 multipartFile:
niamhcoref7ba3592020-10-19 12:48:06 +0100305 type: string
puthuparambil.aditya47598112020-11-02 11:31:39 +0000306 description: multipartFile
niamhcoref7ba3592020-10-19 12:48:06 +0100307 format: binary
308 required: true
309 responses:
310 200:
311 description: OK
312 content:
313 application/json:
314 schema:
315 type: object
316 201:
317 description: Created
318 content: {}
319 401:
320 description: Unauthorized
321 content: {}
322 403:
323 description: Forbidden
324 content: {}
325 404:
326 description: Not Found
327 content: {}
Rishi.Chail48830f12020-11-09 03:28:44 +0000328components:
Ruslan Kashapov828136e2020-11-30 09:45:09 +0200329 schemas:
330 ErrorMessage:
331 type: object
332 title: Error
333 properties:
334 status:
335 type: string
336 message:
337 type: string
338 details:
339 type: string
340 Anchor:
341 type: object
342 title: Anchor
343 required:
344 - anchorName
345 - namespace
346 - revision
347 properties:
348 anchorName:
349 type: string
350 namespace:
351 type: string
352 revision:
353 type: string