Split OpenAPI yaml file
[cps.git] / cps-rest / docs / api / swagger / cpsAdmin.yml
1 dataspace:
2   post:
3     tags:
4       - cps-admin
5     summary: Create a new dataspace
6     operationId: createDataspace
7     parameters:
8       - $ref: 'components.yaml#/components/parameters/dataspaceNameInQuery'
9     responses:
10       201:
11         $ref: 'components.yaml#/components/responses/Created'
12       400:
13         $ref: 'components.yaml#/components/responses/BadRequest'
14       401:
15         $ref: 'components.yaml#/components/responses/Unauthorized'
16       403:
17         $ref: 'components.yaml#/components/responses/Forbidden'
18
19 dataspaceByDataspaceName:
20   delete:
21     tags:
22       - cps-admin
23     summary: Delete the given dataspace - DRAFT
24     operationId: deleteDataspace
25     parameters:
26       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
27     responses:
28       200:
29         $ref: 'components.yaml#/components/responses/Ok'
30       204:
31         $ref: 'components.yaml#/components/responses/NoContent'
32       400:
33         $ref: 'components.yaml#/components/responses/BadRequest'
34       401:
35         $ref: 'components.yaml#/components/responses/Unauthorized'
36       403:
37         $ref: 'components.yaml#/components/responses/Forbidden'
38
39
40 schemaSet:
41   post:
42     tags:
43       - cps-admin
44     summary: Create a new schema set in the given dataspace
45     operationId: createSchemaSet
46     parameters:
47       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
48       - $ref: 'components.yaml#/components/parameters/schemaSetNameInQuery'
49     requestBody:
50       required: true
51       content:
52         multipart/form-data:
53           schema:
54             $ref: 'components.yaml#/components/schemas/MultipartFile'
55
56     responses:
57       201:
58         $ref: 'components.yaml#/components/responses/Created'
59       400:
60         $ref: 'components.yaml#/components/responses/BadRequest'
61       401:
62         $ref: 'components.yaml#/components/responses/Unauthorized'
63       403:
64         $ref: 'components.yaml#/components/responses/Forbidden'
65
66 schemaSetBySchemaSetName:
67   get:
68     tags:
69       - cps-admin
70     summary: Read a schema set given a schema set and a dataspace
71     operationId: getSchemaSet
72     parameters:
73       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
74       - $ref: 'components.yaml#/components/parameters/schemaSetNameInPath'
75     responses:
76       200:
77         $ref: 'components.yaml#/components/responses/Ok'
78       400:
79         $ref: 'components.yaml#/components/responses/BadRequest'
80       401:
81         $ref: 'components.yaml#/components/responses/Unauthorized'
82       403:
83         $ref: 'components.yaml#/components/responses/Forbidden'
84       404:
85         $ref: 'components.yaml#/components/responses/NotFound'
86
87 anchorsByDataspace:
88   get:
89     tags:
90       - cps-admin
91     summary: Read all anchors, given a dataspace
92     operationId: getAnchors
93     parameters:
94       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
95     responses:
96       200:
97         $ref: 'components.yaml#/components/responses/Ok'
98       400:
99         $ref: 'components.yaml#/components/responses/BadRequest'
100       401:
101         $ref: 'components.yaml#/components/responses/Unauthorized'
102       403:
103         $ref: 'components.yaml#/components/responses/Forbidden'
104       404:
105         $ref: 'components.yaml#/components/responses/NotFound'
106
107   post:
108     tags:
109       - cps-admin
110     summary: Create a new anchor in the given dataspace
111     operationId: createAnchor
112     parameters:
113       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
114       - $ref: 'components.yaml#/components/parameters/schemaSetNameInQuery'
115       - $ref: 'components.yaml#/components/parameters/anchorNameInQuery'
116     responses:
117       201:
118         $ref: 'components.yaml#/components/responses/Created'
119       400:
120         $ref: 'components.yaml#/components/responses/BadRequest'
121       401:
122         $ref: 'components.yaml#/components/responses/Unauthorized'
123       403:
124         $ref: 'components.yaml#/components/responses/Forbidden'
125
126 anchorByDataspaceAndAnchorName:
127   get:
128     tags:
129       - cps-admin
130     summary: Read an anchor given a anchor and a dataspace - DRAFT
131     operationId: getAnchor
132     parameters:
133       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
134       - $ref: 'components.yaml#/components/parameters/anchorNameInPath'
135     responses:
136       200:
137         $ref: 'components.yaml#/components/responses/Ok'
138       400:
139         $ref: 'components.yaml#/components/responses/BadRequest'
140       401:
141         $ref: 'components.yaml#/components/responses/Unauthorized'
142       403:
143         $ref: 'components.yaml#/components/responses/Forbidden'
144       404:
145         $ref: 'components.yaml#/components/responses/NotFound'
146
147   delete:
148     tags:
149       - cps-admin
150     summary: Delete an anchor given a anchor and a dataspace - DRAFT
151     operationId: deleteAnchor
152     parameters:
153       - $ref: 'components.yaml#/components/parameters/dataspaceNameInPath'
154       - $ref: 'components.yaml#/components/parameters/anchorNameInPath'
155     responses:
156       200:
157         $ref: 'components.yaml#/components/responses/Ok'
158       204:
159         $ref: 'components.yaml#/components/responses/NoContent'
160       400:
161         $ref: 'components.yaml#/components/responses/BadRequest'
162       401:
163         $ref: 'components.yaml#/components/responses/Unauthorized'
164       403:
165         $ref: 'components.yaml#/components/responses/Forbidden'