blob: a022ef1d943c02e2955be6578944e10c3516f0ac [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
puthuparambil.aditya001e7732021-01-13 12:06:20 +000038schemaSet:
39 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000040 description: Create a new schema set in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000041 tags:
42 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000043 summary: Create a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000044 operationId: createSchemaSet
45 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000046 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
47 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000048 requestBody:
49 required: true
50 content:
51 multipart/form-data:
52 schema:
Rishi.Chail6d13f162021-01-26 05:58:39 +000053 $ref: 'components.yml#/components/schemas/MultipartFile'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000054
55 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000056 '201':
57 $ref: 'components.yml#/components/responses/Created'
58 '400':
59 $ref: 'components.yml#/components/responses/BadRequest'
60 '401':
61 $ref: 'components.yml#/components/responses/Unauthorized'
62 '403':
63 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000064
65schemaSetBySchemaSetName:
66 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000067 description: Read a schema set given a schema set name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000068 tags:
69 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000070 summary: Get a schema set
puthuparambil.aditya001e7732021-01-13 12:06:20 +000071 operationId: getSchemaSet
72 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000073 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
74 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000075 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000076 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +010077 description: OK
78 content:
79 application/json:
80 schema:
81 $ref: 'components.yml#/components/schemas/SchemaSetDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +000082 '400':
83 $ref: 'components.yml#/components/responses/BadRequest'
84 '401':
85 $ref: 'components.yml#/components/responses/Unauthorized'
86 '403':
87 $ref: 'components.yml#/components/responses/Forbidden'
88 '404':
89 $ref: 'components.yml#/components/responses/NotFound'
90
Ruslan Kashapovdce4e312021-01-11 15:34:10 +020091 delete:
Rishi.Chail6d13f162021-01-26 05:58:39 +000092 description: Delete a schema set given a schema set name and a dataspace
Ruslan Kashapovdce4e312021-01-11 15:34:10 +020093 tags:
94 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +000095 summary: Delete a schema set
Ruslan Kashapovdce4e312021-01-11 15:34:10 +020096 operationId: deleteSchemaSet
97 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000098 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
99 - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
Ruslan Kashapovdce4e312021-01-11 15:34:10 +0200100 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000101 '204':
102 $ref: 'components.yml#/components/responses/NoContent'
103 '400':
104 $ref: 'components.yml#/components/responses/BadRequest'
105 '401':
106 $ref: 'components.yml#/components/responses/Unauthorized'
107 '403':
108 $ref: 'components.yml#/components/responses/Forbidden'
109 '409':
110 $ref: 'components.yml#/components/responses/Conflict'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000111
112anchorsByDataspace:
113 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000114 description: Read all anchors, given a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000115 tags:
116 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000117 summary: Get anchors
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000118 operationId: getAnchors
119 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000120 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000121 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000122 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100123 description: OK
124 content:
125 application/json:
126 schema:
127 type: array
128 items:
129 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000130 '400':
131 $ref: 'components.yml#/components/responses/BadRequest'
132 '401':
133 $ref: 'components.yml#/components/responses/Unauthorized'
134 '403':
135 $ref: 'components.yml#/components/responses/Forbidden'
136 '404':
137 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000138
139 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000140 description: Create a new anchor in the given dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000141 tags:
142 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000143 summary: Create an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000144 operationId: createAnchor
145 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000146 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
147 - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
148 - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000149 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000150 '201':
151 $ref: 'components.yml#/components/responses/Created'
152 '400':
153 $ref: 'components.yml#/components/responses/BadRequest'
154 '401':
155 $ref: 'components.yml#/components/responses/Unauthorized'
156 '403':
157 $ref: 'components.yml#/components/responses/Forbidden'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000158
159anchorByDataspaceAndAnchorName:
160 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000161 description: Read an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000162 tags:
163 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000164 summary: Get an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000165 operationId: getAnchor
166 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000167 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
168 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000169 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000170 '200':
JosephKeenanc6865f32021-06-08 13:16:37 +0100171 description: OK
172 content:
173 application/json:
174 schema:
175 $ref: 'components.yml#/components/schemas/AnchorDetails'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000176 '400':
177 $ref: 'components.yml#/components/responses/BadRequest'
178 '401':
179 $ref: 'components.yml#/components/responses/Unauthorized'
180 '403':
181 $ref: 'components.yml#/components/responses/Forbidden'
182 '404':
183 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000184
185 delete:
Ruslan Kashapovb20858b2021-04-05 14:46:03 +0300186 description: Delete an anchor given an anchor name and a dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000187 tags:
188 - cps-admin
Rishi.Chail6d13f162021-01-26 05:58:39 +0000189 summary: Delete an anchor
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000190 operationId: deleteAnchor
191 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000192 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
193 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000194 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000195 '204':
196 $ref: 'components.yml#/components/responses/NoContent'
197 '400':
198 $ref: 'components.yml#/components/responses/BadRequest'
199 '401':
200 $ref: 'components.yml#/components/responses/Unauthorized'
201 '403':
JosephKeenanc6865f32021-06-08 13:16:37 +0100202 $ref: 'components.yml#/components/responses/Forbidden'