a3b9dc75015c8defa2c3c78098d7926ddff53fe7
[cps.git] / docs / api / swagger / ncmp / openapi.yaml
1 openapi: 3.0.1
2 info:
3   title: NCMP to CPS Proxy API
4   description: NCMP to CPS Proxy API
5   version: "1.0"
6 servers:
7   - url: /ncmp
8 paths:
9   /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-operational:
10     get:
11       tags:
12         - network-cm-proxy
13       summary: Get resource data from pass-through operational for cm handle
14       description: Get resource data from pass-through operational for given cm handle
15       operationId: getResourceDataOperationalForCmHandle
16       parameters:
17         - name: cm-handle
18           in: path
19           description: "The identifier for a network function, network element, subnetwork\
20           \ or any other cm object by managed Network CM Proxy"
21           required: true
22           schema:
23             type: string
24         - name: resourceIdentifier
25           in: query
26           description: The format of resource identifier depend on the associated DMI
27             Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
28             it can really be anything.
29           required: true
30           allowReserved: true
31           schema:
32             type: string
33           examples:
34             sample1:
35               value:
36                 resourceIdentifier: \parent\child
37             sample2:
38               value:
39                 resourceIdentifier: "\\parent\\listElement[key=value]"
40             sample3:
41               value:
42                 resourceIdentifier: "\\parent\\listElement[key=value]\\grandChild"
43             sample4:
44               value:
45                 resourceIdentifier: "parent=1,child=abc"
46         - name: Accept
47           in: header
48           description: "Accept parameter for response, if accept parameter is null,\
49           \ that means client can accept any format."
50           required: false
51           schema:
52             type: string
53             enum:
54               - application/json
55               - application/yang-data+json
56         - name: options
57           in: query
58           description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
59           \ in parenthesis'()'."
60           required: false
61           allowReserved: true
62           schema:
63             type: string
64           examples:
65             sample1:
66               value:
67                 options: "(key1=value1,key2=value2)"
68             sample2:
69               value:
70                 options: "(key1=value1,key2=value1/value2)"
71             sample3:
72               value:
73                 options: "(key1=10,key2=value2,key3=[val31;val32])"
74       responses:
75         "200":
76           description: OK
77           content:
78             application/json:
79               schema:
80                 type: object
81         "400":
82           description: Bad Request
83           content:
84             application/json:
85               schema:
86                 $ref: '#/components/schemas/ErrorMessage'
87         "401":
88           description: Unauthorized
89           content:
90             application/json:
91               schema:
92                 $ref: '#/components/schemas/ErrorMessage'
93         "403":
94           description: Forbidden
95           content:
96             application/json:
97               schema:
98                 $ref: '#/components/schemas/ErrorMessage'
99         "404":
100           description: The specified resource was not found
101           content:
102             application/json:
103               schema:
104                 $ref: '#/components/schemas/ErrorMessage'
105   /v1/ch/{cm-handle}/data/ds/ncmp-datastore:passthrough-running:
106     get:
107       tags:
108         - network-cm-proxy
109       summary: Get resource data from pass-through running for cm handle
110       description: Get resource data from pass-through running for given cm handle
111       operationId: getResourceDataRunningForCmHandle
112       parameters:
113         - name: cm-handle
114           in: path
115           description: "The identifier for a network function, network element, subnetwork\
116           \ or any other cm object by managed Network CM Proxy"
117           required: true
118           schema:
119             type: string
120         - name: resourceIdentifier
121           in: query
122           description: The format of resource identifier depend on the associated DMI
123             Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
124             it can really be anything.
125           required: true
126           allowReserved: true
127           schema:
128             type: string
129           examples:
130             sample1:
131               value:
132                 resourceIdentifier: \parent\child
133             sample2:
134               value:
135                 resourceIdentifier: "\\parent\\listElement[key=value]"
136             sample3:
137               value:
138                 resourceIdentifier: "\\parent\\listElement[key=value]\\grandChild"
139             sample4:
140               value:
141                 resourceIdentifier: "parent=1,child=abc"
142         - name: Accept
143           in: header
144           description: "Accept parameter for response, if accept parameter is null,\
145           \ that means client can accept any format."
146           required: false
147           schema:
148             type: string
149             enum:
150               - application/json
151               - application/yang-data+json
152         - name: options
153           in: query
154           description: "options parameter in query, it is mandatory to wrap key(s)=value(s)\
155           \ in parenthesis'()'."
156           required: false
157           allowReserved: true
158           schema:
159             type: string
160           examples:
161             sample1:
162               value:
163                 options: "(key1=value1,key2=value2)"
164             sample2:
165               value:
166                 options: "(key1=value1,key2=value1/value2)"
167             sample3:
168               value:
169                 options: "(key1=10,key2=value2,key3=[val31;val32])"
170       responses:
171         "200":
172           description: OK
173           content:
174             application/json:
175               schema:
176                 type: object
177         "400":
178           description: Bad Request
179           content:
180             application/json:
181               schema:
182                 $ref: '#/components/schemas/ErrorMessage'
183         "401":
184           description: Unauthorized
185           content:
186             application/json:
187               schema:
188                 $ref: '#/components/schemas/ErrorMessage'
189         "403":
190           description: Forbidden
191           content:
192             application/json:
193               schema:
194                 $ref: '#/components/schemas/ErrorMessage'
195         "404":
196           description: The specified resource was not found
197           content:
198             application/json:
199               schema:
200                 $ref: '#/components/schemas/ErrorMessage'
201     post:
202       tags:
203         - network-cm-proxy
204       summary: create resource data from pass-through running for cm handle
205       description: create resource data from pass-through running for given cm handle
206       operationId: createResourceDataRunningForCmHandle
207       parameters:
208         - name: cm-handle
209           in: path
210           description: "The identifier for a network function, network element, subnetwork\
211           \ or any other cm object by managed Network CM Proxy"
212           required: true
213           schema:
214             type: string
215         - name: resourceIdentifier
216           in: query
217           description: The format of resource identifier depend on the associated DMI
218             Plugin implementation. For ONAP DMI Plugin it will be RESTConf paths but
219             it can really be anything.
220           required: true
221           allowReserved: true
222           schema:
223             type: string
224           examples:
225             sample1:
226               value:
227                 resourceIdentifier: \parent\child
228             sample2:
229               value:
230                 resourceIdentifier: "\\parent\\listElement[key=value]"
231             sample3:
232               value:
233                 resourceIdentifier: "\\parent\\listElement[key=value]\\grandChild"
234             sample4:
235               value:
236                 resourceIdentifier: "parent=1,child=abc"
237         - name: Content-Type
238           in: header
239           description: "Content parameter for request, if content parameter is null,\
240           \ default value is application/json."
241           required: false
242           schema:
243             type: string
244             default: application/json
245       requestBody:
246         content:
247           application/json:
248             schema:
249               type: string
250           application/yang-data+json:
251             schema:
252               type: string
253         required: true
254       responses:
255         "201":
256           description: Created
257           content: {}
258         "400":
259           description: Bad Request
260           content:
261             application/json:
262               schema:
263                 $ref: '#/components/schemas/ErrorMessage'
264         "401":
265           description: Unauthorized
266           content:
267             application/json:
268               schema:
269                 $ref: '#/components/schemas/ErrorMessage'
270         "403":
271           description: Forbidden
272           content:
273             application/json:
274               schema:
275                 $ref: '#/components/schemas/ErrorMessage'
276         "404":
277           description: The specified resource was not found
278           content:
279             application/json:
280               schema:
281                 $ref: '#/components/schemas/ErrorMessage'
282   /v1/ch/{cm-handle}/modules:
283     get:
284       tags:
285         - network-cm-proxy
286       summary: Fetch all module references (name and revision) for a given cm handle
287       description: fetch all module references (name and revision) for a given cm
288         handle
289       operationId: getModuleReferencesByCmHandle
290       parameters:
291         - name: cm-handle
292           in: path
293           description: "The identifier for a network function, network element, subnetwork\
294           \ or any other cm object by managed Network CM Proxy"
295           required: true
296           schema:
297             type: string
298       responses:
299         "200":
300           description: OK
301           content:
302             application/json:
303               schema:
304                 type: object
305         "400":
306           description: Bad Request
307           content:
308             application/json:
309               schema:
310                 $ref: '#/components/schemas/ErrorMessage'
311         "401":
312           description: Unauthorized
313           content:
314             application/json:
315               schema:
316                 $ref: '#/components/schemas/ErrorMessage'
317         "403":
318           description: Forbidden
319           content:
320             application/json:
321               schema:
322                 $ref: '#/components/schemas/ErrorMessage'
323         "404":
324           description: The specified resource was not found
325           content:
326             application/json:
327               schema:
328                 $ref: '#/components/schemas/ErrorMessage'
329 components:
330   schemas:
331     ErrorMessage:
332       title: Error
333       type: object
334       properties:
335         status:
336           type: string
337         message:
338           type: string
339         details:
340           type: string