blob: 869cb6e724b4191b43e40b6a2742c1e1712f4b23 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Bell Canada.
3# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040015#
16# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010017# ============LICENSE_END=========================================================
18
Rishi.Chaildacc6632021-01-27 04:27:34 +000019dataspaces:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000020 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000021 description: Create a new dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000022 tags:
23 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000024 summary: Create a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000025 operationId: createDataspace
26 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000027 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000028 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000029 '201':
30 $ref: 'components.yml#/components/responses/Created'
31 '400':
32 $ref: 'components.yml#/components/responses/BadRequest'
33 '401':
34 $ref: 'components.yml#/components/responses/Unauthorized'
35 '403':
36 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000037
niamhcore09c6b6e2021-11-22 11:44:38 +000038 delete:
39 description: Delete a dataspace
40 tags:
41 - cps-admin
42 summary: Delete a dataspace
43 operationId: deleteDataspace
44 parameters:
45 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
46 responses:
47 '204':
48 $ref: 'components.yml#/components/responses/NoContent'
49 '400':
50 $ref: 'components.yml#/components/responses/BadRequest'
51 '401':
52 $ref: 'components.yml#/components/responses/Unauthorized'
53 '403':
54 $ref: 'components.yml#/components/responses/Forbidden'
55 '409':
56 $ref: 'components.yml#/components/responses/Conflict'
57
puthuparambil.aditya001e7732021-01-13 12:06:20 +000058schemaSet:
59 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000060 description: Create a new schema set in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000061 tags:
62 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000063 summary: Create a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000064 operationId: createSchemaSet
65 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000066 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
67 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000068 requestBody:
69 required: true
70 content:
71 multipart/form-data:
72 schema:
Rishi.Chail6d13f162021-01-26 05:58:39 +000073 $ref: 'components.yml#/components/schemas/MultipartFile'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000074
75 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000076 '201':
77 $ref: 'components.yml#/components/responses/Created'
78 '400':
79 $ref: 'components.yml#/components/responses/BadRequest'
80 '401':
81 $ref: 'components.yml#/components/responses/Unauthorized'
82 '403':
83 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000084
85schemaSetBySchemaSetName:
86 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000087 description: Read a schema set given a schema set name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000088 tags:
89 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000090 summary: Get a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000091 operationId: getSchemaSet
92 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000093 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
94 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000095 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000096 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +010097 description: OK
98 content:
99 application/json:
100 schema:
101 $ref: 'components.yml#/components/schemas/SchemaSetDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000102 '400':
103 $ref: 'components.yml#/components/responses/BadRequest'
104 '401':
105 $ref: 'components.yml#/components/responses/Unauthorized'
106 '403':
107 $ref: 'components.yml#/components/responses/Forbidden'
108 '404':
109 $ref: 'components.yml#/components/responses/NotFound'
110
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200111 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000112 description: Delete a schema set given a schema set name and a dataspace
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200113 tags:
114 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000115 summary: Delete a schema set
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200116 operationId: deleteSchemaSet
117 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000118 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
119 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200120 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000121 '204':
122 $ref: 'components.yml#/components/responses/NoContent'
123 '400':
124 $ref: 'components.yml#/components/responses/BadRequest'
125 '401':
126 $ref: 'components.yml#/components/responses/Unauthorized'
127 '403':
128 $ref: 'components.yml#/components/responses/Forbidden'
129 '409':
130 $ref: 'components.yml#/components/responses/Conflict'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000131
132anchorsByDataspace:
133 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000134 description: Read all anchors, given a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000135 tags:
136 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000137 summary: Get anchors
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000138 operationId: getAnchors
139 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000140 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000141 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000142 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100143 description: OK
144 content:
145 application/json:
146 schema:
147 type: array
148 items:
149 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000150 '400':
151 $ref: 'components.yml#/components/responses/BadRequest'
152 '401':
153 $ref: 'components.yml#/components/responses/Unauthorized'
154 '403':
155 $ref: 'components.yml#/components/responses/Forbidden'
156 '404':
157 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000158
159 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000160 description: Create a new anchor in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000161 tags:
162 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000163 summary: Create an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000164 operationId: createAnchor
165 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000166 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
167 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
168 - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000169 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000170 '201':
171 $ref: 'components.yml#/components/responses/Created'
172 '400':
173 $ref: 'components.yml#/components/responses/BadRequest'
174 '401':
175 $ref: 'components.yml#/components/responses/Unauthorized'
176 '403':
177 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000178
179anchorByDataspaceAndAnchorName:
180 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000181 description: Read an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000182 tags:
183 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000184 summary: Get an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000185 operationId: getAnchor
186 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000187 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
188 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000189 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000190 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100191 description: OK
192 content:
193 application/json:
194 schema:
195 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000196 '400':
197 $ref: 'components.yml#/components/responses/BadRequest'
198 '401':
199 $ref: 'components.yml#/components/responses/Unauthorized'
200 '403':
201 $ref: 'components.yml#/components/responses/Forbidden'
202 '404':
203 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000204
205 delete:
Ruslan Kashapovb20858b2021-04-05 14:46:03 +0300206 description: Delete an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000207 tags:
208 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000209 summary: Delete an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000210 operationId: deleteAnchor
211 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000212 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
213 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000214 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000215 '204':
216 $ref: 'components.yml#/components/responses/NoContent'
217 '400':
218 $ref: 'components.yml#/components/responses/BadRequest'
219 '401':
220 $ref: 'components.yml#/components/responses/Unauthorized'
221 '403':
JosephKeenanc6865f32021-06-08 13:16:37 +0100222 $ref: 'components.yml#/components/responses/Forbidden'