blob: 0a032e4be0f441b75a54874b2f883a9ac8d5efcd [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.kumarcc21a022022-12-06 11:47:24 +00004# Modifications Copyright (C) 2022-2023 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
DylanB95ESTa79c9f12021-10-29 17:33:06 +010022listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030023 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010024 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030025 tags:
26 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010027 summary: Add list element(s)
28 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030029 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000030 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030031 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
32 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
33 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010034 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030035 requestBody:
36 required: true
37 content:
38 application/json:
39 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000040 type: object
41 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +000042 dataSample:
43 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030044 responses:
45 '201':
46 $ref: 'components.yml#/components/responses/Created'
47 '400':
48 $ref: 'components.yml#/components/responses/BadRequest'
49 '401':
50 $ref: 'components.yml#/components/responses/Unauthorized'
51 '403':
52 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +000053 '500':
54 $ref: 'components.yml#/components/responses/InternalServerError'
Renu Kumari7edbeb62021-08-30 07:45:52 -040055 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010056 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030057 tags:
58 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010059 summary: Replace list content
60 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030061 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000062 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +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 Kashapov576f48e2021-05-14 14:41:05 +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 Kashapov576f48e2021-05-14 14:41:05 +030076 responses:
77 '200':
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000078 $ref: 'components.yml#/components/responses/Ok'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030079 '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'
lukegleeson05701dd2021-08-18 09:49:32 +010087
Rishi.Chaildacc6632021-01-27 04:27:34 +000088nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +000089 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000090 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +000091 tags:
92 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000093 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +000094 operationId: createNode
95 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +000096 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Rishi.Chail6d13f162021-01-26 05:58:39 +000097 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
98 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +030099 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100100 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000101 - $ref: 'components.yml#/components/parameters/contentTypeHeader'
niamhcore74753d92021-01-28 16:11:52 +0000102 requestBody:
103 required: true
104 content:
105 application/json:
106 schema:
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000107 type: string
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000108 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000109 dataSample:
110 $ref: 'components.yml#/components/examples/dataSample'
Michal Jagiello6ce84d92022-12-13 07:40:19 +0000111 application/xml:
112 schema:
113 type: object # Workaround to show example
114 xml:
115 name: stores
116 examples:
117 dataSample:
118 $ref: 'components.yml#/components/examples/dataSampleXml'
119
niamhcore74753d92021-01-28 16:11:52 +0000120 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000121 '201':
122 $ref: 'components.yml#/components/responses/Created'
123 '400':
124 $ref: 'components.yml#/components/responses/BadRequest'
125 '401':
126 $ref: 'components.yml#/components/responses/Unauthorized'
127 '403':
128 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000129 '409':
130 $ref: 'components.yml#/components/responses/Conflict'
131 '500':
132 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200133 patch:
arpitsingh2b4c4882023-03-03 21:38:57 +0530134 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath. This operation
135 is currently supported for one top level data node only.
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200136 tags:
137 - cps-data
138 summary: Update node leaves
139 operationId: updateNodeLeaves
140 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000141 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200142 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
143 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
144 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100145 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200146 requestBody:
147 required: true
148 content:
149 application/json:
150 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000151 type: object
152 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000153 dataSample:
154 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200155 responses:
156 '200':
157 $ref: 'components.yml#/components/responses/Ok'
158 '400':
159 $ref: 'components.yml#/components/responses/BadRequest'
160 '401':
161 $ref: 'components.yml#/components/responses/Unauthorized'
162 '403':
163 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000164 '500':
165 $ref: 'components.yml#/components/responses/InternalServerError'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000166 delete:
167 description: Delete a datanode for a given dataspace and anchor given a node xpath.
168 tags:
169 - cps-data
170 summary: Delete a data node
171 operationId: deleteDataNode
172 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000173 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
DylanB95EST30a59dd2021-11-02 17:25:18 +0000174 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
175 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
176 - $ref: 'components.yml#/components/parameters/xpathInQuery'
177 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
178 responses:
179 '204':
180 $ref: 'components.yml#/components/responses/NoContent'
181 '400':
182 $ref: 'components.yml#/components/responses/BadRequest'
183 '401':
184 $ref: 'components.yml#/components/responses/Unauthorized'
185 '403':
186 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000187 '500':
188 $ref: 'components.yml#/components/responses/InternalServerError'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200189 put:
190 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
191 tags:
192 - cps-data
193 summary: Replace a node with descendants
194 operationId: replaceNode
195 parameters:
rajesh.kumar897686f2022-12-14 08:13:29 +0000196 - $ref: 'components.yml#/components/parameters/apiVersionInPath'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200197 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
198 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
199 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100200 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200201 requestBody:
202 required: true
203 content:
204 application/json:
205 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000206 type: object
207 examples:
puthuparambil.adityacc17ae52022-02-25 13:24:03 +0000208 dataSample:
209 $ref: 'components.yml#/components/examples/dataSample'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200210 responses:
211 '200':
212 $ref: 'components.yml#/components/responses/Ok'
213 '400':
214 $ref: 'components.yml#/components/responses/BadRequest'
215 '401':
216 $ref: 'components.yml#/components/responses/Unauthorized'
217 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100218 $ref: 'components.yml#/components/responses/Forbidden'
JosephKeenan909a8502022-01-28 10:02:24 +0000219 '500':
220 $ref: 'components.yml#/components/responses/InternalServerError'