blob: 35b2e4ca6a441fa2ca54c4e28b7860d036f76e06 [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.
15# ============LICENSE_END=========================================================
16
Rishi.Chaildacc6632021-01-27 04:27:34 +000017dataspaces:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000018 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000019 description: Create a new dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000020 tags:
21 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000022 summary: Create a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000023 operationId: createDataspace
24 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000025 - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000026 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000027 '201':
28 $ref: 'components.yml#/components/responses/Created'
29 '400':
30 $ref: 'components.yml#/components/responses/BadRequest'
31 '401':
32 $ref: 'components.yml#/components/responses/Unauthorized'
33 '403':
34 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000035
36dataspaceByDataspaceName:
37 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +000038 description: Delete the given dataspace - DRAFT
puthuparambil.aditya001e7732021-01-13 12:06:20 +000039 tags:
40 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000041 summary: Delete a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000042 operationId: deleteDataspace
43 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000044 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000045 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000046 '200':
47 $ref: 'components.yml#/components/responses/Ok'
48 '204':
49 $ref: 'components.yml#/components/responses/NoContent'
50 '400':
51 $ref: 'components.yml#/components/responses/BadRequest'
52 '401':
53 $ref: 'components.yml#/components/responses/Unauthorized'
54 '403':
55 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000056
57
58schemaSet:
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'