blob: d76ec5ecd5743133bbcaa48cf0c484f8f36355db [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.aditya84ac94d2020-12-16 16:51:08 +000015 - cps-admin
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: {}
Ruslan Kashapovacfb2072020-12-10 10:49:59 +020041 /v1/dataspaces/{dataspace-name}/schema-sets:
42 post:
43 tags:
44 - cps-admin
45 summary: Create a new schema set in the given dataspace
46 operationId: createSchemaSet
47 parameters:
48 - name: dataspace-name
49 in: path
50 description: dataspace-name
51 required: true
52 schema:
53 type: string
54 requestBody:
55 required: true
56 content:
57 multipart/form-data:
58 schema:
59 required:
60 - schemaSetName
61 - multipartFile
62 properties:
63 schemaSetName:
64 type: string
65 multipartFile:
66 type: string
67 description: multipartFile
68 format: binary
69 responses:
70 201:
71 description: Created
72 content:
73 application/json:
74 schema:
75 type: string
76 401:
77 description: Unauthorized
78 content: { }
79 403:
80 description: Forbidden
81 content: { }
niamhcoref7ba3592020-10-19 12:48:06 +010082 /v1/dataspaces/{dataspace-name}/anchors:
83 get:
84 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +000085 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +010086 summary: Read all anchors, given a dataspace
87 operationId: getAnchors
88 parameters:
89 - name: dataspace-name
90 in: path
91 description: dataspace-name
92 required: true
93 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +000094 type: string
niamhcoref7ba3592020-10-19 12:48:06 +010095 responses:
96 200:
97 description: OK
98 content:
99 application/json:
100 schema:
101 type: object
102 401:
103 description: Unauthorized
104 content: {}
puthuparambil.adityae182a6b2020-12-10 16:49:53 +0000105 400:
106 description: Bad Request
107 content: {}
niamhcoref7ba3592020-10-19 12:48:06 +0100108 403:
109 description: Forbidden
niamhcoref7ba3592020-10-19 12:48:06 +0100110 404:
111 description: Not Found
112 content: {}
puthuparambil.adityae182a6b2020-12-10 16:49:53 +0000113 204:
114 description: No Content
115 content: {}
niamhcoref7ba3592020-10-19 12:48:06 +0100116 post:
117 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000118 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +0100119 summary: Create a new anchor in the given dataspace
120 operationId: createAnchor
121 parameters:
122 - name: dataspace-name
123 in: path
124 description: dataspace-name
125 required: true
126 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000127 type: string
Ruslan Kashapov8a1e3c92020-11-24 11:13:43 +0200128 - name: schema-set-name
129 in: query
130 description: schema-set-name
131 required: true
132 schema:
133 type: string
134 - name: anchor-name
135 in: query
136 description: anchor-name
137 required: true
138 schema:
139 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100140 responses:
Rishi.Chail48830f12020-11-09 03:28:44 +0000141 201:
142 description: Created
niamhcoref7ba3592020-10-19 12:48:06 +0100143 content:
144 application/json:
145 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +0000146 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100147 401:
148 description: Unauthorized
149 content: {}
150 403:
151 description: Forbidden
152 content: {}
153 404:
154 description: Not Found
155 content: {}
156 /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}:
157 get:
158 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000159 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +0100160 summary: Read an anchor given a anchor and a dataspace
161 operationId: getAnchor
162 parameters:
163 - name: dataspace-name
164 in: path
165 description: dataspace-name
166 required: true
167 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000168 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100169 - name: anchor-name
170 in: path
171 description: anchor-name
172 required: true
173 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000174 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100175 responses:
176 200:
177 description: OK
178 content:
179 application/json:
180 schema:
181 type: object
182 401:
183 description: Unauthorized
184 content: {}
185 403:
186 description: Forbidden
187 content: {}
188 404:
189 description: Not Found
190 content: {}
191 delete:
192 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000193 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +0100194 summary: Delete an anchor given a anchor and a dataspace
195 operationId: deleteAnchor
196 parameters:
197 - name: dataspace-name
198 in: path
199 description: dataspace-name
200 required: true
201 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000202 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100203 - name: anchor-name
204 in: path
205 description: anchor-name
206 required: true
207 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000208 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100209 responses:
210 200:
211 description: OK
212 content:
213 application/json:
214 schema:
215 type: object
216 204:
217 description: No Content
218 content: {}
219 401:
220 description: Unauthorized
221 content: {}
222 403:
223 description: Forbidden
224 content: {}
225 /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes:
226 get:
227 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000228 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100229 summary: Get a node given an anchor for the given dataspace
230 operationId: getNodeByDataspaceAndAnchor
231 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000232 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100233 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000234 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100235 required: true
236 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000237 type: string
238 - name: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100239 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000240 description: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100241 required: true
242 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000243 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100244 responses:
245 200:
246 description: OK
247 content:
248 application/json:
249 schema:
250 type: object
251 401:
252 description: Unauthorized
253 content: {}
254 403:
255 description: Forbidden
256 content: {}
257 404:
258 description: Not Found
259 content: {}
260 x-codegen-request-body-name: xpath
niamhcoref7ba3592020-10-19 12:48:06 +0100261 /v1/dataspaces/{dataspace-name}/nodes:
262 get:
263 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000264 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100265 summary: Get all nodes for a given dataspace using an xpath or schema node identifier
266 operationId: getNode
267 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000268 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100269 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000270 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100271 required: true
272 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000273 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100274 responses:
275 200:
276 description: OK
277 content:
278 application/json:
279 schema:
280 type: object
281 401:
282 description: Unauthorized
283 content: {}
284 403:
285 description: Forbidden
286 content: {}
287 404:
288 description: Not Found
289 content: {}
290 x-codegen-request-body-name: requestBody
291 post:
292 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000293 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100294 summary: Create a node for a given anchor for the given dataspace
295 operationId: createNode
296 parameters:
297 - name: dataspace-name
298 in: path
299 description: dataspace-name
300 required: true
301 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000302 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100303 requestBody:
304 content:
305 multipart/form-data:
306 schema:
307 required:
308 - file
309 properties:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000310 multipartFile:
niamhcoref7ba3592020-10-19 12:48:06 +0100311 type: string
puthuparambil.aditya47598112020-11-02 11:31:39 +0000312 description: multipartFile
niamhcoref7ba3592020-10-19 12:48:06 +0100313 format: binary
314 required: true
315 responses:
316 200:
317 description: OK
318 content:
319 application/json:
320 schema:
321 type: object
322 201:
323 description: Created
324 content: {}
325 401:
326 description: Unauthorized
327 content: {}
328 403:
329 description: Forbidden
330 content: {}
331 404:
332 description: Not Found
333 content: {}
Rishi.Chail48830f12020-11-09 03:28:44 +0000334components:
Ruslan Kashapov828136e2020-11-30 09:45:09 +0200335 schemas:
336 ErrorMessage:
337 type: object
338 title: Error
339 properties:
340 status:
341 type: string
342 message:
343 type: string
344 details:
345 type: string