blob: 6cf975cfeb6526b5705c9ba7d257f4b44d53320b [file] [log] [blame]
tragait34a94b92021-03-30 12:02:27 +01001# ============LICENSE_START=======================================================
lukegleeson15b93e72021-07-07 15:25:30 +01002# Copyright (C) 2021 Nordix Foundation
3# Modifications Copyright (C) 2021 Pantheon.tech
Renu Kumari139e8222021-10-04 20:59:18 -04004# Modifications Copyright (C) 2021 Bell Canada
tragait34a94b92021-03-30 12:02:27 +01005# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
lukegleeson15b93e72021-07-07 15:25:30 +010011#
tragait34a94b92021-03-30 12:02:27 +010012# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# SPDX-License-Identifier: Apache-2.0
19# ============LICENSE_END=========================================================
20
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010021nodeByCmHandleAndXpath:
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020022 get:
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010023 description: Get a node with an option to retrieve all the children for a given cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +010024 deprecated: true
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020025 tags:
tragait34a94b92021-03-30 12:02:27 +010026 - network-cm-proxy
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010027 summary: Get a node given a cm Handle and xpath
28 operationId: getNodeByCmHandleAndXpath
29 parameters:
30 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
31 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
32 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020033 responses:
34 200:
35 $ref: 'components.yaml#/components/responses/Ok'
36 400:
37 $ref: 'components.yaml#/components/responses/BadRequest'
38 401:
39 $ref: 'components.yaml#/components/responses/Unauthorized'
40 403:
41 $ref: 'components.yaml#/components/responses/Forbidden'
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010042 404:
43 $ref: 'components.yaml#/components/responses/NotFound'
niamhcoreb5d573b2021-02-26 10:13:48 +000044
45nodesByCmHandleAndCpsPath:
46 get:
47 description: Query nodes for the given cps path and cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +010048 deprecated: true
niamhcoreb5d573b2021-02-26 10:13:48 +000049 tags:
tragait34a94b92021-03-30 12:02:27 +010050 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +000051 summary: Query data nodes
52 operationId: queryNodesByCmHandleAndCpsPath
53 parameters:
54 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
55 - $ref: 'components.yaml#/components/parameters/cpsPathInQuery'
niamhcore32446dc2021-03-01 13:25:13 +000056 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
niamhcoreb5d573b2021-02-26 10:13:48 +000057 responses:
58 200:
59 $ref: 'components.yaml#/components/responses/Ok'
60 400:
61 $ref: 'components.yaml#/components/responses/BadRequest'
62 401:
63 $ref: 'components.yaml#/components/responses/Unauthorized'
64 403:
65 $ref: 'components.yaml#/components/responses/Forbidden'
66 404:
67 $ref: 'components.yaml#/components/responses/NotFound'
68
69nodesByCmHandleAndXpath:
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +030070 post:
71 description: Create a node with descendants for the given CM Handle; top level or under existing node (requires xpath)
DylanB95EST4f4178c2021-07-02 13:30:42 +010072 deprecated: true
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +030073 tags:
74 - network-cm-proxy
75 summary: Create a node with descendants
76 operationId: createNode
77 parameters:
78 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
79 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
80 requestBody:
81 required: true
82 content:
83 application/json:
84 schema:
85 type: string
86 responses:
87 201:
88 $ref: 'components.yaml#/components/responses/Created'
89 400:
90 $ref: 'components.yaml#/components/responses/BadRequest'
91 401:
92 $ref: 'components.yaml#/components/responses/Unauthorized'
93 403:
94 $ref: 'components.yaml#/components/responses/Forbidden'
95 404:
96 $ref: 'components.yaml#/components/responses/NotFound'
97
niamhcoreb5d573b2021-02-26 10:13:48 +000098 patch:
99 description: Update node leaves for the given cps path and cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100100 deprecated: true
niamhcoreb5d573b2021-02-26 10:13:48 +0000101 tags:
tragait34a94b92021-03-30 12:02:27 +0100102 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000103 summary: Update node leaves
104 operationId: updateNodeLeaves
105 parameters:
106 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
107 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
108 requestBody:
109 required: true
110 content:
111 application/json:
112 schema:
113 type: string
114 responses:
115 200:
116 $ref: 'components.yaml#/components/responses/Ok'
117 400:
118 $ref: 'components.yaml#/components/responses/BadRequest'
119 401:
120 $ref: 'components.yaml#/components/responses/Unauthorized'
121 403:
122 $ref: 'components.yaml#/components/responses/Forbidden'
123 404:
124 $ref: 'components.yaml#/components/responses/NotFound'
125
126 put:
127 description: Replace a node with descendants for the given cps path and cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100128 deprecated: true
niamhcoreb5d573b2021-02-26 10:13:48 +0000129 tags:
tragait34a94b92021-03-30 12:02:27 +0100130 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000131 summary: Replace a node with descendants
132 operationId: replaceNode
133 parameters:
134 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
135 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
136 requestBody:
137 required: true
138 content:
139 application/json:
140 schema:
141 type: string
142 responses:
143 200:
144 $ref: 'components.yaml#/components/responses/Ok'
145 400:
146 $ref: 'components.yaml#/components/responses/BadRequest'
147 401:
148 $ref: 'components.yaml#/components/responses/Unauthorized'
149 403:
150 $ref: 'components.yaml#/components/responses/Forbidden'
151 404:
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300152 $ref: 'components.yaml#/components/responses/NotFound'
153
154listNodeByCmHandleAndXpath:
155 post:
156 description: Add one or more list-node child elements under existing node for the given CM Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100157 deprecated: true
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300158 tags:
159 - network-cm-proxy
160 summary: Add list-node child element(s)
161 operationId: addListNodeElements
162 parameters:
163 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
164 - $ref: 'components.yaml#/components/parameters/requiredXpathInQuery'
165 requestBody:
166 required: true
167 content:
168 application/json:
169 schema:
170 type: string
171 responses:
172 201:
173 $ref: 'components.yaml#/components/responses/Created'
174 400:
175 $ref: 'components.yaml#/components/responses/BadRequest'
176 401:
177 $ref: 'components.yaml#/components/responses/Unauthorized'
178 403:
179 $ref: 'components.yaml#/components/responses/Forbidden'
180 404:
lukegleeson15b93e72021-07-07 15:25:30 +0100181 $ref: 'components.yaml#/components/responses/NotFound'
DylanB95EST4f4178c2021-07-02 13:30:42 +0100182
tragaitc3285512021-08-16 15:12:36 +0100183getResourceDataForPassthroughOperational:
184 get:
185 tags:
186 - network-cm-proxy
187 summary: Get resource data from pass-through operational for cm handle
188 description: Get resource data from pass-through operational for given cm handle
189 operationId: getResourceDataOperationalForCmHandle
190 parameters:
191 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100192 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragaitc3285512021-08-16 15:12:36 +0100193 - $ref: 'components.yaml#/components/parameters/acceptParamInHeader'
tragaitabdff1b2021-10-06 11:04:18 +0100194 - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
tragaitc3285512021-08-16 15:12:36 +0100195 responses:
196 200:
emaclee844cab32021-12-01 09:42:37 +0000197 description: OK
198 content:
199 application/json:
200 schema:
201 type: object
202 examples:
203 dataSampleResponse:
204 $ref: 'components.yaml#/components/examples/dataSampleResponse'
tragaitc3285512021-08-16 15:12:36 +0100205 400:
206 $ref: 'components.yaml#/components/responses/BadRequest'
207 401:
208 $ref: 'components.yaml#/components/responses/Unauthorized'
209 403:
210 $ref: 'components.yaml#/components/responses/Forbidden'
211 404:
tragait888dcd42021-08-19 15:17:56 +0100212 $ref: 'components.yaml#/components/responses/NotFound'
213
214resourceDataForPassthroughRunning:
215 get:
216 tags:
217 - network-cm-proxy
218 summary: Get resource data from pass-through running for cm handle
219 description: Get resource data from pass-through running for given cm handle
220 operationId: getResourceDataRunningForCmHandle
221 parameters:
222 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100223 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragait888dcd42021-08-19 15:17:56 +0100224 - $ref: 'components.yaml#/components/parameters/acceptParamInHeader'
tragaitabdff1b2021-10-06 11:04:18 +0100225 - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
tragait888dcd42021-08-19 15:17:56 +0100226 responses:
227 200:
emaclee844cab32021-12-01 09:42:37 +0000228 description: OK
229 content:
230 application/json:
231 schema:
232 type: object
233 examples:
234 dataSampleResponse:
235 $ref: 'components.yaml#/components/examples/dataSampleResponse'
tragait888dcd42021-08-19 15:17:56 +0100236 400:
237 $ref: 'components.yaml#/components/responses/BadRequest'
238 401:
239 $ref: 'components.yaml#/components/responses/Unauthorized'
240 403:
241 $ref: 'components.yaml#/components/responses/Forbidden'
242 404:
tragaitc584bf22021-08-20 15:45:58 +0100243 $ref: 'components.yaml#/components/responses/NotFound'
244 post:
245 tags:
246 - network-cm-proxy
247 summary: create resource data from pass-through running for cm handle
248 description: create resource data from pass-through running for given cm handle
249 operationId: createResourceDataRunningForCmHandle
250 parameters:
251 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100252 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragaitc584bf22021-08-20 15:45:58 +0100253 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
254 requestBody:
255 required: true
256 content:
257 application/json:
258 schema:
tragait868eca12021-09-14 13:55:05 +0100259 type: string
emaclee844cab32021-12-01 09:42:37 +0000260 examples:
261 dataSampleRequest:
262 $ref: 'components.yaml#/components/examples/dataSampleRequest'
tragaitc584bf22021-08-20 15:45:58 +0100263 application/yang-data+json:
264 schema:
tragait868eca12021-09-14 13:55:05 +0100265 type: string
tragaitc584bf22021-08-20 15:45:58 +0100266 responses:
267 201:
268 $ref: 'components.yaml#/components/responses/Created'
269 400:
270 $ref: 'components.yaml#/components/responses/BadRequest'
271 401:
272 $ref: 'components.yaml#/components/responses/Unauthorized'
273 403:
274 $ref: 'components.yaml#/components/responses/Forbidden'
275 404:
niamhcorec309f242021-09-07 10:27:18 +0100276 $ref: 'components.yaml#/components/responses/NotFound'
277
niamhcore919e9062021-11-02 14:08:16 +0000278 put:
279 tags:
280 - network-cm-proxy
281 summary: Update resource data from pass-through running for a cm handle
282 description: Update resource data from pass-through running for the given cm handle
283 operationId: updateResourceDataRunningForCmHandle
284 parameters:
285 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
286 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
287 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
288 requestBody:
289 required: true
290 content:
291 application/json:
292 schema:
293 type: string
emaclee844cab32021-12-01 09:42:37 +0000294 examples:
295 dataSampleRequest:
296 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcore919e9062021-11-02 14:08:16 +0000297 application/yang-data+json:
298 schema:
299 type: string
300 responses:
301 200:
302 $ref: 'components.yaml#/components/responses/Ok'
303 400:
304 $ref: 'components.yaml#/components/responses/BadRequest'
305 401:
306 $ref: 'components.yaml#/components/responses/Unauthorized'
307 403:
308 $ref: 'components.yaml#/components/responses/Forbidden'
309 404:
310 $ref: 'components.yaml#/components/responses/NotFound'
311
niamhcore4314e7b2021-11-24 10:53:51 +0000312 patch:
313 tags:
314 - network-cm-proxy
315 summary: Patch resource data from pass-through running
316 description: Patch resource data from pass-through running for the given cm handle
317 operationId: patchResourceDataRunningForCmHandle
318 parameters:
319 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
320 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
321 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
322 requestBody:
323 required: true
324 content:
325 application/json:
326 schema:
327 type: object
328 responses:
329 200:
330 $ref: 'components.yaml#/components/responses/Ok'
331 400:
332 $ref: 'components.yaml#/components/responses/BadRequest'
333 401:
334 $ref: 'components.yaml#/components/responses/Unauthorized'
335 403:
336 $ref: 'components.yaml#/components/responses/Forbidden'
337 404:
338 $ref: 'components.yaml#/components/responses/NotFound'
339
niamhcorec309f242021-09-07 10:27:18 +0100340fetchModuleReferencesByCmHandle:
341 get:
342 description: fetch all module references (name and revision) for a given cm handle
343 tags:
344 - network-cm-proxy
345 summary: Fetch all module references (name and revision) for a given cm handle
346 operationId: getModuleReferencesByCmHandle
347 parameters:
348 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
349 responses:
350 200:
351 description: OK
352 content:
353 application/json:
354 schema:
emaclee844cab32021-12-01 09:42:37 +0000355 type: object
356 examples:
357 moduleReferencesResponse:
358 summary: Sample response
359 value:
360 - moduleName: my-module-name
361 revision: yyyy-mm-dd
362 - moduleName: my-module-name-2
363 revision: yyyy-mm-dd
niamhcorec309f242021-09-07 10:27:18 +0100364 400:
365 $ref: 'components.yaml#/components/responses/BadRequest'
366 401:
367 $ref: 'components.yaml#/components/responses/Unauthorized'
368 403:
369 $ref: 'components.yaml#/components/responses/Forbidden'
370 404:
niamhcore66017b42021-10-19 11:07:02 +0100371 $ref: 'components.yaml#/components/responses/NotFound'
372
373executeCmHandleSearch:
374 post:
375 description: Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names
376 tags:
377 - network-cm-proxy
378 summary: Execute cm handle search using the available conditions
379 operationId: executeCmHandleSearch
380 requestBody:
381 required: true
382 content:
383 application/json:
384 schema:
385 $ref: 'components.yaml#/components/schemas/Conditions'
386 responses:
387 200:
388 description: OK
389 content:
390 application/json:
391 schema:
392 $ref: 'components.yaml#/components/schemas/CmHandles'
393 400:
394 $ref: 'components.yaml#/components/responses/BadRequest'
395 401:
396 $ref: 'components.yaml#/components/responses/Unauthorized'
397 403:
398 $ref: 'components.yaml#/components/responses/Forbidden'