Aligning differing openAPI paths (cps-rest & ncmp-rest)
[cps.git] / cps-rest / docs / openapi / cpsData.yml
1 nodeByDataspaceAndAnchor:
2   get:
3     description: Get a node with an option to retrieve all the children for a given anchor and dataspace
4     tags:
5       - cps-data
6     summary: Get a node
7     operationId: getNodeByDataspaceAndAnchor
8     parameters:
9       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
10       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
11       - $ref: 'components.yml#/components/parameters/xpathInQuery'
12       - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
13     responses:
14       '200':
15         $ref: 'components.yml#/components/responses/Ok'
16       '400':
17         $ref: 'components.yml#/components/responses/BadRequest'
18       '401':
19         $ref: 'components.yml#/components/responses/Unauthorized'
20       '403':
21         $ref: 'components.yml#/components/responses/Forbidden'
22       '404':
23         $ref: 'components.yml#/components/responses/NotFound'
24     x-codegen-request-body-name: xpath
25
26 listNodeByDataspaceAndAnchor:
27   post:
28     description: Add list-node child elements to existing node for a given anchor and dataspace
29     tags:
30       - cps-data
31     summary: Add list-node child element(s) under existing parent node
32     operationId: addListNodeElements
33     parameters:
34       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
35       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
36       - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
37     requestBody:
38       required: true
39       content:
40         application/json:
41           schema:
42             type: string
43     responses:
44       '201':
45         $ref: 'components.yml#/components/responses/Created'
46       '400':
47         $ref: 'components.yml#/components/responses/BadRequest'
48       '401':
49         $ref: 'components.yml#/components/responses/Unauthorized'
50       '403':
51         $ref: 'components.yml#/components/responses/Forbidden'
52
53   patch:
54     description: Replace list-node child elements under existing node for a given anchor and dataspace
55     tags:
56       - cps-data
57     summary: Replace list-node child element(s) under existing parent node
58     operationId: replaceListNodeElements
59     parameters:
60       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
61       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
62       - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
63     requestBody:
64       required: true
65       content:
66         application/json:
67           schema:
68             type: string
69     responses:
70       '200':
71         $ref: 'components.yml#/components/responses/Created'
72       '400':
73         $ref: 'components.yml#/components/responses/BadRequest'
74       '401':
75         $ref: 'components.yml#/components/responses/Unauthorized'
76       '403':
77         $ref: 'components.yml#/components/responses/Forbidden'
78
79 nodesByDataspaceAndAnchor:
80   post:
81     description: Create a node for a given anchor and dataspace
82     tags:
83       - cps-data
84     summary: Create a node
85     operationId: createNode
86     parameters:
87       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
88       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
89       - $ref: 'components.yml#/components/parameters/xpathInQuery'
90     requestBody:
91       required: true
92       content:
93         application/json:
94           schema:
95             type: string
96     responses:
97       '201':
98         $ref: 'components.yml#/components/responses/Created'
99       '400':
100         $ref: 'components.yml#/components/responses/BadRequest'
101       '401':
102         $ref: 'components.yml#/components/responses/Unauthorized'
103       '403':
104         $ref: 'components.yml#/components/responses/Forbidden'
105
106   patch:
107     description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
108     tags:
109       - cps-data
110     summary: Update node leaves
111     operationId: updateNodeLeaves
112     parameters:
113       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
114       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
115       - $ref: 'components.yml#/components/parameters/xpathInQuery'
116     requestBody:
117       required: true
118       content:
119         application/json:
120           schema:
121             type: string
122     responses:
123       '200':
124         $ref: 'components.yml#/components/responses/Ok'
125       '400':
126         $ref: 'components.yml#/components/responses/BadRequest'
127       '401':
128         $ref: 'components.yml#/components/responses/Unauthorized'
129       '403':
130         $ref: 'components.yml#/components/responses/Forbidden'
131
132   put:
133     description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
134     tags:
135       - cps-data
136     summary: Replace a node with descendants
137     operationId: replaceNode
138     parameters:
139       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
140       - $ref: 'components.yml#/components/parameters/anchorNameInPath'
141       - $ref: 'components.yml#/components/parameters/xpathInQuery'
142     requestBody:
143       required: true
144       content:
145         application/json:
146           schema:
147             type: string
148     responses:
149       '200':
150         $ref: 'components.yml#/components/responses/Ok'
151       '400':
152         $ref: 'components.yml#/components/responses/BadRequest'
153       '401':
154         $ref: 'components.yml#/components/responses/Unauthorized'
155       '403':
156         $ref: 'components.yml#/components/responses/Forbidden'
157
158
159 nodesByDataspace:
160   get:
161     description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
162     tags:
163       - cps-data
164     summary: Get nodes
165     operationId: getNodesByDataspace
166     parameters:
167       - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
168     responses:
169       '200':
170         $ref: 'components.yml#/components/responses/Ok'
171       '400':
172         $ref: 'components.yml#/components/responses/BadRequest'
173       '401':
174         $ref: 'components.yml#/components/responses/Unauthorized'
175       '403':
176         $ref: 'components.yml#/components/responses/Forbidden'
177       '404':
178         $ref: 'components.yml#/components/responses/NotFound'
179     x-codegen-request-body-name: requestBody