blob: 5852c0cf1688b99377311b550b3b5b08aaec345d [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'
DylanB95EST1839f382022-03-08 17:26:34 +000032 '400':
33 $ref: 'components.yml#/components/responses/BadRequest'
Rishi.Chail6d13f162021-01-26 05:58:39 +000034 '401':
35 $ref: 'components.yml#/components/responses/Unauthorized'
36 '403':
37 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000038 '409':
39 $ref: 'components.yml#/components/responses/Conflict'
40 '500':
41 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000042 delete:
43 description: Delete a dataspace
44 tags:
45 - cps-admin
46 summary: Delete a dataspace
47 operationId: deleteDataspace
48 parameters:
49 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
50 responses:
51 '204':
52 $ref: 'components.yml#/components/responses/NoContent'
53 '400':
54 $ref: 'components.yml#/components/responses/BadRequest'
55 '401':
56 $ref: 'components.yml#/components/responses/Unauthorized'
57 '403':
58 $ref: 'components.yml#/components/responses/Forbidden'
59 '409':
60 $ref: 'components.yml#/components/responses/Conflict'
JosephKeenan909a8502022-01-28 10:02:24 +000061 '500':
62 $ref: 'components.yml#/components/responses/InternalServerError'
niamhcore09c6b6e2021-11-22 11:44:38 +000063
puthuparambil.aditya001e7732021-01-13 12:06:20 +000064schemaSet:
65 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000066 description: Create a new schema set in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000067 tags:
68 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000069 summary: Create a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000070 operationId: createSchemaSet
71 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000072 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
73 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000074 requestBody:
75 required: true
76 content:
77 multipart/form-data:
78 schema:
Rishi.Chail6d13f162021-01-26 05:58:39 +000079 $ref: 'components.yml#/components/schemas/MultipartFile'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000080 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000081 '201':
82 $ref: 'components.yml#/components/responses/Created'
83 '400':
84 $ref: 'components.yml#/components/responses/BadRequest'
85 '401':
86 $ref: 'components.yml#/components/responses/Unauthorized'
87 '403':
88 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000089 '409':
90 $ref: 'components.yml#/components/responses/Conflict'
91 '500':
92 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000093
94schemaSetBySchemaSetName:
95 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000096 description: Read a schema set given a schema set name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000097 tags:
98 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000099 summary: Get a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000100 operationId: getSchemaSet
101 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000102 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
103 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000104 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000105 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100106 description: OK
107 content:
108 application/json:
109 schema:
110 $ref: 'components.yml#/components/schemas/SchemaSetDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000111 '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'
JosephKeenan909a8502022-01-28 10:02:24 +0000117 '500':
118 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200119 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000120 description: Delete a schema set given a schema set name and a dataspace
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200121 tags:
122 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000123 summary: Delete a schema set
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200124 operationId: deleteSchemaSet
125 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000126 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
127 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200128 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000129 '204':
130 $ref: 'components.yml#/components/responses/NoContent'
131 '400':
132 $ref: 'components.yml#/components/responses/BadRequest'
133 '401':
134 $ref: 'components.yml#/components/responses/Unauthorized'
135 '403':
136 $ref: 'components.yml#/components/responses/Forbidden'
137 '409':
138 $ref: 'components.yml#/components/responses/Conflict'
JosephKeenan909a8502022-01-28 10:02:24 +0000139 '500':
140 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000141
142anchorsByDataspace:
143 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000144 description: Read all anchors, given a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000145 tags:
146 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000147 summary: Get anchors
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000148 operationId: getAnchors
149 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000150 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000151 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000152 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100153 description: OK
154 content:
155 application/json:
156 schema:
157 type: array
158 items:
159 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000160 '400':
161 $ref: 'components.yml#/components/responses/BadRequest'
162 '401':
163 $ref: 'components.yml#/components/responses/Unauthorized'
164 '403':
165 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000166 '500':
167 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000168 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000169 description: Create a new anchor in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000170 tags:
171 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000172 summary: Create an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000173 operationId: createAnchor
174 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000175 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
176 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
177 - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000178 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000179 '201':
180 $ref: 'components.yml#/components/responses/Created'
181 '400':
182 $ref: 'components.yml#/components/responses/BadRequest'
183 '401':
184 $ref: 'components.yml#/components/responses/Unauthorized'
185 '403':
186 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000187 '409':
188 $ref: 'components.yml#/components/responses/Conflict'
189 '500':
190 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000191
192anchorByDataspaceAndAnchorName:
193 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000194 description: Read an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000195 tags:
196 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000197 summary: Get an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000198 operationId: getAnchor
199 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000200 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
201 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000202 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000203 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100204 description: OK
205 content:
206 application/json:
207 schema:
208 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000209 '400':
210 $ref: 'components.yml#/components/responses/BadRequest'
211 '401':
212 $ref: 'components.yml#/components/responses/Unauthorized'
213 '403':
214 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000215 '500':
216 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000217 delete:
Ruslan Kashapovb20858b2021-04-05 14:46:03 +0300218 description: Delete an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000219 tags:
220 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000221 summary: Delete an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000222 operationId: deleteAnchor
223 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000224 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
225 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000226 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000227 '204':
228 $ref: 'components.yml#/components/responses/NoContent'
229 '400':
230 $ref: 'components.yml#/components/responses/BadRequest'
231 '401':
232 $ref: 'components.yml#/components/responses/Unauthorized'
233 '403':
JosephKeenan909a8502022-01-28 10:02:24 +0000234 $ref: 'components.yml#/components/responses/Forbidden'
235 '500':
236 $ref: 'components.yml#/components/responses/InternalServerError'