blob: fb21f757a0b012d1fa3f4de375068b294b2ab7ee [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':
31 $ref: 'components.yml#/components/responses/Ok'
32 '400':
33 $ref: 'components.yml#/components/responses/BadRequest'
34 '401':
35 $ref: 'components.yml#/components/responses/Unauthorized'
36 '403':
37 $ref: 'components.yml#/components/responses/Forbidden'
38 '404':
39 $ref: 'components.yml#/components/responses/NotFound'
puthuparambil.aditya001e7732021-01-13 12:06:20 +000040 x-codegen-request-body-name: xpath
41
Ruslan Kashapov0905ac12021-05-05 13:11:50 +030042listNodeByDataspaceAndAnchor:
43 post:
44 description: Add list-node child elements to existing node for a given anchor and dataspace
45 tags:
46 - cps-data
47 summary: Add list-node child element(s) under existing parent node
48 operationId: addListNodeElements
49 parameters:
50 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
51 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
52 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
53 requestBody:
54 required: true
55 content:
56 application/json:
57 schema:
58 type: string
59 responses:
60 '201':
61 $ref: 'components.yml#/components/responses/Created'
62 '400':
63 $ref: 'components.yml#/components/responses/BadRequest'
64 '401':
65 $ref: 'components.yml#/components/responses/Unauthorized'
66 '403':
67 $ref: 'components.yml#/components/responses/Forbidden'
68
Ruslan Kashapov576f48e2021-05-14 14:41:05 +030069 patch:
70 description: Replace list-node child elements under existing node for a given anchor and dataspace
71 tags:
72 - cps-data
73 summary: Replace list-node child element(s) under existing parent node
74 operationId: replaceListNodeElements
75 parameters:
76 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
77 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
78 - $ref: 'components.yml#/components/parameters/requiredXpathInQuery'
79 requestBody:
80 required: true
81 content:
82 application/json:
83 schema:
84 type: string
85 responses:
86 '200':
87 $ref: 'components.yml#/components/responses/Created'
88 '400':
89 $ref: 'components.yml#/components/responses/BadRequest'
90 '401':
91 $ref: 'components.yml#/components/responses/Unauthorized'
92 '403':
93 $ref: 'components.yml#/components/responses/Forbidden'
94
Rishi.Chaildacc6632021-01-27 04:27:34 +000095nodesByDataspaceAndAnchor:
niamhcore74753d92021-01-28 16:11:52 +000096 post:
Rishi.Chail6d13f162021-01-26 05:58:39 +000097 description: Create a node for a given anchor and dataspace
niamhcore74753d92021-01-28 16:11:52 +000098 tags:
99 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000100 summary: Create a node
niamhcore74753d92021-01-28 16:11:52 +0000101 operationId: createNode
102 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000103 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
104 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
Ruslan Kashapov24bf3502021-04-19 12:40:01 +0300105 - $ref: 'components.yml#/components/parameters/xpathInQuery'
niamhcore74753d92021-01-28 16:11:52 +0000106 requestBody:
107 required: true
108 content:
109 application/json:
110 schema:
111 type: string
112 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000113 '201':
114 $ref: 'components.yml#/components/responses/Created'
115 '400':
116 $ref: 'components.yml#/components/responses/BadRequest'
117 '401':
118 $ref: 'components.yml#/components/responses/Unauthorized'
119 '403':
120 $ref: 'components.yml#/components/responses/Forbidden'
niamhcore74753d92021-01-28 16:11:52 +0000121
Ruslan Kashapov24c72db2021-02-09 17:25:18 +0200122 patch:
123 description: Update a data node leaves for a given dataspace and anchor and a parent node xpath
124 tags:
125 - cps-data
126 summary: Update node leaves
127 operationId: updateNodeLeaves
128 parameters:
129 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
130 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
131 - $ref: 'components.yml#/components/parameters/xpathInQuery'
132 requestBody:
133 required: true
134 content:
135 application/json:
136 schema:
137 type: string
138 responses:
139 '200':
140 $ref: 'components.yml#/components/responses/Ok'
141 '400':
142 $ref: 'components.yml#/components/responses/BadRequest'
143 '401':
144 $ref: 'components.yml#/components/responses/Unauthorized'
145 '403':
146 $ref: 'components.yml#/components/responses/Forbidden'
147
148 put:
149 description: Replace a node with descendants for a given dataspace, anchor and a parent node xpath
150 tags:
151 - cps-data
152 summary: Replace a node with descendants
153 operationId: replaceNode
154 parameters:
155 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
156 - $ref: 'components.yml#/components/parameters/anchorNameInPath'
157 - $ref: 'components.yml#/components/parameters/xpathInQuery'
158 requestBody:
159 required: true
160 content:
161 application/json:
162 schema:
163 type: string
164 responses:
165 '200':
166 $ref: 'components.yml#/components/responses/Ok'
167 '400':
168 $ref: 'components.yml#/components/responses/BadRequest'
169 '401':
170 $ref: 'components.yml#/components/responses/Unauthorized'
171 '403':
172 $ref: 'components.yml#/components/responses/Forbidden'
173
174
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000175nodesByDataspace:
176 get:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000177 description: Get all nodes for a given dataspace using an xpath or schema node identifier - DRAFT
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000178 tags:
179 - cps-data
Rishi.Chail6d13f162021-01-26 05:58:39 +0000180 summary: Get nodes
181 operationId: getNodesByDataspace
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000182 parameters:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000183 - $ref: 'components.yml#/components/parameters/dataspaceNameInPath'
puthuparambil.aditya001e7732021-01-13 12:06:20 +0000184 responses:
Rishi.Chail6d13f162021-01-26 05:58:39 +0000185 '200':
186 $ref: 'components.yml#/components/responses/Ok'
187 '400':
188 $ref: 'components.yml#/components/responses/BadRequest'
189 '401':
190 $ref: 'components.yml#/components/responses/Unauthorized'
191 '403':
192 $ref: 'components.yml#/components/responses/Forbidden'
193 '404':
194 $ref: 'components.yml#/components/responses/NotFound'
195 x-codegen-request-body-name: requestBody