blob: e887ef2c07ab5e69abe1c7549da77b9436796555 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Bell Canada.
JosephKeenan909a8502022-01-28 10:02:24 +00003# Modifications Copyright (C) 2021-2022 Nordix Foundation
rajesh.kumarcec0cb72022-09-06 11:47:18 +00004# Modifications Copyright (C) 2022 TechMahindra Ltd.
shivasubedi8df61a92021-06-16 14:43:18 +01005# ================================================================================
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 Kumari4d520012021-08-30 11:50:43 -040017#
18# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010019# ============LICENSE_END=========================================================
20
Rishi.Chaildacc6632021-01-27 04:27:34 +000021dataspaces:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000022 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000023 description: Create a new dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000024 tags:
25 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000026 summary: Create a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000027 operationId: createDataspace
28 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000029 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000030 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000031 '201':
32 $ref: 'components.yml#/components/responses/Created'
DylanB95EST1839f382022-03-08 17:26:34 +000033 '400':
34 $ref: 'components.yml#/components/responses/BadRequest'
Rishi.Chail6d13f162021-01-26 05:58:39 +000035 '401':
36 $ref: 'components.yml#/components/responses/Unauthorized'
37 '403':
38 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000039 '409':
40 $ref: 'components.yml#/components/responses/Conflict'
41 '500':
42 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000043 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'
JosephKeenan909a8502022-01-28 10:02:24 +000062 '500':
63 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000064
puthuparambil.aditya001e7732021-01-13 12:06:20 +000065schemaSet:
66 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000067 description: Create a new schema set in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000068 tags:
69 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000070 summary: Create a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000071 operationId: createSchemaSet
72 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000073 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
74 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000075 requestBody:
76 required: true
77 content:
78 multipart/form-data:
79 schema:
Rishi.Chail6d13f162021-01-26 05:58:39 +000080 $ref: 'components.yml#/components/schemas/MultipartFile'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000081 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000082 '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'
JosephKeenan909a8502022-01-28 10:02:24 +000090 '409':
91 $ref: 'components.yml#/components/responses/Conflict'
92 '500':
93 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000094
95schemaSetBySchemaSetName:
96 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000097 description: Read a schema set given a schema set name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000098 tags:
99 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000100 summary: Get a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000101 operationId: getSchemaSet
102 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000103 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
104 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000105 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000106 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100107 description: OK
108 content:
109 application/json:
110 schema:
111 $ref: 'components.yml#/components/schemas/SchemaSetDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000112 '400':
113 $ref: 'components.yml#/components/responses/BadRequest'
114 '401':
115 $ref: 'components.yml#/components/responses/Unauthorized'
116 '403':
117 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000118 '500':
119 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200120 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000121 description: Delete a schema set given a schema set name and a dataspace
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200122 tags:
123 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000124 summary: Delete a schema set
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200125 operationId: deleteSchemaSet
126 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000127 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
128 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200129 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000130 '204':
131 $ref: 'components.yml#/components/responses/NoContent'
132 '400':
133 $ref: 'components.yml#/components/responses/BadRequest'
134 '401':
135 $ref: 'components.yml#/components/responses/Unauthorized'
136 '403':
137 $ref: 'components.yml#/components/responses/Forbidden'
138 '409':
139 $ref: 'components.yml#/components/responses/Conflict'
JosephKeenan909a8502022-01-28 10:02:24 +0000140 '500':
141 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000142
143anchorsByDataspace:
144 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000145 description: Read all anchors, given a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000146 tags:
147 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000148 summary: Get anchors
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000149 operationId: getAnchors
150 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000151 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000152 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000153 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100154 description: OK
155 content:
156 application/json:
157 schema:
158 type: array
159 items:
160 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000161 '400':
162 $ref: 'components.yml#/components/responses/BadRequest'
163 '401':
164 $ref: 'components.yml#/components/responses/Unauthorized'
165 '403':
166 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000167 '500':
168 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000169 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000170 description: Create a new anchor in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000171 tags:
172 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000173 summary: Create an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000174 operationId: createAnchor
175 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000176 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
177 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
178 - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000179 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000180 '201':
181 $ref: 'components.yml#/components/responses/Created'
182 '400':
183 $ref: 'components.yml#/components/responses/BadRequest'
184 '401':
185 $ref: 'components.yml#/components/responses/Unauthorized'
186 '403':
187 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000188 '409':
189 $ref: 'components.yml#/components/responses/Conflict'
190 '500':
191 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000192
193anchorByDataspaceAndAnchorName:
194 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000195 description: Read an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000196 tags:
197 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000198 summary: Get an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000199 operationId: getAnchor
200 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000201 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
202 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000203 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000204 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100205 description: OK
206 content:
207 application/json:
208 schema:
209 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000210 '400':
211 $ref: 'components.yml#/components/responses/BadRequest'
212 '401':
213 $ref: 'components.yml#/components/responses/Unauthorized'
214 '403':
215 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000216 '500':
217 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000218 delete:
Ruslan Kashapovb20858b2021-04-05 14:46:03 +0300219 description: Delete an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000220 tags:
221 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000222 summary: Delete an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000223 operationId: deleteAnchor
224 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000225 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
226 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000227 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000228 '204':
229 $ref: 'components.yml#/components/responses/NoContent'
230 '400':
231 $ref: 'components.yml#/components/responses/BadRequest'
232 '401':
233 $ref: 'components.yml#/components/responses/Unauthorized'
234 '403':
JosephKeenan909a8502022-01-28 10:02:24 +0000235 $ref: 'components.yml#/components/responses/Forbidden'
236 '500':
rajesh.kumarcec0cb72022-09-06 11:47:18 +0000237 $ref: 'components.yml#/components/responses/InternalServerError'
238
239adminDataspaces:
240 get:
241 description: Read all dataspaces
242 tags:
243 - cps-admin
244 summary: Get all dataspaces
245 operationId: getAllDataspaces
246 responses:
247 '200':
248 description: OK
249 content:
250 application/json:
251 schema:
252 type: array
253 items:
254 $ref: 'components.yml#/components/schemas/DataspaceDetails'
255 '400':
256 $ref: 'components.yml#/components/responses/BadRequest'
257 '401':
258 $ref: 'components.yml#/components/responses/Unauthorized'
259 '403':
260 $ref: 'components.yml#/components/responses/Forbidden'
261 '500':
262 $ref: 'components.yml#/components/responses/InternalServerError'
263
264adminDataspace:
265 get:
266 description: Read a dataspace given a dataspace name
267 tags:
268 - cps-admin
269 summary: Get a dataspace
270 operationId: getDataspace
271 parameters:
272 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
273 responses:
274 '200':
275 description: OK
276 content:
277 application/json:
278 schema:
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'