blob: 7e9f71d62b771ba2cf9c17793661a4c08a21d4d7 [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.
15# ============LICENSE_END=========================================================
16
Rishi.Chaildacc6632021-01-27 04:27:34 +000017nodeByDataspaceAndAnchor:
puthuparambil.aditya001e7732021-01-13 12:06:20 +000018 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +000019 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 +000020 tags:
21 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +000022 summary: Get a node
puthuparambil.aditya001e7732021-01-13 12:06:20 +000023 operationId: getNodeByDataspaceAndAnchor
24 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +000025 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
26 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
27 - $ref: 'components.yml#/components/parameters/xpathInQuery'
28 - $ref: 'components.yml#/components/parameters/includeDescendantsOptionInQuery'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000029 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +000030 '200':
JosephKeenan2472e612021-06-23 14:15:52 +010031 description: OK
32 content:
33 application/json:
34 schema:
35 type: object
36 example: { "child": my_child,"leafList": "leafListElement1, leafListElement2", "leaf": my_leaf }
Rishi.Chail6d13f162021-01-26 05:58:39 +000037 '400':
38 $ref: 'components.yml#/components/responses/BadRequest'
39 '401':
40 $ref: 'components.yml#/components/responses/Unauthorized'
41 '403':
42 $ref: 'components.yml#/components/responses/Forbidden'
43 '404':
44 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000045 x-codegen-request-body-name: xpath
46
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030047listNodeByDataspaceAndAnchor:
48 post:
49 description: Add list-node child elements to existing node for a given anchor and dataspace
50 tags:
51 - cps-data
52 summary: Add list-node child element(s) under existing parent node
53 operationId: addListNodeElements
54 parameters:
55 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
56 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
57 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
58 requestBody:
59 required: true
60 content:
61 application/json:
62 schema:
63 type: string
64 responses:
65 '201':
66 $ref: 'components.yml#/components/responses/Created'
67 '400':
68 $ref: 'components.yml#/components/responses/BadRequest'
69 '401':
70 $ref: 'components.yml#/components/responses/Unauthorized'
71 '403':
72 $ref: 'components.yml#/components/responses/Forbidden'
73
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030074 patch:
75 description: Replace list-node child elements under existing node for a given anchor and dataspace
76 tags:
77 - cps-data
78 summary: Replace list-node child element(s) under existing parent node
79 operationId: replaceListNodeElements
80 parameters:
81 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
82 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
83 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
84 requestBody:
85 required: true
86 content:
87 application/json:
88 schema:
89 type: string
90 responses:
91 '200':
92 $ref: 'components.yml#/components/responses/Created'
93 '400':
94 $ref: 'components.yml#/components/responses/BadRequest'
95 '401':
96 $ref: 'components.yml#/components/responses/Unauthorized'
97 '403':
98 $ref: 'components.yml#/components/responses/Forbidden'
99
Rishi.Chaildacc6632021-01-27 04:27:34 +0000100nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +0000101 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000102 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +0000103 tags:
104 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000105 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000106 operationId: createNode
107 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000108 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
109 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300110 - $ref: 'components.yml#/components/parameters/xpathInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000111 requestBody:
112 required: true
113 content:
114 application/json:
115 schema:
116 type: string
117 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000118 '201':
119 $ref: 'components.yml#/components/responses/Created'
120 '400':
121 $ref: 'components.yml#/components/responses/BadRequest'
122 '401':
123 $ref: 'components.yml#/components/responses/Unauthorized'
124 '403':
125 $ref: 'components.yml#/components/responses/Forbidden'
niamhcore74753d92021-01-28 16:11:52 +0000126
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200127 patch:
128 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
129 tags:
130 - cps-data
131 summary: Update node leaves
132 operationId: updateNodeLeaves
133 parameters:
134 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
135 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
136 - $ref: 'components.yml#/components/parameters/xpathInQuery'
137 requestBody:
138 required: true
139 content:
140 application/json:
141 schema:
142 type: string
143 responses:
144 '200':
145 $ref: 'components.yml#/components/responses/Ok'
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'
152
153 put:
154 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
155 tags:
156 - cps-data
157 summary: Replace a node with descendants
158 operationId: replaceNode
159 parameters:
160 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
161 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
162 - $ref: 'components.yml#/components/parameters/xpathInQuery'
163 requestBody:
164 required: true
165 content:
166 application/json:
167 schema:
168 type: string
169 responses:
170 '200':
171 $ref: 'components.yml#/components/responses/Ok'
172 '400':
173 $ref: 'components.yml#/components/responses/BadRequest'
174 '401':
175 $ref: 'components.yml#/components/responses/Unauthorized'
176 '403':
177 $ref: 'components.yml#/components/responses/Forbidden'
178
179
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000180nodesByDataspace:
181 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000182 description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000183 tags:
184 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000185 summary: Get nodes
186 operationId: getNodesByDataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000187 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000188 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000189 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000190 '200':
191 $ref: 'components.yml#/components/responses/Ok'
192 '400':
193 $ref: 'components.yml#/components/responses/BadRequest'
194 '401':
195 $ref: 'components.yml#/components/responses/Unauthorized'
196 '403':
197 $ref: 'components.yml#/components/responses/Forbidden'
198 '404':
199 $ref: 'components.yml#/components/responses/NotFound'
200 x-codegen-request-body-name: requestBody