Delete anchor part 2: cps rest
[cps.git] / cps-rest / docs / api / swagger / cpsAdmin.yml
1 dataspaces:
2   post:
3     description: Create a new dataspace
4     tags:
5       - cps-admin
6     summary: Create a dataspace
7     operationId: createDataspace
8     parameters:
9       - $ref: 'components.yml#/components/parameters/dataspaceNameInQuery'
10     responses:
11       '201':
12         $ref: 'components.yml#/components/responses/Created'
13       '400':
14         $ref: 'components.yml#/components/responses/BadRequest'
15       '401':
16         $ref: 'components.yml#/components/responses/Unauthorized'
17       '403':
18         $ref: 'components.yml#/components/responses/Forbidden'
19
20 dataspaceByDataspaceName:
21   delete:
22     description: Delete the given dataspace - DRAFT
23     tags:
24       - cps-admin
25     summary: Delete a dataspace
26     operationId: deleteDataspace
27     parameters:
28       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
29     responses:
30       '200':
31         $ref: 'components.yml#/components/responses/Ok'
32       '204':
33         $ref: 'components.yml#/components/responses/NoContent'
34       '400':
35         $ref: 'components.yml#/components/responses/BadRequest'
36       '401':
37         $ref: 'components.yml#/components/responses/Unauthorized'
38       '403':
39         $ref: 'components.yml#/components/responses/Forbidden'
40
41
42 schemaSet:
43   post:
44     description: Create a new schema set in the given dataspace
45     tags:
46       - cps-admin
47     summary: Create a schema set
48     operationId: createSchemaSet
49     parameters:
50       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
51       - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
52     requestBody:
53       required: true
54       content:
55         multipart/form-data:
56           schema:
57             $ref: 'components.yml#/components/schemas/MultipartFile'
58
59     responses:
60       '201':
61         $ref: 'components.yml#/components/responses/Created'
62       '400':
63         $ref: 'components.yml#/components/responses/BadRequest'
64       '401':
65         $ref: 'components.yml#/components/responses/Unauthorized'
66       '403':
67         $ref: 'components.yml#/components/responses/Forbidden'
68
69 schemaSetBySchemaSetName:
70   get:
71     description: Read a schema set given a schema set name and a dataspace
72     tags:
73       - cps-admin
74     summary: Get a schema set
75     operationId: getSchemaSet
76     parameters:
77       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
78       - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
79     responses:
80       '200':
81         $ref: 'components.yml#/components/responses/Ok'
82       '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
91   delete:
92     description: Delete a schema set given a schema set name and a dataspace
93     tags:
94       - cps-admin
95     summary: Delete a schema set
96     operationId: deleteSchemaSet
97     parameters:
98       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
99       - $ref: 'components.yml#/components/parameters/schemaSetNameInPath'
100     responses:
101       '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'
111
112 anchorsByDataspace:
113   get:
114     description: Read all anchors, given a dataspace
115     tags:
116       - cps-admin
117     summary: Get anchors
118     operationId: getAnchors
119     parameters:
120       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
121     responses:
122       '200':
123         $ref: 'components.yml#/components/responses/Ok'
124       '400':
125         $ref: 'components.yml#/components/responses/BadRequest'
126       '401':
127         $ref: 'components.yml#/components/responses/Unauthorized'
128       '403':
129         $ref: 'components.yml#/components/responses/Forbidden'
130       '404':
131         $ref: 'components.yml#/components/responses/NotFound'
132
133   post:
134     description: Create a new anchor in the given dataspace
135     tags:
136       - cps-admin
137     summary: Create an anchor
138     operationId: createAnchor
139     parameters:
140       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
141       - $ref: 'components.yml#/components/parameters/schemaSetNameInQuery'
142       - $ref: 'components.yml#/components/parameters/anchorNameInQuery'
143     responses:
144       '201':
145         $ref: 'components.yml#/components/responses/Created'
146       '400':
147         $ref: 'components.yml#/components/responses/BadRequest'
148       '401':
149         $ref: 'components.yml#/components/responses/Unauthorized'
150       '403':
151         $ref: 'components.yml#/components/responses/Forbidden'
152
153 anchorByDataspaceAndAnchorName:
154   get:
155     description: Read an anchor given an anchor name and a dataspace
156     tags:
157       - cps-admin
158     summary: Get an anchor
159     operationId: getAnchor
160     parameters:
161       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
162       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
163     responses:
164       '200':
165         $ref: 'components.yml#/components/responses/Ok'
166       '400':
167         $ref: 'components.yml#/components/responses/BadRequest'
168       '401':
169         $ref: 'components.yml#/components/responses/Unauthorized'
170       '403':
171         $ref: 'components.yml#/components/responses/Forbidden'
172       '404':
173         $ref: 'components.yml#/components/responses/NotFound'
174
175   delete:
176     description: Delete an anchor given an anchor name and a dataspace
177     tags:
178       - cps-admin
179     summary: Delete an anchor
180     operationId: deleteAnchor
181     parameters:
182       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
183       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
184     responses:
185       '204':
186         $ref: 'components.yml#/components/responses/NoContent'
187       '400':
188         $ref: 'components.yml#/components/responses/BadRequest'
189       '401':
190         $ref: 'components.yml#/components/responses/Unauthorized'
191       '403':
192         $ref: 'components.yml#/components/responses/Forbidden'