blob: 6ed4f0223768df6f7823f3246c4d27ab63a104d0 [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
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
lukegleeson15b93e72021-07-07 15:25:30 +010010#
tragait34a94b92021-03-30 12:02:27 +010011# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010020nodeByCmHandleAndXpath:
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020021 get:
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010022 description: Get a node with an option to retrieve all the children for a given cm Handle
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020023 tags:
tragait34a94b92021-03-30 12:02:27 +010024 - network-cm-proxy
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010025 summary: Get a node given a cm Handle and xpath
26 operationId: getNodeByCmHandleAndXpath
27 parameters:
28 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
29 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
30 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
Ruslan Kashapov9f52f602021-01-22 12:53:01 +020031 responses:
32 200:
33 $ref: 'components.yaml#/components/responses/Ok'
34 400:
35 $ref: 'components.yaml#/components/responses/BadRequest'
36 401:
37 $ref: 'components.yaml#/components/responses/Unauthorized'
38 403:
39 $ref: 'components.yaml#/components/responses/Forbidden'
Hanif Kukkalli83e318f2021-02-23 12:26:39 +010040 404:
41 $ref: 'components.yaml#/components/responses/NotFound'
niamhcoreb5d573b2021-02-26 10:13:48 +000042
43nodesByCmHandleAndCpsPath:
44 get:
45 description: Query nodes for the given cps path and cm Handle
46 tags:
tragait34a94b92021-03-30 12:02:27 +010047 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +000048 summary: Query data nodes
49 operationId: queryNodesByCmHandleAndCpsPath
50 parameters:
51 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
52 - $ref: 'components.yaml#/components/parameters/cpsPathInQuery'
niamhcore32446dc2021-03-01 13:25:13 +000053 - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
niamhcoreb5d573b2021-02-26 10:13:48 +000054 responses:
55 200:
56 $ref: 'components.yaml#/components/responses/Ok'
57 400:
58 $ref: 'components.yaml#/components/responses/BadRequest'
59 401:
60 $ref: 'components.yaml#/components/responses/Unauthorized'
61 403:
62 $ref: 'components.yaml#/components/responses/Forbidden'
63 404:
64 $ref: 'components.yaml#/components/responses/NotFound'
65
66nodesByCmHandleAndXpath:
Ruslan Kashapovd07ebc82021-04-20 11:14:30 +030067 post:
68 description: Create a node with descendants for the given CM Handle; top level or under existing node (requires xpath)
69 tags:
70 - network-cm-proxy
71 summary: Create a node with descendants
72 operationId: createNode
73 parameters:
74 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
75 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
76 requestBody:
77 required: true
78 content:
79 application/json:
80 schema:
81 type: string
82 responses:
83 201:
84 $ref: 'components.yaml#/components/responses/Created'
85 400:
86 $ref: 'components.yaml#/components/responses/BadRequest'
87 401:
88 $ref: 'components.yaml#/components/responses/Unauthorized'
89 403:
90 $ref: 'components.yaml#/components/responses/Forbidden'
91 404:
92 $ref: 'components.yaml#/components/responses/NotFound'
93
niamhcoreb5d573b2021-02-26 10:13:48 +000094 patch:
95 description: Update node leaves for the given cps path and cm Handle
96 tags:
tragait34a94b92021-03-30 12:02:27 +010097 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +000098 summary: Update node leaves
99 operationId: updateNodeLeaves
100 parameters:
101 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
102 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
103 requestBody:
104 required: true
105 content:
106 application/json:
107 schema:
108 type: string
109 responses:
110 200:
111 $ref: 'components.yaml#/components/responses/Ok'
112 400:
113 $ref: 'components.yaml#/components/responses/BadRequest'
114 401:
115 $ref: 'components.yaml#/components/responses/Unauthorized'
116 403:
117 $ref: 'components.yaml#/components/responses/Forbidden'
118 404:
119 $ref: 'components.yaml#/components/responses/NotFound'
120
121 put:
122 description: Replace a node with descendants for the given cps path and cm Handle
123 tags:
tragait34a94b92021-03-30 12:02:27 +0100124 - network-cm-proxy
niamhcoreb5d573b2021-02-26 10:13:48 +0000125 summary: Replace a node with descendants
126 operationId: replaceNode
127 parameters:
128 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
129 - $ref: 'components.yaml#/components/parameters/xpathInQuery'
130 requestBody:
131 required: true
132 content:
133 application/json:
134 schema:
135 type: string
136 responses:
137 200:
138 $ref: 'components.yaml#/components/responses/Ok'
139 400:
140 $ref: 'components.yaml#/components/responses/BadRequest'
141 401:
142 $ref: 'components.yaml#/components/responses/Unauthorized'
143 403:
144 $ref: 'components.yaml#/components/responses/Forbidden'
145 404:
Ruslan Kashapov1baf48d2021-05-07 10:46:27 +0300146 $ref: 'components.yaml#/components/responses/NotFound'
147
148listNodeByCmHandleAndXpath:
149 post:
150 description: Add one or more list-node child elements under existing node for the given CM Handle
151 tags:
152 - network-cm-proxy
153 summary: Add list-node child element(s)
154 operationId: addListNodeElements
155 parameters:
156 - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
157 - $ref: 'components.yaml#/components/parameters/requiredXpathInQuery'
158 requestBody:
159 required: true
160 content:
161 application/json:
162 schema:
163 type: string
164 responses:
165 201:
166 $ref: 'components.yaml#/components/responses/Created'
167 400:
168 $ref: 'components.yaml#/components/responses/BadRequest'
169 401:
170 $ref: 'components.yaml#/components/responses/Unauthorized'
171 403:
172 $ref: 'components.yaml#/components/responses/Forbidden'
173 404:
lukegleeson15b93e72021-07-07 15:25:30 +0100174 $ref: 'components.yaml#/components/responses/NotFound'