shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (c) 2021 Bell Canada. |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 3 | # Modifications Copyright (C) 2021-2022 Nordix Foundation |
rajesh.kumar | cec0cb7 | 2022-09-06 11:47:18 +0000 | [diff] [blame] | 4 | # Modifications Copyright (C) 2022 TechMahindra Ltd. |
shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
Renu Kumari | 4d52001 | 2021-08-30 11:50:43 -0400 | [diff] [blame] | 17 | # |
| 18 | # SPDX-License-Identifier: Apache-2.0 |
shivasubedi | 8df61a9 | 2021-06-16 14:43:18 +0100 | [diff] [blame] | 19 | # ============LICENSE_END========================================================= |
| 20 | |
Rishi.Chail | dacc663 | 2021-01-27 04:27:34 +0000 | [diff] [blame] | 21 | dataspaces: |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 22 | post: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 23 | description: Create a new dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 24 | tags: |
| 25 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 26 | summary: Create a dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 27 | operationId: createDataspace |
| 28 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 29 | - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 30 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 31 | '201': |
| 32 | $ref: 'components.yml#/components/responses/Created' |
DylanB95EST | 1839f38 | 2022-03-08 17:26:34 +0000 | [diff] [blame] | 33 | '400': |
| 34 | $ref: 'components.yml#/components/responses/BadRequest' |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 35 | '401': |
| 36 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 37 | '403': |
| 38 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 39 | '409': |
| 40 | $ref: 'components.yml#/components/responses/Conflict' |
| 41 | '500': |
| 42 | $ref: 'components.yml#/components/responses/InternalServerError' |
niamhcore | 09c6b6e | 2021-11-22 11:44:38 +0000 | [diff] [blame] | 43 | delete: |
| 44 | description: Delete a dataspace |
| 45 | tags: |
| 46 | - cps-admin |
| 47 | summary: Delete a dataspace |
| 48 | operationId: deleteDataspace |
| 49 | parameters: |
| 50 | - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery' |
| 51 | responses: |
| 52 | '204': |
| 53 | $ref: 'components.yml#/components/responses/NoContent' |
| 54 | '400': |
| 55 | $ref: 'components.yml#/components/responses/BadRequest' |
| 56 | '401': |
| 57 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 58 | '403': |
| 59 | $ref: 'components.yml#/components/responses/Forbidden' |
| 60 | '409': |
| 61 | $ref: 'components.yml#/components/responses/Conflict' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 62 | '500': |
| 63 | $ref: 'components.yml#/components/responses/InternalServerError' |
niamhcore | 09c6b6e | 2021-11-22 11:44:38 +0000 | [diff] [blame] | 64 | |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 65 | schemaSet: |
| 66 | post: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 67 | description: Create a new schema set in the given dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 68 | tags: |
| 69 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 70 | summary: Create a schema set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 71 | operationId: createSchemaSet |
| 72 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 73 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 74 | - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 75 | requestBody: |
| 76 | required: true |
| 77 | content: |
| 78 | multipart/form-data: |
| 79 | schema: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 80 | $ref: 'components.yml#/components/schemas/MultipartFile' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 81 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 82 | '201': |
| 83 | $ref: 'components.yml#/components/responses/Created' |
| 84 | '400': |
| 85 | $ref: 'components.yml#/components/responses/BadRequest' |
| 86 | '401': |
| 87 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 88 | '403': |
| 89 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 90 | '409': |
| 91 | $ref: 'components.yml#/components/responses/Conflict' |
| 92 | '500': |
| 93 | $ref: 'components.yml#/components/responses/InternalServerError' |
rajesh.kumar | 71e4f83 | 2022-09-14 05:11:32 +0000 | [diff] [blame] | 94 | get: |
| 95 | description: Read all schema sets, given a dataspace |
| 96 | tags: |
| 97 | - cps-admin |
| 98 | summary: Get schema sets |
| 99 | operationId: getSchemaSets |
| 100 | parameters: |
| 101 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 102 | responses: |
| 103 | '200': |
| 104 | description: OK |
| 105 | content: |
| 106 | application/json: |
| 107 | schema: |
| 108 | type: array |
| 109 | items: |
| 110 | $ref: 'components.yml#/components/schemas/SchemaSetDetails' |
| 111 | '400': |
| 112 | $ref: 'components.yml#/components/responses/BadRequest' |
| 113 | '401': |
| 114 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 115 | '403': |
| 116 | $ref: 'components.yml#/components/responses/Forbidden' |
| 117 | '500': |
| 118 | $ref: 'components.yml#/components/responses/InternalServerError' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 119 | |
| 120 | schemaSetBySchemaSetName: |
| 121 | get: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 122 | description: Read a schema set given a schema set name and a dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 123 | tags: |
| 124 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 125 | summary: Get a schema set |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 126 | operationId: getSchemaSet |
| 127 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 128 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 129 | - $ref: 'components.yml#/components/parameters/schemaSetNameInPath' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 130 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 131 | '200': |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 132 | description: OK |
| 133 | content: |
| 134 | application/json: |
| 135 | schema: |
| 136 | $ref: 'components.yml#/components/schemas/SchemaSetDetails' |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 137 | '400': |
| 138 | $ref: 'components.yml#/components/responses/BadRequest' |
| 139 | '401': |
| 140 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 141 | '403': |
| 142 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 143 | '500': |
| 144 | $ref: 'components.yml#/components/responses/InternalServerError' |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 145 | delete: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 146 | description: Delete a schema set given a schema set name and a dataspace |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 147 | tags: |
| 148 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 149 | summary: Delete a schema set |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 150 | operationId: deleteSchemaSet |
| 151 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 152 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 153 | - $ref: 'components.yml#/components/parameters/schemaSetNameInPath' |
Ruslan Kashapov | dce4e31 | 2021-01-11 15:34:10 +0200 | [diff] [blame] | 154 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 155 | '204': |
| 156 | $ref: 'components.yml#/components/responses/NoContent' |
| 157 | '400': |
| 158 | $ref: 'components.yml#/components/responses/BadRequest' |
| 159 | '401': |
| 160 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 161 | '403': |
| 162 | $ref: 'components.yml#/components/responses/Forbidden' |
| 163 | '409': |
| 164 | $ref: 'components.yml#/components/responses/Conflict' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 165 | '500': |
| 166 | $ref: 'components.yml#/components/responses/InternalServerError' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 167 | |
| 168 | anchorsByDataspace: |
| 169 | get: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 170 | description: Read all anchors, given a dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 171 | tags: |
| 172 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 173 | summary: Get anchors |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 174 | operationId: getAnchors |
| 175 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 176 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 177 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 178 | '200': |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 179 | description: OK |
| 180 | content: |
| 181 | application/json: |
| 182 | schema: |
| 183 | type: array |
| 184 | items: |
| 185 | $ref: 'components.yml#/components/schemas/AnchorDetails' |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 186 | '400': |
| 187 | $ref: 'components.yml#/components/responses/BadRequest' |
| 188 | '401': |
| 189 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 190 | '403': |
| 191 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 192 | '500': |
| 193 | $ref: 'components.yml#/components/responses/InternalServerError' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 194 | post: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 195 | description: Create a new anchor in the given dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 196 | tags: |
| 197 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 198 | summary: Create an anchor |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 199 | operationId: createAnchor |
| 200 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 201 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 202 | - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery' |
| 203 | - $ref: 'components.yml#/components/parameters/anchorNameInQuery' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 204 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 205 | '201': |
| 206 | $ref: 'components.yml#/components/responses/Created' |
| 207 | '400': |
| 208 | $ref: 'components.yml#/components/responses/BadRequest' |
| 209 | '401': |
| 210 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 211 | '403': |
| 212 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 213 | '409': |
| 214 | $ref: 'components.yml#/components/responses/Conflict' |
| 215 | '500': |
| 216 | $ref: 'components.yml#/components/responses/InternalServerError' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 217 | |
| 218 | anchorByDataspaceAndAnchorName: |
| 219 | get: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 220 | description: Read an anchor given an anchor name and a dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 221 | tags: |
| 222 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 223 | summary: Get an anchor |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 224 | operationId: getAnchor |
| 225 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 226 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 227 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 228 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 229 | '200': |
JosephKeenan | c6865f3 | 2021-06-08 13:16:37 +0100 | [diff] [blame] | 230 | description: OK |
| 231 | content: |
| 232 | application/json: |
| 233 | schema: |
| 234 | $ref: 'components.yml#/components/schemas/AnchorDetails' |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 235 | '400': |
| 236 | $ref: 'components.yml#/components/responses/BadRequest' |
| 237 | '401': |
| 238 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 239 | '403': |
| 240 | $ref: 'components.yml#/components/responses/Forbidden' |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 241 | '500': |
| 242 | $ref: 'components.yml#/components/responses/InternalServerError' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 243 | delete: |
Ruslan Kashapov | b20858b | 2021-04-05 14:46:03 +0300 | [diff] [blame] | 244 | description: Delete an anchor given an anchor name and a dataspace |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 245 | tags: |
| 246 | - cps-admin |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 247 | summary: Delete an anchor |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 248 | operationId: deleteAnchor |
| 249 | parameters: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 250 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 251 | - $ref: 'components.yml#/components/parameters/anchorNameInPath' |
puthuparambil.aditya | 001e773 | 2021-01-13 12:06:20 +0000 | [diff] [blame] | 252 | responses: |
Rishi.Chail | 6d13f16 | 2021-01-26 05:58:39 +0000 | [diff] [blame] | 253 | '204': |
| 254 | $ref: 'components.yml#/components/responses/NoContent' |
| 255 | '400': |
| 256 | $ref: 'components.yml#/components/responses/BadRequest' |
| 257 | '401': |
| 258 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 259 | '403': |
JosephKeenan | 909a850 | 2022-01-28 10:02:24 +0000 | [diff] [blame] | 260 | $ref: 'components.yml#/components/responses/Forbidden' |
| 261 | '500': |
rajesh.kumar | cec0cb7 | 2022-09-06 11:47:18 +0000 | [diff] [blame] | 262 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 263 | |
| 264 | adminDataspaces: |
| 265 | get: |
| 266 | description: Read all dataspaces |
| 267 | tags: |
| 268 | - cps-admin |
| 269 | summary: Get all dataspaces |
| 270 | operationId: getAllDataspaces |
| 271 | responses: |
| 272 | '200': |
| 273 | description: OK |
| 274 | content: |
| 275 | application/json: |
| 276 | schema: |
| 277 | type: array |
| 278 | items: |
| 279 | $ref: 'components.yml#/components/schemas/DataspaceDetails' |
| 280 | '400': |
| 281 | $ref: 'components.yml#/components/responses/BadRequest' |
| 282 | '401': |
| 283 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 284 | '403': |
| 285 | $ref: 'components.yml#/components/responses/Forbidden' |
| 286 | '500': |
| 287 | $ref: 'components.yml#/components/responses/InternalServerError' |
| 288 | |
| 289 | adminDataspace: |
| 290 | get: |
| 291 | description: Read a dataspace given a dataspace name |
| 292 | tags: |
| 293 | - cps-admin |
| 294 | summary: Get a dataspace |
| 295 | operationId: getDataspace |
| 296 | parameters: |
| 297 | - $ref: 'components.yml#/components/parameters/dataspaceNameInPath' |
| 298 | responses: |
| 299 | '200': |
| 300 | description: OK |
| 301 | content: |
| 302 | application/json: |
| 303 | schema: |
| 304 | $ref: 'components.yml#/components/schemas/DataspaceDetails' |
| 305 | '400': |
| 306 | $ref: 'components.yml#/components/responses/BadRequest' |
| 307 | '401': |
| 308 | $ref: 'components.yml#/components/responses/Unauthorized' |
| 309 | '403': |
| 310 | $ref: 'components.yml#/components/responses/Forbidden' |
| 311 | '500': |
| 312 | $ref: 'components.yml#/components/responses/InternalServerError' |