blob: 4418a3b9b70c105d5cf9c3d44ba651978a690e4f [file] [log] [blame]
Lee Anjella Macabuhayebb0af82024-10-03 13:47:14 +00001# ============LICENSE_START=======================================================
2# Copyright (c) 2021-2022 Bell Canada.
3# Modifications Copyright (C) 2021-2022 Nordix Foundation
4# Modifications Copyright (C) 2022-2024 TechMahindra Ltd.
5# Modifications Copyright (C) 2022 Deutsche Telekom AG
6# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19# SPDX-License-Identifier: Apache-2.0
20# ============LICENSE_END=========================================================
21
22listElementByDataspaceAndAnchor:
23 post:
24 description: Add list element(s) to a list for a given anchor and dataspace
25 tags:
26 - cps-data
27 summary: Add list element(s)
28 operationId: addListElements
29 parameters:
30 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
31 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
32 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
33 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
34 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
35 - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
36 requestBody:
37 required: true
38 content:
39 application/json:
40 schema:
41 type: string
42 examples:
43 dataSample:
44 $ref: 'components.yml#/components/examples/dataSample'
45 application/xml:
46 schema:
47 type: object
48 xml:
49 name: stores
50 examples:
51 dataSample:
52 $ref: 'components.yml#/components/examples/dataSampleXml'
53 responses:
54 '201':
55 $ref: 'components.yml#/components/responses/Created'
56 '400':
57 $ref: 'components.yml#/components/responses/BadRequest'
58 '403':
59 $ref: 'components.yml#/components/responses/Forbidden'
60 '500':
61 $ref: 'components.yml#/components/responses/InternalServerError'
62 put:
63 description: Replace list content under a given parent, anchor and dataspace
64 tags:
65 - cps-data
66 summary: Replace list content
67 operationId: replaceListContent
68 parameters:
69 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
70 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
71 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
72 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
73 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
74 requestBody:
75 required: true
76 content:
77 application/json:
78 schema:
79 type: object
80 examples:
81 dataSample:
82 $ref: 'components.yml#/components/examples/dataSample'
83 responses:
84 '200':
85 $ref: 'components.yml#/components/responses/Ok'
86 '400':
87 $ref: 'components.yml#/components/responses/BadRequest'
88 '403':
89 $ref: 'components.yml#/components/responses/Forbidden'
90 '500':
91 $ref: 'components.yml#/components/responses/InternalServerError'
92
93nodesByDataspaceAndAnchor:
94 post:
95 description: Create a node for a given anchor and dataspace
96 tags:
97 - cps-data
98 summary: Create a node
99 operationId: createNode
100 parameters:
101 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
102 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
103 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
104 - $ref: 'components.yml#/components/parameters/xpathInQuery'
105 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
106 - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
107 requestBody:
108 required: true
109 content:
110 application/json:
111 schema:
112 type: string
113 examples:
114 dataSample:
115 $ref: 'components.yml#/components/examples/dataSample'
116 application/xml:
117 schema:
118 type: object # Workaround to show example
119 xml:
120 name: stores
121 examples:
122 dataSample:
123 $ref: 'components.yml#/components/examples/dataSampleXml'
124 responses:
125 '201':
126 $ref: 'components.yml#/components/responses/Created'
127 '400':
128 $ref: 'components.yml#/components/responses/BadRequest'
129 '403':
130 $ref: 'components.yml#/components/responses/Forbidden'
131 '409':
132 $ref: 'components.yml#/components/responses/Conflict'
133 '500':
134 $ref: 'components.yml#/components/responses/InternalServerError'
135 patch:
136 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath. This operation
137 is currently supported for one top level data node only.
138 tags:
139 - cps-data
140 summary: Update node leaves
141 operationId: updateNodeLeaves
142 parameters:
143 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
144 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
145 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
146 - $ref: 'components.yml#/components/parameters/xpathInQuery'
147 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
148 - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
149 requestBody:
150 required: true
151 content:
152 application/json:
153 schema:
154 type: string
155 examples:
156 dataSample:
157 $ref: 'components.yml#/components/examples/dataSample'
158 application/xml:
159 schema:
160 type: object
161 xml:
162 name: stores
163 examples:
164 dataSample:
165 $ref: 'components.yml#/components/examples/dataSampleXml'
166 responses:
167 '200':
168 $ref: 'components.yml#/components/responses/Ok'
169 '400':
170 $ref: 'components.yml#/components/responses/BadRequest'
171 '403':
172 $ref: 'components.yml#/components/responses/Forbidden'
173 '500':
174 $ref: 'components.yml#/components/responses/InternalServerError'
175 delete:
176 description: Delete a datanode for a given dataspace and anchor given a node xpath.
177 tags:
178 - cps-data
179 summary: Delete a data node
180 operationId: deleteDataNode
181 parameters:
182 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
183 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
184 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
185 - $ref: 'components.yml#/components/parameters/xpathInQuery'
186 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
187 responses:
188 '204':
189 $ref: 'components.yml#/components/responses/NoContent'
190 '400':
191 $ref: 'components.yml#/components/responses/BadRequest'
192 '403':
193 $ref: 'components.yml#/components/responses/Forbidden'
194 '500':
195 $ref: 'components.yml#/components/responses/InternalServerError'
196 put:
197 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
198 tags:
199 - cps-data
200 summary: Replace a node with descendants
201 operationId: replaceNode
202 parameters:
203 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
204 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
205 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
206 - $ref: 'components.yml#/components/parameters/xpathInQuery'
207 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
208 - $ref: 'components.yml#/components/parameters/contentTypeInHeader'
209 requestBody:
210 required: true
211 content:
212 application/json:
213 schema:
214 type: string
215 examples:
216 dataSample:
217 $ref: 'components.yml#/components/examples/dataSample'
218 application/xml:
219 schema:
220 type: object
221 xml:
222 name: stores
223 examples:
224 dataSample:
225 $ref: 'components.yml#/components/examples/dataSampleXml'
226 responses:
227 '200':
228 $ref: 'components.yml#/components/responses/Ok'
229 '400':
230 $ref: 'components.yml#/components/responses/BadRequest'
231 '403':
232 $ref: 'components.yml#/components/responses/Forbidden'
233 '500':
234 $ref: 'components.yml#/components/responses/InternalServerError'