Remove Http Status 401 for cps core and NCMP(CPS-2126 #3)
[cps.git] / cps-rest / docs / openapi / cpsAdminV2.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2022 TechMahindra Ltd.
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 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18
19 dataspaces:
20   post:
21     description: Create a new dataspace
22     tags:
23       - cps-admin
24     summary: Create a dataspace
25     operationId: createDataspaceV2
26     parameters:
27       - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
28     responses:
29       '201':
30         $ref: 'components.yml#/components/responses/CreatedV2'
31       '400':
32         $ref: 'components.yml#/components/responses/BadRequest'
33       '403':
34         $ref: 'components.yml#/components/responses/Forbidden'
35       '409':
36         $ref: 'components.yml#/components/responses/Conflict'
37       '500':
38         $ref: 'components.yml#/components/responses/InternalServerError'
39
40 anchorsByDataspace:
41   post:
42     description: Create a new anchor in the given dataspace
43     tags:
44       - cps-admin
45     summary: Create an anchor
46     operationId: createAnchorV2
47     parameters:
48       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
49       - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
50       - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
51     responses:
52       '201':
53         $ref: 'components.yml#/components/responses/CreatedV2'
54       '400':
55         $ref: 'components.yml#/components/responses/BadRequest'
56       '403':
57         $ref: 'components.yml#/components/responses/Forbidden'
58       '409':
59         $ref: 'components.yml#/components/responses/Conflict'
60       '500':
61         $ref: 'components.yml#/components/responses/InternalServerError'
62
63 schemaSet:
64   post:
65     description: Create a new schema set in the given dataspace
66     tags:
67       - cps-admin
68     summary: Create a schema set
69     operationId: createSchemaSetV2
70     parameters:
71       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
72       - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
73     requestBody:
74       required: true
75       content:
76         multipart/form-data:
77           schema:
78             $ref: 'components.yml#/components/schemas/MultipartFile'
79     responses:
80       '201':
81         $ref: 'components.yml#/components/responses/CreatedV2'
82       '400':
83         $ref: 'components.yml#/components/responses/BadRequest'
84       '403':
85         $ref: 'components.yml#/components/responses/Forbidden'
86       '409':
87         $ref: 'components.yml#/components/responses/Conflict'
88       '500':
89         $ref: 'components.yml#/components/responses/InternalServerError'