blob: a25f81eafc95e7cff4aa3f1031a1d379fa7d62e2 [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
shivasubedi8df61a92021-06-16 14:43:18 +01004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040016#
17# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010018# ============LICENSE_END=========================================================
19
Rishi.Chaildacc6632021-01-27 04:27:34 +000020dataspaces:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000021 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000022 description: Create a new dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000023 tags:
24 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000025 summary: Create a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000026 operationId: createDataspace
27 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000028 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000029 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000030 '201':
31 $ref: 'components.yml#/components/responses/Created'
Rishi.Chail6d13f162021-01-26 05:58:39 +000032 '401':
33 $ref: 'components.yml#/components/responses/Unauthorized'
34 '403':
35 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000036 '409':
37 $ref: 'components.yml#/components/responses/Conflict'
38 '500':
39 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000040 delete:
41 description: Delete a dataspace
42 tags:
43 - cps-admin
44 summary: Delete a dataspace
45 operationId: deleteDataspace
46 parameters:
47 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
48 responses:
49 '204':
50 $ref: 'components.yml#/components/responses/NoContent'
51 '400':
52 $ref: 'components.yml#/components/responses/BadRequest'
53 '401':
54 $ref: 'components.yml#/components/responses/Unauthorized'
55 '403':
56 $ref: 'components.yml#/components/responses/Forbidden'
57 '409':
58 $ref: 'components.yml#/components/responses/Conflict'
JosephKeenan909a8502022-01-28 10:02:24 +000059 '500':
60 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000061
puthuparambil.aditya001e7732021-01-13 12:06:20 +000062schemaSet:
63 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000064 description: Create a new schema set in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000065 tags:
66 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000067 summary: Create a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000068 operationId: createSchemaSet
69 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000070 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
71 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000072 requestBody:
73 required: true
74 content:
75 multipart/form-data:
76 schema:
Rishi.Chail6d13f162021-01-26 05:58:39 +000077 $ref: 'components.yml#/components/schemas/MultipartFile'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000078 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000079 '201':
80 $ref: 'components.yml#/components/responses/Created'
81 '400':
82 $ref: 'components.yml#/components/responses/BadRequest'
83 '401':
84 $ref: 'components.yml#/components/responses/Unauthorized'
85 '403':
86 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000087 '409':
88 $ref: 'components.yml#/components/responses/Conflict'
89 '500':
90 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000091
92schemaSetBySchemaSetName:
93 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000094 description: Read a schema set given a schema set name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000095 tags:
96 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000097 summary: Get a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000098 operationId: getSchemaSet
99 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000100 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
101 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000102 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000103 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100104 description: OK
105 content:
106 application/json:
107 schema:
108 $ref: 'components.yml#/components/schemas/SchemaSetDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000109 '400':
110 $ref: 'components.yml#/components/responses/BadRequest'
111 '401':
112 $ref: 'components.yml#/components/responses/Unauthorized'
113 '403':
114 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000115 '500':
116 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200117 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000118 description: Delete a schema set given a schema set name and a dataspace
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200119 tags:
120 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000121 summary: Delete a schema set
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200122 operationId: deleteSchemaSet
123 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000124 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
125 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200126 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000127 '204':
128 $ref: 'components.yml#/components/responses/NoContent'
129 '400':
130 $ref: 'components.yml#/components/responses/BadRequest'
131 '401':
132 $ref: 'components.yml#/components/responses/Unauthorized'
133 '403':
134 $ref: 'components.yml#/components/responses/Forbidden'
135 '409':
136 $ref: 'components.yml#/components/responses/Conflict'
JosephKeenan909a8502022-01-28 10:02:24 +0000137 '500':
138 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000139
140anchorsByDataspace:
141 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000142 description: Read all anchors, given a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000143 tags:
144 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000145 summary: Get anchors
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000146 operationId: getAnchors
147 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000148 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000149 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000150 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100151 description: OK
152 content:
153 application/json:
154 schema:
155 type: array
156 items:
157 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000158 '400':
159 $ref: 'components.yml#/components/responses/BadRequest'
160 '401':
161 $ref: 'components.yml#/components/responses/Unauthorized'
162 '403':
163 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000164 '500':
165 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000166 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000167 description: Create a new anchor in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000168 tags:
169 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000170 summary: Create an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000171 operationId: createAnchor
172 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000173 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
174 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
175 - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000176 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000177 '201':
178 $ref: 'components.yml#/components/responses/Created'
179 '400':
180 $ref: 'components.yml#/components/responses/BadRequest'
181 '401':
182 $ref: 'components.yml#/components/responses/Unauthorized'
183 '403':
184 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000185 '409':
186 $ref: 'components.yml#/components/responses/Conflict'
187 '500':
188 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000189
190anchorByDataspaceAndAnchorName:
191 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000192 description: Read an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000193 tags:
194 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000195 summary: Get an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000196 operationId: getAnchor
197 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000198 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
199 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000200 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000201 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100202 description: OK
203 content:
204 application/json:
205 schema:
206 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000207 '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'
JosephKeenan909a8502022-01-28 10:02:24 +0000213 '500':
214 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000215 delete:
Ruslan Kashapovb20858b2021-04-05 14:46:03 +0300216 description: Delete an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000217 tags:
218 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000219 summary: Delete an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000220 operationId: deleteAnchor
221 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000222 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
223 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000224 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000225 '204':
226 $ref: 'components.yml#/components/responses/NoContent'
227 '400':
228 $ref: 'components.yml#/components/responses/BadRequest'
229 '401':
230 $ref: 'components.yml#/components/responses/Unauthorized'
231 '403':
JosephKeenan909a8502022-01-28 10:02:24 +0000232 $ref: 'components.yml#/components/responses/Forbidden'
233 '500':
234 $ref: 'components.yml#/components/responses/InternalServerError'