blob: 15f8a1c71bbbca3c6ebac5ebbd63f73d0f8f1fca [file] [log] [blame]
shivasubedi8df61a92021-06-16 14:43:18 +01001# ============LICENSE_START=======================================================
2# Copyright (c) 2021 Bell Canada.
3# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Renu Kumari4d520012021-08-30 11:50:43 -040015#
16# SPDX-License-Identifier: Apache-2.0
shivasubedi8df61a92021-06-16 14:43:18 +010017# ============LICENSE_END=========================================================
18
Rishi.Chaildacc6632021-01-27 04:27:34 +000019nodeByDataspaceAndAnchor:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000020 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000021 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 +000022 tags:
23 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000024 summary: Get a node
puthuparambil.aditya001e7732021-01-13 12:06:20 +000025 operationId: getNodeByDataspaceAndAnchor
26 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000027 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
28 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
29 - $ref: 'components.yml#/components/parameters/xpathInQuery'
30 - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000031 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000032 '200':
JosephKeenan2472e612021-06-23 14:15:52 +010033 description: OK
34 content:
35 application/json:
36 schema:
37 type: object
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000038 examples:
39 dataSampleResponse:
40 $ref: 'components.yml#/components/examples/dataSampleResponse'
Rishi.Chail6d13f162021-01-26 05:58:39 +000041 '400':
42 $ref: 'components.yml#/components/responses/BadRequest'
43 '401':
44 $ref: 'components.yml#/components/responses/Unauthorized'
45 '403':
46 $ref: 'components.yml#/components/responses/Forbidden'
47 '404':
48 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000049 x-codegen-request-body-name: xpath
50
DylanB95ESTa79c9f12021-10-29 17:33:06 +010051listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030052 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010053 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030054 tags:
55 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010056 summary: Add list element(s)
57 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030058 parameters:
59 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
60 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
61 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010062 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030063 requestBody:
64 required: true
65 content:
66 application/json:
67 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000068 type: object
69 examples:
70 dataSampleRequest:
71 $ref: 'components.yml#/components/examples/dataSampleRequest'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030072 responses:
73 '201':
74 $ref: 'components.yml#/components/responses/Created'
75 '400':
76 $ref: 'components.yml#/components/responses/BadRequest'
77 '401':
78 $ref: 'components.yml#/components/responses/Unauthorized'
79 '403':
80 $ref: 'components.yml#/components/responses/Forbidden'
81
Renu Kumari7edbeb62021-08-30 07:45:52 -040082 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010083 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030084 tags:
85 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010086 summary: Replace list content
87 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030088 parameters:
89 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
90 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
91 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010092 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030093 requestBody:
94 required: true
95 content:
96 application/json:
97 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +000098 type: object
99 examples:
100 dataSampleRequest:
101 $ref: 'components.yml#/components/examples/dataSampleRequest'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300102 responses:
103 '200':
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000104 $ref: 'components.yml#/components/responses/Ok'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +0300105 '400':
106 $ref: 'components.yml#/components/responses/BadRequest'
107 '401':
108 $ref: 'components.yml#/components/responses/Unauthorized'
109 '403':
110 $ref: 'components.yml#/components/responses/Forbidden'
111
lukegleeson05701dd2021-08-18 09:49:32 +0100112 delete:
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100113 description: Delete one or all list element(s) for a given anchor and dataspace
DylanB95EST30a59dd2021-11-02 17:25:18 +0000114 deprecated: true
lukegleeson05701dd2021-08-18 09:49:32 +0100115 tags:
116 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100117 summary: Delete one or all list element(s)
118 operationId: deleteListOrListElement
lukegleeson05701dd2021-08-18 09:49:32 +0100119 parameters:
120 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
121 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
122 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100123 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
lukegleeson05701dd2021-08-18 09:49:32 +0100124 responses:
125 '204':
126 $ref: 'components.yml#/components/responses/NoContent'
127 '400':
128 $ref: 'components.yml#/components/responses/BadRequest'
129 '401':
130 $ref: 'components.yml#/components/responses/Unauthorized'
131 '403':
132 $ref: 'components.yml#/components/responses/Forbidden'
133
Rishi.Chaildacc6632021-01-27 04:27:34 +0000134nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000135 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000136 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000137 tags:
138 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000139 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000140 operationId: createNode
141 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000142 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
143 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300144 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100145 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000146 requestBody:
147 required: true
148 content:
149 application/json:
150 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000151 type: object
152 examples:
153 dataSampleRequest:
154 $ref: 'components.yml#/components/examples/dataSampleRequest'
niamhcore74753d92021-01-28 16:11:52 +0000155 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000156 '201':
157 $ref: 'components.yml#/components/responses/Created'
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'
niamhcore74753d92021-01-28 16:11:52 +0000164
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200165 patch:
166 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
167 tags:
168 - cps-data
169 summary: Update node leaves
170 operationId: updateNodeLeaves
171 parameters:
172 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
173 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
174 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100175 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200176 requestBody:
177 required: true
178 content:
179 application/json:
180 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000181 type: object
182 examples:
183 dataSampleRequest:
184 $ref: 'components.yml#/components/examples/dataSampleRequest'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200185 responses:
186 '200':
187 $ref: 'components.yml#/components/responses/Ok'
188 '400':
189 $ref: 'components.yml#/components/responses/BadRequest'
190 '401':
191 $ref: 'components.yml#/components/responses/Unauthorized'
192 '403':
193 $ref: 'components.yml#/components/responses/Forbidden'
194
DylanB95EST30a59dd2021-11-02 17:25:18 +0000195 delete:
196 description: Delete a datanode for a given dataspace and anchor given a node xpath.
197 tags:
198 - cps-data
199 summary: Delete a data node
200 operationId: deleteDataNode
201 parameters:
202 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
203 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
204 - $ref: 'components.yml#/components/parameters/xpathInQuery'
205 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
206 responses:
207 '204':
208 $ref: 'components.yml#/components/responses/NoContent'
209 '400':
210 $ref: 'components.yml#/components/responses/BadRequest'
211 '401':
212 $ref: 'components.yml#/components/responses/Unauthorized'
213 '403':
214 $ref: 'components.yml#/components/responses/Forbidden'
215
216
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200217 put:
218 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
219 tags:
220 - cps-data
221 summary: Replace a node with descendants
222 operationId: replaceNode
223 parameters:
224 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
225 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
226 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100227 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200228 requestBody:
229 required: true
230 content:
231 application/json:
232 schema:
puthuparambil.aditya5d8b2412021-11-24 13:35:10 +0000233 type: object
234 examples:
235 dataSampleRequest:
236 $ref: 'components.yml#/components/examples/dataSampleRequest'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200237 responses:
238 '200':
239 $ref: 'components.yml#/components/responses/Ok'
240 '400':
241 $ref: 'components.yml#/components/responses/BadRequest'
242 '401':
243 $ref: 'components.yml#/components/responses/Unauthorized'
244 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100245 $ref: 'components.yml#/components/responses/Forbidden'