2a70d70a6df39bcecd5237e302f1372af9d7ce14
[cps.git] / cps-ncmp-rest / docs / openapi / ncmproxy.yml
1 #  ============LICENSE_START=======================================================
2 #  Modification (C) 2021 Nordix Foundation
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 #  Unless required by applicable law or agreed to in writing, software
10 #  distributed under the License is distributed on an "AS IS" BASIS,
11 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #  See the License for the specific language governing permissions and
13 #  limitations under the License.
14 #
15 #  SPDX-License-Identifier: Apache-2.0
16 #  ============LICENSE_END=========================================================
17
18 nodeByCmHandleAndXpath:
19   get:
20     description: Get a node with an option to retrieve all the children for a given cm Handle
21     tags:
22       - network-cm-proxy
23     summary: Get a node given a cm Handle and xpath
24     operationId: getNodeByCmHandleAndXpath
25     parameters:
26       - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
27       - $ref: 'components.yaml#/components/parameters/xpathInQuery'
28       - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
29     responses:
30       200:
31         $ref: 'components.yaml#/components/responses/Ok'
32       400:
33         $ref: 'components.yaml#/components/responses/BadRequest'
34       401:
35         $ref: 'components.yaml#/components/responses/Unauthorized'
36       403:
37         $ref: 'components.yaml#/components/responses/Forbidden'
38       404:
39         $ref: 'components.yaml#/components/responses/NotFound'
40       501:
41         $ref: 'components.yaml#/components/responses/NotImplemented'
42
43 nodesByCmHandleAndCpsPath:
44   get:
45     description: Query nodes for the given cps path and cm Handle
46     tags:
47       - network-cm-proxy
48     summary: Query data nodes
49     operationId: queryNodesByCmHandleAndCpsPath
50     parameters:
51       - $ref: 'components.yaml#/components/parameters/cmHandleInPath'
52       - $ref: 'components.yaml#/components/parameters/cpsPathInQuery'
53       - $ref: 'components.yaml#/components/parameters/includeDescendantsOptionInQuery'
54     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
66 nodesByCmHandleAndXpath:
67   patch:
68     description: Update node leaves for the given cps path and cm Handle
69     tags:
70       - network-cm-proxy
71     summary: Update node leaves
72     operationId: updateNodeLeaves
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       200:
84         $ref: 'components.yaml#/components/responses/Ok'
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
94   put:
95     description: Replace a node with descendants for the given cps path and cm Handle
96     tags:
97       - network-cm-proxy
98     summary: Replace a node with descendants
99     operationId: replaceNode
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'