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 | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 15 | - cps-admin |
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 | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 44 | - cps-admin |
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 | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 77 | - cps-admin |
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 |
Ruslan Kashapov | 8a1e3c9 | 2020-11-24 11:13:43 +0200 | [diff] [blame^] | 87 | - name: schema-set-name |
88 | in: query | ||||
89 | description: schema-set-name | ||||
90 | required: true | ||||
91 | schema: | ||||
92 | type: string | ||||
93 | - name: anchor-name | ||||
94 | in: query | ||||
95 | description: anchor-name | ||||
96 | required: true | ||||
97 | schema: | ||||
98 | type: string | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 99 | responses: |
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 100 | 201: |
101 | description: Created | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 102 | content: |
103 | application/json: | ||||
104 | schema: | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 105 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 106 | 401: |
107 | description: Unauthorized | ||||
108 | content: {} | ||||
109 | 403: | ||||
110 | description: Forbidden | ||||
111 | content: {} | ||||
112 | 404: | ||||
113 | description: Not Found | ||||
114 | content: {} | ||||
115 | /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}: | ||||
116 | get: | ||||
117 | tags: | ||||
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 118 | - cps-admin |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 119 | summary: Read an anchor given a anchor and a dataspace |
120 | operationId: getAnchor | ||||
121 | parameters: | ||||
122 | - name: dataspace-name | ||||
123 | in: path | ||||
124 | description: dataspace-name | ||||
125 | required: true | ||||
126 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 127 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 128 | - name: anchor-name |
129 | in: path | ||||
130 | description: anchor-name | ||||
131 | required: true | ||||
132 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 133 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 134 | responses: |
135 | 200: | ||||
136 | description: OK | ||||
137 | content: | ||||
138 | application/json: | ||||
139 | schema: | ||||
140 | type: object | ||||
141 | 401: | ||||
142 | description: Unauthorized | ||||
143 | content: {} | ||||
144 | 403: | ||||
145 | description: Forbidden | ||||
146 | content: {} | ||||
147 | 404: | ||||
148 | description: Not Found | ||||
149 | content: {} | ||||
150 | delete: | ||||
151 | tags: | ||||
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 152 | - cps-admin |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 153 | summary: Delete an anchor given a anchor and a dataspace |
154 | operationId: deleteAnchor | ||||
155 | parameters: | ||||
156 | - name: dataspace-name | ||||
157 | in: path | ||||
158 | description: dataspace-name | ||||
159 | required: true | ||||
160 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 161 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 162 | - name: anchor-name |
163 | in: path | ||||
164 | description: anchor-name | ||||
165 | required: true | ||||
166 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 167 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 168 | responses: |
169 | 200: | ||||
170 | description: OK | ||||
171 | content: | ||||
172 | application/json: | ||||
173 | schema: | ||||
174 | type: object | ||||
175 | 204: | ||||
176 | description: No Content | ||||
177 | content: {} | ||||
178 | 401: | ||||
179 | description: Unauthorized | ||||
180 | content: {} | ||||
181 | 403: | ||||
182 | description: Forbidden | ||||
183 | content: {} | ||||
184 | /v1/dataspaces/{dataspace-name}/anchors/{anchor-name}/nodes: | ||||
185 | get: | ||||
186 | tags: | ||||
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 187 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 188 | summary: Get a node given an anchor for the given dataspace |
189 | operationId: getNodeByDataspaceAndAnchor | ||||
190 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 191 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 192 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 193 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 194 | required: true |
195 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 196 | type: string |
197 | - name: anchor-name | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 198 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 199 | description: anchor-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 200 | required: true |
201 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 202 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 203 | responses: |
204 | 200: | ||||
205 | description: OK | ||||
206 | content: | ||||
207 | application/json: | ||||
208 | schema: | ||||
209 | type: object | ||||
210 | 401: | ||||
211 | description: Unauthorized | ||||
212 | content: {} | ||||
213 | 403: | ||||
214 | description: Forbidden | ||||
215 | content: {} | ||||
216 | 404: | ||||
217 | description: Not Found | ||||
218 | content: {} | ||||
219 | x-codegen-request-body-name: xpath | ||||
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 220 | /v1/dataspaces/{dataspace-name}/nodes: |
221 | get: | ||||
222 | tags: | ||||
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 223 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 224 | summary: Get all nodes for a given dataspace using an xpath or schema node identifier |
225 | operationId: getNode | ||||
226 | parameters: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 227 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 228 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 229 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 230 | required: true |
231 | schema: | ||||
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 232 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 233 | responses: |
234 | 200: | ||||
235 | description: OK | ||||
236 | content: | ||||
237 | application/json: | ||||
238 | schema: | ||||
239 | type: object | ||||
240 | 401: | ||||
241 | description: Unauthorized | ||||
242 | content: {} | ||||
243 | 403: | ||||
244 | description: Forbidden | ||||
245 | content: {} | ||||
246 | 404: | ||||
247 | description: Not Found | ||||
248 | content: {} | ||||
249 | x-codegen-request-body-name: requestBody | ||||
250 | post: | ||||
251 | tags: | ||||
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 252 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 253 | summary: Create a node for a given anchor for the given dataspace |
254 | operationId: createNode | ||||
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: {} | ||||
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 293 | components: |
Ruslan Kashapov | 828136e | 2020-11-30 09:45:09 +0200 | [diff] [blame] | 294 | schemas: |
295 | ErrorMessage: | ||||
296 | type: object | ||||
297 | title: Error | ||||
298 | properties: | ||||
299 | status: | ||||
300 | type: string | ||||
301 | message: | ||||
302 | type: string | ||||
303 | details: | ||||
304 | type: string |