blob: 265ee23ad1bd9de4e52cc54dae1654911ad92706 [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
puthuparambil.adityacc17ae52022-02-25 13:24:03 +00002# Copyright (c) 2021-2022 Bell Canada.
JosephKeenan909a8502022-01-28 10:02:24 +00003# Modifications Copyright (C) 2021-2022 Nordix Foundation
shivasubedi8df61a92021-06-16 14:43:18 +01004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040016#
17# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010018# ============LICENSE_END=========================================================
19
Rishi.Chaildacc6632021-01-27 04:27:34 +000020nodeByDataspaceAndAnchor:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000021 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000022 description: Get a node with an option to retrieve all the children for a given anchor and dataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +000023 tags:
24 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000025 summary: Get a node
puthuparambil.aditya001e7732021-01-13 12:06:20 +000026 operationId: getNodeByDataspaceAndAnchor
27 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000028 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
29 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
30 - $ref: 'components.yml#/components/parameters/xpathInQuery'
31 - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000032 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000033 '200':
JosephKeenan2472e612021-06-23 14:15:52 +010034 description: OK
35 content:
36 application/json:
37 schema:
38 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000039 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000040 dataSample:
41 $ref: 'components.yml#/components/examples/dataSample'
Rishi.Chail6d13f162021-01-26 05:58:39 +000042 '400':
43 $ref: 'components.yml#/components/responses/BadRequest'
44 '401':
45 $ref: 'components.yml#/components/responses/Unauthorized'
46 '403':
47 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000048 '500':
49 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000050 x-codegen-request-body-name: xpath
51
DylanB95ESTa79c9f12021-10-29 17:33:06 +010052listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030053 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010054 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030055 tags:
56 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010057 summary: Add list element(s)
58 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030059 parameters:
60 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
61 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
62 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010063 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030064 requestBody:
65 required: true
66 content:
67 application/json:
68 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000069 type: object
70 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000071 dataSample:
72 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030073 responses:
74 '201':
75 $ref: 'components.yml#/components/responses/Created'
76 '400':
77 $ref: 'components.yml#/components/responses/BadRequest'
78 '401':
79 $ref: 'components.yml#/components/responses/Unauthorized'
80 '403':
81 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000082 '500':
83 $ref: 'components.yml#/components/responses/InternalServerError'
Renu Kumari7edbeb62021-08-30 07:45:52 -040084 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010085 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030086 tags:
87 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010088 summary: Replace list content
89 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030090 parameters:
91 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
92 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
93 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010094 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030095 requestBody:
96 required: true
97 content:
98 application/json:
99 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000100 type: object
101 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000102 dataSample:
103 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300104 responses:
105 '200':
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000106 $ref: 'components.yml#/components/responses/Ok'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300107 '400':
108 $ref: 'components.yml#/components/responses/BadRequest'
109 '401':
110 $ref: 'components.yml#/components/responses/Unauthorized'
111 '403':
112 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000113 '500':
114 $ref: 'components.yml#/components/responses/InternalServerError'
lukegleeson05701dd2021-08-18 09:49:32 +0100115 delete:
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100116 description: Delete one or all list element(s) for a given anchor and dataspace
DylanB95EST30a59dd2021-11-02 17:25:18 +0000117 deprecated: true
lukegleeson05701dd2021-08-18 09:49:32 +0100118 tags:
119 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100120 summary: Delete one or all list element(s)
121 operationId: deleteListOrListElement
lukegleeson05701dd2021-08-18 09:49:32 +0100122 parameters:
123 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
124 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
125 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100126 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
lukegleeson05701dd2021-08-18 09:49:32 +0100127 responses:
128 '204':
129 $ref: 'components.yml#/components/responses/NoContent'
130 '400':
131 $ref: 'components.yml#/components/responses/BadRequest'
132 '401':
133 $ref: 'components.yml#/components/responses/Unauthorized'
134 '403':
135 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000136 '500':
137 $ref: 'components.yml#/components/responses/InternalServerError'
lukegleeson05701dd2021-08-18 09:49:32 +0100138
Rishi.Chaildacc6632021-01-27 04:27:34 +0000139nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000140 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000141 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000142 tags:
143 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000144 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000145 operationId: createNode
146 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000147 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
148 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300149 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100150 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000151 requestBody:
152 required: true
153 content:
154 application/json:
155 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000156 type: object
157 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000158 dataSample:
159 $ref: 'components.yml#/components/examples/dataSample'
niamhcore74753d92021-01-28 16:11:52 +0000160 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000161 '201':
162 $ref: 'components.yml#/components/responses/Created'
163 '400':
164 $ref: 'components.yml#/components/responses/BadRequest'
165 '401':
166 $ref: 'components.yml#/components/responses/Unauthorized'
167 '403':
168 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000169 '409':
170 $ref: 'components.yml#/components/responses/Conflict'
171 '500':
172 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200173 patch:
174 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
175 tags:
176 - cps-data
177 summary: Update node leaves
178 operationId: updateNodeLeaves
179 parameters:
180 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
181 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
182 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100183 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200184 requestBody:
185 required: true
186 content:
187 application/json:
188 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000189 type: object
190 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000191 dataSample:
192 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200193 responses:
194 '200':
195 $ref: 'components.yml#/components/responses/Ok'
196 '400':
197 $ref: 'components.yml#/components/responses/BadRequest'
198 '401':
199 $ref: 'components.yml#/components/responses/Unauthorized'
200 '403':
201 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000202 '500':
203 $ref: 'components.yml#/components/responses/InternalServerError'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000204 delete:
205 description: Delete a datanode for a given dataspace and anchor given a node xpath.
206 tags:
207 - cps-data
208 summary: Delete a data node
209 operationId: deleteDataNode
210 parameters:
211 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
212 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
213 - $ref: 'components.yml#/components/parameters/xpathInQuery'
214 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
215 responses:
216 '204':
217 $ref: 'components.yml#/components/responses/NoContent'
218 '400':
219 $ref: 'components.yml#/components/responses/BadRequest'
220 '401':
221 $ref: 'components.yml#/components/responses/Unauthorized'
222 '403':
223 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000224 '500':
225 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200226 put:
227 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
228 tags:
229 - cps-data
230 summary: Replace a node with descendants
231 operationId: replaceNode
232 parameters:
233 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
234 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
235 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100236 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200237 requestBody:
238 required: true
239 content:
240 application/json:
241 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000242 type: object
243 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000244 dataSample:
245 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200246 responses:
247 '200':
248 $ref: 'components.yml#/components/responses/Ok'
249 '400':
250 $ref: 'components.yml#/components/responses/BadRequest'
251 '401':
252 $ref: 'components.yml#/components/responses/Unauthorized'
253 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100254 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000255 '500':
256 $ref: 'components.yml#/components/responses/InternalServerError'