blob: 587a37606ce5e7c56eb58b3b3c0dd951c5c5eb63 [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: {}
41 /v1/dataspaces/{dataspace-name}/anchors:
42 get:
43 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +000044 - cps-admin
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.aditya84ac94d2020-12-16 16:51:08 +000077 - cps-admin
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
Ruslan Kashapov8a1e3c92020-11-24 11:13:43 +020087 - 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
niamhcoref7ba3592020-10-19 12:48:06 +010099 responses:
Rishi.Chail48830f12020-11-09 03:28:44 +0000100 201:
101 description: Created
niamhcoref7ba3592020-10-19 12:48:06 +0100102 content:
103 application/json:
104 schema:
Rishi.Chail48830f12020-11-09 03:28:44 +0000105 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100106 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.aditya84ac94d2020-12-16 16:51:08 +0000118 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +0100119 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000127 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100128 - name: anchor-name
129 in: path
130 description: anchor-name
131 required: true
132 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000133 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100134 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.aditya84ac94d2020-12-16 16:51:08 +0000152 - cps-admin
niamhcoref7ba3592020-10-19 12:48:06 +0100153 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000161 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100162 - name: anchor-name
163 in: path
164 description: anchor-name
165 required: true
166 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000167 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100168 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.aditya84ac94d2020-12-16 16:51:08 +0000187 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100188 summary: Get a node given an anchor for the given dataspace
189 operationId: getNodeByDataspaceAndAnchor
190 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000191 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100192 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000193 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100194 required: true
195 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000196 type: string
197 - name: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100198 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000199 description: anchor-name
niamhcoref7ba3592020-10-19 12:48:06 +0100200 required: true
201 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000202 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100203 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
niamhcoref7ba3592020-10-19 12:48:06 +0100220 /v1/dataspaces/{dataspace-name}/nodes:
221 get:
222 tags:
puthuparambil.aditya84ac94d2020-12-16 16:51:08 +0000223 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100224 summary: Get all nodes for a given dataspace using an xpath or schema node identifier
225 operationId: getNode
226 parameters:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000227 - name: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100228 in: path
niamhcoreb4cd52f2020-10-27 15:49:30 +0000229 description: dataspace-name
niamhcoref7ba3592020-10-19 12:48:06 +0100230 required: true
231 schema:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000232 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100233 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.aditya84ac94d2020-12-16 16:51:08 +0000252 - cps-data
niamhcoref7ba3592020-10-19 12:48:06 +0100253 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:
niamhcoreb4cd52f2020-10-27 15:49:30 +0000261 type: string
niamhcoref7ba3592020-10-19 12:48:06 +0100262 requestBody:
263 content:
264 multipart/form-data:
265 schema:
266 required:
267 - file
268 properties:
puthuparambil.aditya47598112020-11-02 11:31:39 +0000269 multipartFile:
niamhcoref7ba3592020-10-19 12:48:06 +0100270 type: string
puthuparambil.aditya47598112020-11-02 11:31:39 +0000271 description: multipartFile
niamhcoref7ba3592020-10-19 12:48:06 +0100272 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.Chail48830f12020-11-09 03:28:44 +0000293components:
Ruslan Kashapov828136e2020-11-30 09:45:09 +0200294 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