blob: 7845a34ad69669541f65efffaabbd7a0133429a4 [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:
puthuparambil.adityad0007332021-12-08 18:53:39 +000085 type: object
86 examples:
87 dataSampleRequest:
88 $ref: 'components.yaml#/components/examples/dataSampleRequest'
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +030089 responses:
90 201:
91 $ref: 'components.yaml#/components/responses/Created'
92 400:
93 $ref: 'components.yaml#/components/responses/BadRequest'
94 401:
95 $ref: 'components.yaml#/components/responses/Unauthorized'
96 403:
97 $ref: 'components.yaml#/components/responses/Forbidden'
98 404:
99 $ref: 'components.yaml#/components/responses/NotFound'
100
niamhcoreb5d573b2021-02-26 10:13:48 +0000101 patch:
102 description: Update node leaves for the given cps path and cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100103 deprecated: true
niamhcoreb5d573b2021-02-26 10:13:48 +0000104 tags:
tragait34a94b92021-03-30 12:02:27 +0100105 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000106 summary: Update node leaves
107 operationId: updateNodeLeaves
108 parameters:
109 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
110 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
111 requestBody:
112 required: true
113 content:
114 application/json:
115 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000116 type: object
117 examples:
118 dataSampleRequest:
119 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcoreb5d573b2021-02-26 10:13:48 +0000120 responses:
121 200:
122 $ref: 'components.yaml#/components/responses/Ok'
123 400:
124 $ref: 'components.yaml#/components/responses/BadRequest'
125 401:
126 $ref: 'components.yaml#/components/responses/Unauthorized'
127 403:
128 $ref: 'components.yaml#/components/responses/Forbidden'
129 404:
130 $ref: 'components.yaml#/components/responses/NotFound'
131
132 put:
133 description: Replace a node with descendants for the given cps path and cm Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100134 deprecated: true
niamhcoreb5d573b2021-02-26 10:13:48 +0000135 tags:
tragait34a94b92021-03-30 12:02:27 +0100136 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000137 summary: Replace a node with descendants
138 operationId: replaceNode
139 parameters:
140 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
141 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
142 requestBody:
143 required: true
144 content:
145 application/json:
146 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000147 type: object
148 examples:
149 dataSampleRequest:
150 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcoreb5d573b2021-02-26 10:13:48 +0000151 responses:
152 200:
153 $ref: 'components.yaml#/components/responses/Ok'
154 400:
155 $ref: 'components.yaml#/components/responses/BadRequest'
156 401:
157 $ref: 'components.yaml#/components/responses/Unauthorized'
158 403:
159 $ref: 'components.yaml#/components/responses/Forbidden'
160 404:
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300161 $ref: 'components.yaml#/components/responses/NotFound'
162
163listNodeByCmHandleAndXpath:
164 post:
165 description: Add one or more list-node child elements under existing node for the given CM Handle
DylanB95EST4f4178c2021-07-02 13:30:42 +0100166 deprecated: true
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300167 tags:
168 - network-cm-proxy
169 summary: Add list-node child element(s)
170 operationId: addListNodeElements
171 parameters:
172 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
173 - $ref: 'components.yaml#/components/parameters/requiredXpathInQuery'
174 requestBody:
175 required: true
176 content:
177 application/json:
178 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000179 type: object
180 examples:
181 dataSampleRequest:
182 $ref: 'components.yaml#/components/examples/dataSampleRequest'
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300183 responses:
184 201:
185 $ref: 'components.yaml#/components/responses/Created'
186 400:
187 $ref: 'components.yaml#/components/responses/BadRequest'
188 401:
189 $ref: 'components.yaml#/components/responses/Unauthorized'
190 403:
191 $ref: 'components.yaml#/components/responses/Forbidden'
192 404:
lukegleeson15b93e72021-07-07 15:25:30 +0100193 $ref: 'components.yaml#/components/responses/NotFound'
DylanB95EST4f4178c2021-07-02 13:30:42 +0100194
tragaitc3285512021-08-16 15:12:36 +0100195getResourceDataForPassthroughOperational:
196 get:
197 tags:
198 - network-cm-proxy
199 summary: Get resource data from pass-through operational for cm handle
200 description: Get resource data from pass-through operational for given cm handle
201 operationId: getResourceDataOperationalForCmHandle
202 parameters:
203 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100204 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragaitc3285512021-08-16 15:12:36 +0100205 - $ref: 'components.yaml#/components/parameters/acceptParamInHeader'
tragaitabdff1b2021-10-06 11:04:18 +0100206 - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
tragaitc3285512021-08-16 15:12:36 +0100207 responses:
208 200:
emaclee844cab32021-12-01 09:42:37 +0000209 description: OK
210 content:
211 application/json:
212 schema:
213 type: object
214 examples:
215 dataSampleResponse:
216 $ref: 'components.yaml#/components/examples/dataSampleResponse'
tragaitc3285512021-08-16 15:12:36 +0100217 400:
218 $ref: 'components.yaml#/components/responses/BadRequest'
219 401:
220 $ref: 'components.yaml#/components/responses/Unauthorized'
221 403:
222 $ref: 'components.yaml#/components/responses/Forbidden'
223 404:
tragait888dcd42021-08-19 15:17:56 +0100224 $ref: 'components.yaml#/components/responses/NotFound'
225
226resourceDataForPassthroughRunning:
227 get:
228 tags:
229 - network-cm-proxy
230 summary: Get resource data from pass-through running for cm handle
231 description: Get resource data from pass-through running for given cm handle
232 operationId: getResourceDataRunningForCmHandle
233 parameters:
234 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100235 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragait888dcd42021-08-19 15:17:56 +0100236 - $ref: 'components.yaml#/components/parameters/acceptParamInHeader'
tragaitabdff1b2021-10-06 11:04:18 +0100237 - $ref: 'components.yaml#/components/parameters/optionsParamInQuery'
tragait888dcd42021-08-19 15:17:56 +0100238 responses:
239 200:
emaclee844cab32021-12-01 09:42:37 +0000240 description: OK
241 content:
242 application/json:
243 schema:
244 type: object
245 examples:
246 dataSampleResponse:
247 $ref: 'components.yaml#/components/examples/dataSampleResponse'
tragait888dcd42021-08-19 15:17:56 +0100248 400:
249 $ref: 'components.yaml#/components/responses/BadRequest'
250 401:
251 $ref: 'components.yaml#/components/responses/Unauthorized'
252 403:
253 $ref: 'components.yaml#/components/responses/Forbidden'
254 404:
tragaitc584bf22021-08-20 15:45:58 +0100255 $ref: 'components.yaml#/components/responses/NotFound'
256 post:
257 tags:
258 - network-cm-proxy
259 summary: create resource data from pass-through running for cm handle
260 description: create resource data from pass-through running for given cm handle
261 operationId: createResourceDataRunningForCmHandle
262 parameters:
263 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
niamhcorefd2e6dd2021-09-29 16:43:35 +0100264 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
tragaitc584bf22021-08-20 15:45:58 +0100265 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
266 requestBody:
267 required: true
268 content:
269 application/json:
270 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000271 type: object
emaclee844cab32021-12-01 09:42:37 +0000272 examples:
273 dataSampleRequest:
274 $ref: 'components.yaml#/components/examples/dataSampleRequest'
tragaitc584bf22021-08-20 15:45:58 +0100275 application/yang-data+json:
276 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000277 type: object
278 examples:
279 dataSampleRequest:
280 $ref: 'components.yaml#/components/examples/dataSampleRequest'
tragaitc584bf22021-08-20 15:45:58 +0100281 responses:
282 201:
283 $ref: 'components.yaml#/components/responses/Created'
284 400:
285 $ref: 'components.yaml#/components/responses/BadRequest'
286 401:
287 $ref: 'components.yaml#/components/responses/Unauthorized'
288 403:
289 $ref: 'components.yaml#/components/responses/Forbidden'
290 404:
niamhcorec309f242021-09-07 10:27:18 +0100291 $ref: 'components.yaml#/components/responses/NotFound'
292
niamhcore919e9062021-11-02 14:08:16 +0000293 put:
294 tags:
295 - network-cm-proxy
296 summary: Update resource data from pass-through running for a cm handle
297 description: Update resource data from pass-through running for the given cm handle
298 operationId: updateResourceDataRunningForCmHandle
299 parameters:
300 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
301 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
302 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
303 requestBody:
304 required: true
305 content:
306 application/json:
307 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000308 type: object
emaclee844cab32021-12-01 09:42:37 +0000309 examples:
310 dataSampleRequest:
311 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcore919e9062021-11-02 14:08:16 +0000312 application/yang-data+json:
313 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000314 type: object
315 examples:
316 dataSampleRequest:
317 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcore919e9062021-11-02 14:08:16 +0000318 responses:
319 200:
320 $ref: 'components.yaml#/components/responses/Ok'
321 400:
322 $ref: 'components.yaml#/components/responses/BadRequest'
323 401:
324 $ref: 'components.yaml#/components/responses/Unauthorized'
325 403:
326 $ref: 'components.yaml#/components/responses/Forbidden'
327 404:
328 $ref: 'components.yaml#/components/responses/NotFound'
329
niamhcore4314e7b2021-11-24 10:53:51 +0000330 patch:
331 tags:
332 - network-cm-proxy
333 summary: Patch resource data from pass-through running
334 description: Patch resource data from pass-through running for the given cm handle
335 operationId: patchResourceDataRunningForCmHandle
336 parameters:
337 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
338 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
339 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
340 requestBody:
341 required: true
342 content:
343 application/json:
344 schema:
345 type: object
puthuparambil.adityad0007332021-12-08 18:53:39 +0000346 examples:
347 dataSampleRequest:
348 $ref: 'components.yaml#/components/examples/dataSampleRequest'
niamhcore4314e7b2021-11-24 10:53:51 +0000349 responses:
350 200:
351 $ref: 'components.yaml#/components/responses/Ok'
352 400:
353 $ref: 'components.yaml#/components/responses/BadRequest'
354 401:
355 $ref: 'components.yaml#/components/responses/Unauthorized'
356 403:
357 $ref: 'components.yaml#/components/responses/Forbidden'
358 404:
359 $ref: 'components.yaml#/components/responses/NotFound'
360
DylanB95ESTeeef2ae2021-11-30 15:07:35 +0000361 delete:
362 tags:
363 - network-cm-proxy
364 summary: Delete resource data
365 description: Delete resource data from pass-through running for a given cm handle
366 operationId: deleteResourceDataRunningForCmHandle
367 parameters:
368 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
369 - $ref: 'components.yaml#/components/parameters/resourceIdentifierInQuery'
370 - $ref: 'components.yaml#/components/parameters/contentParamInHeader'
DylanB95ESTeeef2ae2021-11-30 15:07:35 +0000371 responses:
372 204:
373 $ref: 'components.yaml#/components/responses/NoContent'
374 400:
375 $ref: 'components.yaml#/components/responses/BadRequest'
376 401:
377 $ref: 'components.yaml#/components/responses/Unauthorized'
378 403:
379 $ref: 'components.yaml#/components/responses/Forbidden'
380 404:
381 $ref: 'components.yaml#/components/responses/NotFound'
382
383
niamhcorec309f242021-09-07 10:27:18 +0100384fetchModuleReferencesByCmHandle:
385 get:
386 description: fetch all module references (name and revision) for a given cm handle
387 tags:
388 - network-cm-proxy
389 summary: Fetch all module references (name and revision) for a given cm handle
390 operationId: getModuleReferencesByCmHandle
391 parameters:
392 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
393 responses:
394 200:
395 description: OK
396 content:
397 application/json:
398 schema:
puthuparambil.adityad0007332021-12-08 18:53:39 +0000399 type: array
400 items:
401 $ref: 'components.yaml#/components/schemas/ModuleReference'
niamhcorec309f242021-09-07 10:27:18 +0100402 400:
403 $ref: 'components.yaml#/components/responses/BadRequest'
404 401:
405 $ref: 'components.yaml#/components/responses/Unauthorized'
406 403:
407 $ref: 'components.yaml#/components/responses/Forbidden'
408 404:
niamhcore66017b42021-10-19 11:07:02 +0100409 $ref: 'components.yaml#/components/responses/NotFound'
410
411executeCmHandleSearch:
412 post:
413 description: Execute cm handle searches using 'hasAllModules' condition to get all cm handles for the given module names
414 tags:
415 - network-cm-proxy
416 summary: Execute cm handle search using the available conditions
417 operationId: executeCmHandleSearch
418 requestBody:
419 required: true
420 content:
421 application/json:
422 schema:
423 $ref: 'components.yaml#/components/schemas/Conditions'
424 responses:
425 200:
426 description: OK
427 content:
428 application/json:
429 schema:
430 $ref: 'components.yaml#/components/schemas/CmHandles'
431 400:
432 $ref: 'components.yaml#/components/responses/BadRequest'
433 401:
434 $ref: 'components.yaml#/components/responses/Unauthorized'
435 403:
ToineSiebelink18a79eb2021-12-23 12:36:40 +0000436 $ref: 'components.yaml#/components/responses/Forbidden'