blob: 00e0cc78f82c3beeca108da916426bba061c67e7 [file] [log] [blame]
tragait34a94b92021-03-30 12:02:27 +01001# ============LICENSE_START=======================================================
2# Modification (C) 2021 Nordix Foundation
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +03003# Modification (C) 2021 Pantheon.tech
tragait34a94b92021-03-30 12:02:27 +01004# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
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#
16# SPDX-License-Identifier: Apache-2.0
17# ============LICENSE_END=========================================================
18
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010019nodeByCmHandleAndXpath:
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020020 get:
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010021 description: Get a node with an option to retrieve all the children for a given cm Handle
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020022 tags:
tragait34a94b92021-03-30 12:02:27 +010023 - network-cm-proxy
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010024 summary: Get a node given a cm Handle and xpath
25 operationId: getNodeByCmHandleAndXpath
26 parameters:
27 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
28 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
29 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020030 responses:
31 200:
32 $ref: 'components.yaml#/components/responses/Ok'
33 400:
34 $ref: 'components.yaml#/components/responses/BadRequest'
35 401:
36 $ref: 'components.yaml#/components/responses/Unauthorized'
37 403:
38 $ref: 'components.yaml#/components/responses/Forbidden'
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010039 404:
40 $ref: 'components.yaml#/components/responses/NotFound'
niamhcoreb5d573b2021-02-26 10:13:48 +000041
42nodesByCmHandleAndCpsPath:
43 get:
44 description: Query nodes for the given cps path and cm Handle
45 tags:
tragait34a94b92021-03-30 12:02:27 +010046 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +000047 summary: Query data nodes
48 operationId: queryNodesByCmHandleAndCpsPath
49 parameters:
50 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
51 - $ref: 'components.yaml#/components/parameters/cpsPathInQuery'
niamhcore32446dc2021-03-01 13:25:13 +000052 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
niamhcoreb5d573b2021-02-26 10:13:48 +000053 responses:
54 200:
55 $ref: 'components.yaml#/components/responses/Ok'
56 400:
57 $ref: 'components.yaml#/components/responses/BadRequest'
58 401:
59 $ref: 'components.yaml#/components/responses/Unauthorized'
60 403:
61 $ref: 'components.yaml#/components/responses/Forbidden'
62 404:
63 $ref: 'components.yaml#/components/responses/NotFound'
64
65nodesByCmHandleAndXpath:
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +030066 post:
67 description: Create a node with descendants for the given CM Handle; top level or under existing node (requires xpath)
68 tags:
69 - network-cm-proxy
70 summary: Create a node with descendants
71 operationId: createNode
72 parameters:
73 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
74 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
75 requestBody:
76 required: true
77 content:
78 application/json:
79 schema:
80 type: string
81 responses:
82 201:
83 $ref: 'components.yaml#/components/responses/Created'
84 400:
85 $ref: 'components.yaml#/components/responses/BadRequest'
86 401:
87 $ref: 'components.yaml#/components/responses/Unauthorized'
88 403:
89 $ref: 'components.yaml#/components/responses/Forbidden'
90 404:
91 $ref: 'components.yaml#/components/responses/NotFound'
92
niamhcoreb5d573b2021-02-26 10:13:48 +000093 patch:
94 description: Update node leaves for the given cps path and cm Handle
95 tags:
tragait34a94b92021-03-30 12:02:27 +010096 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +000097 summary: Update node leaves
98 operationId: updateNodeLeaves
99 parameters:
100 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
101 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
102 requestBody:
103 required: true
104 content:
105 application/json:
106 schema:
107 type: string
108 responses:
109 200:
110 $ref: 'components.yaml#/components/responses/Ok'
111 400:
112 $ref: 'components.yaml#/components/responses/BadRequest'
113 401:
114 $ref: 'components.yaml#/components/responses/Unauthorized'
115 403:
116 $ref: 'components.yaml#/components/responses/Forbidden'
117 404:
118 $ref: 'components.yaml#/components/responses/NotFound'
119
120 put:
121 description: Replace a node with descendants for the given cps path and cm Handle
122 tags:
tragait34a94b92021-03-30 12:02:27 +0100123 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000124 summary: Replace a node with descendants
125 operationId: replaceNode
126 parameters:
127 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
128 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
129 requestBody:
130 required: true
131 content:
132 application/json:
133 schema:
134 type: string
135 responses:
136 200:
137 $ref: 'components.yaml#/components/responses/Ok'
138 400:
139 $ref: 'components.yaml#/components/responses/BadRequest'
140 401:
141 $ref: 'components.yaml#/components/responses/Unauthorized'
142 403:
143 $ref: 'components.yaml#/components/responses/Forbidden'
144 404:
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300145 $ref: 'components.yaml#/components/responses/NotFound'
146
147listNodeByCmHandleAndXpath:
148 post:
149 description: Add one or more list-node child elements under existing node for the given CM Handle
150 tags:
151 - network-cm-proxy
152 summary: Add list-node child element(s)
153 operationId: addListNodeElements
154 parameters:
155 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
156 - $ref: 'components.yaml#/components/parameters/requiredXpathInQuery'
157 requestBody:
158 required: true
159 content:
160 application/json:
161 schema:
162 type: string
163 responses:
164 201:
165 $ref: 'components.yaml#/components/responses/Created'
166 400:
167 $ref: 'components.yaml#/components/responses/BadRequest'
168 401:
169 $ref: 'components.yaml#/components/responses/Unauthorized'
170 403:
171 $ref: 'components.yaml#/components/responses/Forbidden'
172 404:
niamhcoreb5d573b2021-02-26 10:13:48 +0000173 $ref: 'components.yaml#/components/responses/NotFound'