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: {} |
Ruslan Kashapov | acfb207 | 2020-12-10 10:49:59 +0200 | [diff] [blame^] | 41 | /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: { } |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 82 | /v1/dataspaces/{dataspace-name}/anchors: |
| 83 | get: |
| 84 | tags: |
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 85 | - cps-admin |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 86 | 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: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 94 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 95 | responses: |
| 96 | 200: |
| 97 | description: OK |
| 98 | content: |
| 99 | application/json: |
| 100 | schema: |
| 101 | type: object |
| 102 | 401: |
| 103 | description: Unauthorized |
| 104 | content: {} |
puthuparambil.aditya | e182a6b | 2020-12-10 16:49:53 +0000 | [diff] [blame] | 105 | 400: |
| 106 | description: Bad Request |
| 107 | content: {} |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 108 | 403: |
| 109 | description: Forbidden |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 110 | 404: |
| 111 | description: Not Found |
| 112 | content: {} |
puthuparambil.aditya | e182a6b | 2020-12-10 16:49:53 +0000 | [diff] [blame] | 113 | 204: |
| 114 | description: No Content |
| 115 | content: {} |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 116 | post: |
| 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: 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: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 127 | type: string |
Ruslan Kashapov | 8a1e3c9 | 2020-11-24 11:13:43 +0200 | [diff] [blame] | 128 | - 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 |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 140 | responses: |
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 141 | 201: |
| 142 | description: Created |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 143 | content: |
| 144 | application/json: |
| 145 | schema: |
Rishi.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 146 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 147 | 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.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 159 | - cps-admin |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 160 | 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: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 168 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 169 | - name: anchor-name |
| 170 | in: path |
| 171 | description: anchor-name |
| 172 | required: true |
| 173 | schema: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 174 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 175 | 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.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 193 | - cps-admin |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 194 | 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: |
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 | - name: anchor-name |
| 204 | in: path |
| 205 | description: anchor-name |
| 206 | required: true |
| 207 | schema: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 208 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 209 | 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.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 228 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 229 | summary: Get a node given an anchor for the given dataspace |
| 230 | operationId: getNodeByDataspaceAndAnchor |
| 231 | parameters: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 232 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 233 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 234 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 235 | required: true |
| 236 | schema: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 237 | type: string |
| 238 | - name: anchor-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 239 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 240 | description: anchor-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 241 | required: true |
| 242 | schema: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 243 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 244 | 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 |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 261 | /v1/dataspaces/{dataspace-name}/nodes: |
| 262 | get: |
| 263 | tags: |
puthuparambil.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 264 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 265 | summary: Get all nodes for a given dataspace using an xpath or schema node identifier |
| 266 | operationId: getNode |
| 267 | parameters: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 268 | - name: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 269 | in: path |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 270 | description: dataspace-name |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 271 | required: true |
| 272 | schema: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 273 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 274 | 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.aditya | 84ac94d | 2020-12-16 16:51:08 +0000 | [diff] [blame] | 293 | - cps-data |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 294 | 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: |
niamhcore | b4cd52f | 2020-10-27 15:49:30 +0000 | [diff] [blame] | 302 | type: string |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 303 | requestBody: |
| 304 | content: |
| 305 | multipart/form-data: |
| 306 | schema: |
| 307 | required: |
| 308 | - file |
| 309 | properties: |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 310 | multipartFile: |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 311 | type: string |
puthuparambil.aditya | 4759811 | 2020-11-02 11:31:39 +0000 | [diff] [blame] | 312 | description: multipartFile |
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 313 | 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.Chail | 48830f1 | 2020-11-09 03:28:44 +0000 | [diff] [blame] | 334 | components: |
Ruslan Kashapov | 828136e | 2020-11-30 09:45:09 +0200 | [diff] [blame] | 335 | 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 |