blob: 9d940c3f83a93699e905e4ace9a3a404f77dee32 [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
rajesh.kumar897686f2022-12-14 08:13:29 +00004# Modifications Copyright (C) 2022 TechMahindra Ltd.
shivasubedi8df61a92021-06-16 14:43:18 +01005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040017#
18# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010019# ============LICENSE_END=========================================================
20
Rishi.Chaildacc6632021-01-27 04:27:34 +000021nodeByDataspaceAndAnchor:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000022 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000023 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 +000024 tags:
25 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000026 summary: Get a node
puthuparambil.aditya001e7732021-01-13 12:06:20 +000027 operationId: getNodeByDataspaceAndAnchor
28 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000029 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Rishi.Chail6d13f162021-01-26 05:58:39 +000030 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
31 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
32 - $ref: 'components.yml#/components/parameters/xpathInQuery'
33 - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000034 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000035 '200':
JosephKeenan2472e612021-06-23 14:15:52 +010036 description: OK
37 content:
38 application/json:
39 schema:
40 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000041 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000042 dataSample:
43 $ref: 'components.yml#/components/examples/dataSample'
Rishi.Chail6d13f162021-01-26 05:58:39 +000044 '400':
45 $ref: 'components.yml#/components/responses/BadRequest'
46 '401':
47 $ref: 'components.yml#/components/responses/Unauthorized'
48 '403':
49 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000050 '500':
51 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000052 x-codegen-request-body-name: xpath
53
DylanB95ESTa79c9f12021-10-29 17:33:06 +010054listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030055 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010056 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030057 tags:
58 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010059 summary: Add list element(s)
60 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030061 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000062 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030063 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
64 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
65 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010066 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030067 requestBody:
68 required: true
69 content:
70 application/json:
71 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000072 type: object
73 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000074 dataSample:
75 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030076 responses:
77 '201':
78 $ref: 'components.yml#/components/responses/Created'
79 '400':
80 $ref: 'components.yml#/components/responses/BadRequest'
81 '401':
82 $ref: 'components.yml#/components/responses/Unauthorized'
83 '403':
84 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000085 '500':
86 $ref: 'components.yml#/components/responses/InternalServerError'
Renu Kumari7edbeb62021-08-30 07:45:52 -040087 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010088 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030089 tags:
90 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010091 summary: Replace list content
92 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030093 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000094 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030095 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
96 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
97 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010098 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030099 requestBody:
100 required: true
101 content:
102 application/json:
103 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000104 type: object
105 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000106 dataSample:
107 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300108 responses:
109 '200':
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000110 $ref: 'components.yml#/components/responses/Ok'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300111 '400':
112 $ref: 'components.yml#/components/responses/BadRequest'
113 '401':
114 $ref: 'components.yml#/components/responses/Unauthorized'
115 '403':
116 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000117 '500':
118 $ref: 'components.yml#/components/responses/InternalServerError'
lukegleeson05701dd2021-08-18 09:49:32 +0100119
Rishi.Chaildacc6632021-01-27 04:27:34 +0000120nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000121 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000122 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000123 tags:
124 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000125 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000126 operationId: createNode
127 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000128 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000129 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
130 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300131 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100132 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000133 requestBody:
134 required: true
135 content:
136 application/json:
137 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000138 type: object
139 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000140 dataSample:
141 $ref: 'components.yml#/components/examples/dataSample'
niamhcore74753d92021-01-28 16:11:52 +0000142 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000143 '201':
144 $ref: 'components.yml#/components/responses/Created'
145 '400':
146 $ref: 'components.yml#/components/responses/BadRequest'
147 '401':
148 $ref: 'components.yml#/components/responses/Unauthorized'
149 '403':
150 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000151 '409':
152 $ref: 'components.yml#/components/responses/Conflict'
153 '500':
154 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200155 patch:
156 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
157 tags:
158 - cps-data
159 summary: Update node leaves
160 operationId: updateNodeLeaves
161 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000162 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200163 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
164 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
165 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100166 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200167 requestBody:
168 required: true
169 content:
170 application/json:
171 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000172 type: object
173 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000174 dataSample:
175 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200176 responses:
177 '200':
178 $ref: 'components.yml#/components/responses/Ok'
179 '400':
180 $ref: 'components.yml#/components/responses/BadRequest'
181 '401':
182 $ref: 'components.yml#/components/responses/Unauthorized'
183 '403':
184 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000185 '500':
186 $ref: 'components.yml#/components/responses/InternalServerError'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000187 delete:
188 description: Delete a datanode for a given dataspace and anchor given a node xpath.
189 tags:
190 - cps-data
191 summary: Delete a data node
192 operationId: deleteDataNode
193 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000194 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000195 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
196 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
197 - $ref: 'components.yml#/components/parameters/xpathInQuery'
198 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
199 responses:
200 '204':
201 $ref: 'components.yml#/components/responses/NoContent'
202 '400':
203 $ref: 'components.yml#/components/responses/BadRequest'
204 '401':
205 $ref: 'components.yml#/components/responses/Unauthorized'
206 '403':
207 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000208 '500':
209 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200210 put:
211 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
212 tags:
213 - cps-data
214 summary: Replace a node with descendants
215 operationId: replaceNode
216 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000217 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200218 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
219 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
220 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100221 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200222 requestBody:
223 required: true
224 content:
225 application/json:
226 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000227 type: object
228 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000229 dataSample:
230 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200231 responses:
232 '200':
233 $ref: 'components.yml#/components/responses/Ok'
234 '400':
235 $ref: 'components.yml#/components/responses/BadRequest'
236 '401':
237 $ref: 'components.yml#/components/responses/Unauthorized'
238 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100239 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000240 '500':
241 $ref: 'components.yml#/components/responses/InternalServerError'