blob: ca21df53db983b9671fb596ecc2d600eddc047a0 [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
38 example: { "child": my_child,"leafList": "leafListElement1, leafListElement2", "leaf": my_leaf }
Rishi.Chail6d13f162021-01-26 05:58:39 +000039 '400':
40 $ref: 'components.yml#/components/responses/BadRequest'
41 '401':
42 $ref: 'components.yml#/components/responses/Unauthorized'
43 '403':
44 $ref: 'components.yml#/components/responses/Forbidden'
45 '404':
46 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000047 x-codegen-request-body-name: xpath
48
DylanB95ESTa79c9f12021-10-29 17:33:06 +010049listElementByDataspaceAndAnchor:
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030050 post:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010051 description: Add list element(s) to a list for a given anchor and dataspace
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030052 tags:
53 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010054 summary: Add list element(s)
55 operationId: addListElements
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030056 parameters:
57 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
58 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
59 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010060 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030061 requestBody:
62 required: true
63 content:
64 application/json:
65 schema:
66 type: string
67 responses:
68 '201':
69 $ref: 'components.yml#/components/responses/Created'
70 '400':
71 $ref: 'components.yml#/components/responses/BadRequest'
72 '401':
73 $ref: 'components.yml#/components/responses/Unauthorized'
74 '403':
75 $ref: 'components.yml#/components/responses/Forbidden'
76
Renu Kumari7edbeb62021-08-30 07:45:52 -040077 put:
DylanB95ESTa79c9f12021-10-29 17:33:06 +010078 description: Replace list content under a given parent, anchor and dataspace
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030079 tags:
80 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +010081 summary: Replace list content
82 operationId: replaceListContent
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030083 parameters:
84 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
85 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
86 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +010087 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030088 requestBody:
89 required: true
90 content:
91 application/json:
92 schema:
93 type: string
94 responses:
95 '200':
96 $ref: 'components.yml#/components/responses/Created'
97 '400':
98 $ref: 'components.yml#/components/responses/BadRequest'
99 '401':
100 $ref: 'components.yml#/components/responses/Unauthorized'
101 '403':
102 $ref: 'components.yml#/components/responses/Forbidden'
103
lukegleeson05701dd2021-08-18 09:49:32 +0100104 delete:
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100105 description: Delete one or all list element(s) for a given anchor and dataspace
lukegleeson05701dd2021-08-18 09:49:32 +0100106 tags:
107 - cps-data
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100108 summary: Delete one or all list element(s)
109 operationId: deleteListOrListElement
lukegleeson05701dd2021-08-18 09:49:32 +0100110 parameters:
111 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
112 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
113 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100114 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
lukegleeson05701dd2021-08-18 09:49:32 +0100115 responses:
116 '204':
117 $ref: 'components.yml#/components/responses/NoContent'
118 '400':
119 $ref: 'components.yml#/components/responses/BadRequest'
120 '401':
121 $ref: 'components.yml#/components/responses/Unauthorized'
122 '403':
123 $ref: 'components.yml#/components/responses/Forbidden'
124
Rishi.Chaildacc6632021-01-27 04:27:34 +0000125nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000126 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000127 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000128 tags:
129 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000130 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000131 operationId: createNode
132 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000133 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
134 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300135 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100136 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000137 requestBody:
138 required: true
139 content:
140 application/json:
141 schema:
142 type: string
143 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000144 '201':
145 $ref: 'components.yml#/components/responses/Created'
146 '400':
147 $ref: 'components.yml#/components/responses/BadRequest'
148 '401':
149 $ref: 'components.yml#/components/responses/Unauthorized'
150 '403':
151 $ref: 'components.yml#/components/responses/Forbidden'
niamhcore74753d92021-01-28 16:11:52 +0000152
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200153 patch:
154 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
155 tags:
156 - cps-data
157 summary: Update node leaves
158 operationId: updateNodeLeaves
159 parameters:
160 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
161 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
162 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100163 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200164 requestBody:
165 required: true
166 content:
167 application/json:
168 schema:
169 type: string
170 responses:
171 '200':
172 $ref: 'components.yml#/components/responses/Ok'
173 '400':
174 $ref: 'components.yml#/components/responses/BadRequest'
175 '401':
176 $ref: 'components.yml#/components/responses/Unauthorized'
177 '403':
178 $ref: 'components.yml#/components/responses/Forbidden'
179
180 put:
181 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
182 tags:
183 - cps-data
184 summary: Replace a node with descendants
185 operationId: replaceNode
186 parameters:
187 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
188 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
189 - $ref: 'components.yml#/components/parameters/xpathInQuery'
aditya puthuparambil673c6d92021-08-24 17:44:34 +0100190 - $ref: 'components.yml#/components/parameters/observedTimestampInQuery'
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200191 requestBody:
192 required: true
193 content:
194 application/json:
195 schema:
196 type: string
197 responses:
198 '200':
199 $ref: 'components.yml#/components/responses/Ok'
200 '400':
201 $ref: 'components.yml#/components/responses/BadRequest'
202 '401':
203 $ref: 'components.yml#/components/responses/Unauthorized'
204 '403':
DylanB95ESTa79c9f12021-10-29 17:33:06 +0100205 $ref: 'components.yml#/components/responses/Forbidden'