blob: 0dc388706c25f54e83d47cd057681eed50fd695c [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.
Michal Jagiello6ce84d92022-12-13 07:40:19 +00005# Modifications Copyright (C) 2022 Deutsche Telekom AG
shivasubedi8df61a92021-06-16 14:43:18 +01006# ================================================================================
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.
Renu Kumari4d520012021-08-30 11:50:43 -040018#
19# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010020# ============LICENSE_END=========================================================
21
Rishi.Chaildacc6632021-01-27 04:27:34 +000022nodeByDataspaceAndAnchor:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000023 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000024 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 +000025 tags:
26 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000027 summary: Get a node
puthuparambil.aditya001e7732021-01-13 12:06:20 +000028 operationId: getNodeByDataspaceAndAnchor
29 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000030 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Rishi.Chail6d13f162021-01-26 05:58:39 +000031 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
32 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
33 - $ref: 'components.yml#/components/parameters/xpathInQuery'
34 - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000035 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000036 '200':
JosephKeenan2472e612021-06-23 14:15:52 +010037 description: OK
38 content:
39 application/json:
40 schema:
41 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000042 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000043 dataSample:
44 $ref: 'components.yml#/components/examples/dataSample'
Rishi.Chail6d13f162021-01-26 05:58:39 +000045 '400':
46 $ref: 'components.yml#/components/responses/BadRequest'
47 '401':
48 $ref: 'components.yml#/components/responses/Unauthorized'
49 '403':
50 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000051 '500':
52 $ref: 'components.yml#/components/responses/InternalServerError'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000053 x-codegen-request-body-name: xpath
54
DylanB95ESTa79c9f12021-10-29 17:33:06 +010055listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030056 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010057 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030058 tags:
59 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010060 summary: Add list element(s)
61 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030062 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000063 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030064 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
65 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
66 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010067 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030068 requestBody:
69 required: true
70 content:
71 application/json:
72 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000073 type: object
74 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000075 dataSample:
76 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030077 responses:
78 '201':
79 $ref: 'components.yml#/components/responses/Created'
80 '400':
81 $ref: 'components.yml#/components/responses/BadRequest'
82 '401':
83 $ref: 'components.yml#/components/responses/Unauthorized'
84 '403':
85 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000086 '500':
87 $ref: 'components.yml#/components/responses/InternalServerError'
Renu Kumari7edbeb62021-08-30 07:45:52 -040088 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010089 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030090 tags:
91 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010092 summary: Replace list content
93 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030094 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000095 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030096 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
97 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
98 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010099 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300100 requestBody:
101 required: true
102 content:
103 application/json:
104 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000105 type: object
106 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000107 dataSample:
108 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300109 responses:
110 '200':
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000111 $ref: 'components.yml#/components/responses/Ok'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300112 '400':
113 $ref: 'components.yml#/components/responses/BadRequest'
114 '401':
115 $ref: 'components.yml#/components/responses/Unauthorized'
116 '403':
117 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000118 '500':
119 $ref: 'components.yml#/components/responses/InternalServerError'
lukegleeson05701dd2021-08-18 09:49:32 +0100120
Rishi.Chaildacc6632021-01-27 04:27:34 +0000121nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000122 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000123 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000124 tags:
125 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000126 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000127 operationId: createNode
128 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000129 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Rishi.Chail6d13f162021-01-26 05:58:39 +0000130 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
131 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300132 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100133 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000134 - $ref: 'components.yml#/components/parameters/contentTypeHeader'
niamhcore74753d92021-01-28 16:11:52 +0000135 requestBody:
136 required: true
137 content:
138 application/json:
139 schema:
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000140 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000141 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000142 dataSample:
143 $ref: 'components.yml#/components/examples/dataSample'
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000144 application/xml:
145 schema:
146 type: object # Workaround to show example
147 xml:
148 name: stores
149 examples:
150 dataSample:
151 $ref: 'components.yml#/components/examples/dataSampleXml'
152
niamhcore74753d92021-01-28 16:11:52 +0000153 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000154 '201':
155 $ref: 'components.yml#/components/responses/Created'
156 '400':
157 $ref: 'components.yml#/components/responses/BadRequest'
158 '401':
159 $ref: 'components.yml#/components/responses/Unauthorized'
160 '403':
161 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000162 '409':
163 $ref: 'components.yml#/components/responses/Conflict'
164 '500':
165 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200166 patch:
167 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
168 tags:
169 - cps-data
170 summary: Update node leaves
171 operationId: updateNodeLeaves
172 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000173 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200174 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
175 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
176 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100177 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200178 requestBody:
179 required: true
180 content:
181 application/json:
182 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000183 type: object
184 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000185 dataSample:
186 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200187 responses:
188 '200':
189 $ref: 'components.yml#/components/responses/Ok'
190 '400':
191 $ref: 'components.yml#/components/responses/BadRequest'
192 '401':
193 $ref: 'components.yml#/components/responses/Unauthorized'
194 '403':
195 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000196 '500':
197 $ref: 'components.yml#/components/responses/InternalServerError'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000198 delete:
199 description: Delete a datanode for a given dataspace and anchor given a node xpath.
200 tags:
201 - cps-data
202 summary: Delete a data node
203 operationId: deleteDataNode
204 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000205 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000206 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
207 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
208 - $ref: 'components.yml#/components/parameters/xpathInQuery'
209 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
210 responses:
211 '204':
212 $ref: 'components.yml#/components/responses/NoContent'
213 '400':
214 $ref: 'components.yml#/components/responses/BadRequest'
215 '401':
216 $ref: 'components.yml#/components/responses/Unauthorized'
217 '403':
218 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000219 '500':
220 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200221 put:
222 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
223 tags:
224 - cps-data
225 summary: Replace a node with descendants
226 operationId: replaceNode
227 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000228 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200229 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
230 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
231 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100232 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200233 requestBody:
234 required: true
235 content:
236 application/json:
237 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000238 type: object
239 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000240 dataSample:
241 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200242 responses:
243 '200':
244 $ref: 'components.yml#/components/responses/Ok'
245 '400':
246 $ref: 'components.yml#/components/responses/BadRequest'
247 '401':
248 $ref: 'components.yml#/components/responses/Unauthorized'
249 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100250 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000251 '500':
252 $ref: 'components.yml#/components/responses/InternalServerError'