Improve license scan result
[externalapi/nbi.git] / docs / offeredapis / api_serviceInventory / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
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.swagger: "2.0"
14 swagger: "2.0"
15 info:
16   description: "Query information about instantiated services\n\nList of available\
17     \ subscription for serviceInventory notifications, see /hub resources for more\
18     \ information:\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n\
19     - ServiceRemoveNotification\n\n"
20   version: "4.0.1"
21   title: "API ServiceInventory"
22   x-logo:
23     url: "/redoc/logo.png"
24     backgroundColor: "#FFFFFF"
25 host: "localhost:8080"
26 basePath: "/nbi/api/v4"
27 schemes:
28 - "http"
29 produces:
30 - "application/json;charset=utf-8"
31 tags:
32 - name: "Service"
33   description: "Provided by NBI"
34 - name: "Notification"
35   description: "provided by subscriber, which MUST has been registered by creating\
36     \ a Hub ressource on NBI"
37 paths:
38   /service:
39     get:
40       tags:
41       - "Service"
42       produces:
43       - "application/json;charset=utf-8"
44       operationId: "serviceFind"
45       summary: "List services"
46       description: "This operation list service entities. \nAttribute selection is\
47         \ restricted. \nfields attribute may be used to filter retrieved attribute(s)\
48         \ for each service"
49       deprecated: false
50       parameters:
51       - name: "relatedParty.id"
52         required: false
53         in: "query"
54         description: ""
55         type: "string"
56       - name: "serviceSpecification.id"
57         required: false
58         in: "query"
59         description: ""
60         type: "string"
61       - name: "serviceSpecification.name"
62         required: false
63         in: "query"
64         description: ""
65         type: "string"
66       - name: "id"
67         required: false
68         in: "query"
69         description: ""
70         type: "string"
71       - name: "fields"
72         required: false
73         in: "query"
74         description: ""
75         type: "string"
76       responses:
77         200:
78           description: "Ok"
79           schema:
80             type: "array"
81             items:
82               $ref: "#/definitions/ListService"
83   /service/{id}:
84     get:
85       tags:
86       - "Service"
87       produces:
88       - "application/json;charset=utf-8"
89       operationId: "serviceGet"
90       summary: "Retrieve a service"
91       description: "This operation retrieves a service entity. \nAttribute selection\
92         \ is enabled for all first level attributes."
93       deprecated: false
94       parameters:
95       - name: "id"
96         required: true
97         in: "path"
98         type: "string"
99       responses:
100         200:
101           description: "Ok"
102           schema:
103             $ref: "#/definitions/Service"
104   /notification:
105     post:
106       tags:
107       - "Notification"
108       consumes:
109       - "application/json;charset=utf-8"
110       produces:
111       - "application/json;charset=utf-8"
112       operationId: "notificationCreate"
113       summary: "NBI will send notification to this operation provided by subscribers"
114       description: ""
115       deprecated: false
116       parameters:
117       - name: "Notification"
118         required: true
119         in: "body"
120         description: ""
121         schema:
122           $ref: "#/definitions/Notification"
123       responses:
124         201:
125           description: "Created"
126           schema:
127             $ref: "#/definitions/Notification"
128 definitions:
129   eventType:
130     description: ""
131     type: "string"
132     enum:
133     - "ServiceCreationNotification"
134     - "ServiceAttributeValueChangeNotification"
135     - "ServiceRemoveNotification"
136   ErrorRepresentation:
137     description: "This class is used to describe error."
138     required:
139     - "code"
140     - "reason"
141     type: "object"
142     properties:
143       code:
144         description: "Application related code (as defined in the API or from a common\
145           \ list)"
146         type: "integer"
147         format: "int32"
148       reason:
149         description: "Text that explains the reason for error. This can be shown to\
150           \ a client user."
151         type: "string"
152       message:
153         description: "Text that provide more details and corrective actions related\
154           \ to the error. This can be shown to a client user."
155         type: "string"
156       status:
157         description: "http error code extension like 400-2"
158         type: "string"
159       referenceError:
160         description: "url pointing to documentation describing the error"
161         type: "string"
162       '@type':
163         description: "The class type of a REST resource."
164         type: "string"
165       '@schemaLocation':
166         description: "it provides a link to the schema describing a REST resource."
167         type: "string"
168   Service:
169     description: "Instantiated service (service_instance) in AAI"
170     type: "object"
171     properties:
172       id:
173         description: "Unique identifier of the service - Valued with service-instance-id"
174         type: "string"
175       href:
176         description: "Reference of the service\nNot managed in Beijing release"
177         type: "string"
178       name:
179         description: "Name of the service - Valued with service-instance-name"
180         type: "string"
181       type:
182         description: "Service type - valued with 'service-instance'"
183         type: "string"
184       state:
185         description: "State of the service."
186         type: "string"
187       '@type':
188         description: "This attribute allows to dynamically extends TMF class. Not\
189           \ used in Beijing release."
190         type: "string"
191       '@baseType':
192         description: "Not managed in Beijing release"
193         type: "string"
194       '@schemaLocation':
195         description: "Not managed in Beijing release"
196         type: "string"
197       serviceSpecification:
198         $ref: "#/definitions/ServiceSpecificationRef"
199       characteristic:
200         type: "array"
201         items:
202           $ref: "#/definitions/ServiceCharacteristic"
203       supportingResource:
204         type: "array"
205         items:
206           $ref: "#/definitions/SupportingResource"
207       relatedParty:
208         type: "array"
209         items:
210           $ref: "#/definitions/RelatedPartyRef"
211   ServiceSpecificationRef:
212     description: "Service specification reference: ServiceSpecification of this service\
213       \ (catalog information)"
214     type: "object"
215     properties:
216       id:
217         description: "Unique identifier of the service specification. valued to model-version-id"
218         type: "string"
219       href:
220         description: "Reference of the service specification.\nnot managed in Beijing\
221           \ release."
222         type: "string"
223       name:
224         description: "Name of the required service specification"
225         type: "string"
226       version:
227         description: "Service specification version.\nNot managed in Beijing release"
228         type: "string"
229       '@referredType':
230         description: "This attribute allows to dynamically extends TMF class. Valued\
231           \ with 'ONAPservice'. We used this features to add following attribute:\
232           \ invariantUUID"
233         type: "string"
234       '@schemaLocation':
235         description: "Not managed in Beijing release"
236         type: "string"
237       invariantUUID:
238         description: "Additional attribute (not in the TMF API) - extended through\
239           \ @referredType - model-invariant-id"
240         type: "string"
241   ServiceCharacteristic:
242     description: "A list of name value pairs that define the service characteristics\n\
243       Not managed in Beijing release."
244     required:
245     - "name"
246     type: "object"
247     properties:
248       name:
249         description: "Name of the characteristic\nNot managed in Beijing release."
250         type: "string"
251       valueType:
252         description: "Type of value for this characteristic.\nNot managed in Beijing\
253           \ release."
254         type: "string"
255       value:
256         $ref: "#/definitions/Value"
257   SupportingResource:
258     description: "Supporting resource - A supportingResource will be retrieved for\
259       \ each relationship of the relationship-list where related-link describe a vnf"
260     type: "object"
261     properties:
262       id:
263         description: "Unique identifier of the supporting resource - Valued to vnf-id"
264         type: "string"
265       href:
266         description: "Reference of the supporting resource"
267         type: "string"
268       role:
269         description: "Not managed in Beijing release."
270         type: "string"
271       name:
272         description: "Name of the supporting resource - Valued with vnf_-name"
273         type: "string"
274       '@referredType':
275         description: "This attribute allows to dynamically extends TMF class. Valued\
276           \ with 'ONAP resource'. We used this features to add following attributes:\n\
277           \    status\t\n    modelInvariantId\n   modelVersionId\n   modelCustomisationId"
278         type: "string"
279       '@schemaLocation':
280         description: "Not managed in Beijing release."
281         type: "string"
282       status:
283         description: "Additional attribute (not in the TMF API) - extended through\
284           \ @referredType - valued with prov-status"
285         type: "string"
286       modelInvariantId:
287         description: "Additional attribute (not in the TMF API) - extended through\
288           \ @referredType - valued with model-invariant-id"
289         type: "string"
290       modelVersionId:
291         description: "Additional attribute (not in the TMF API) - extended through\
292           \ @referredType - valued with model-verson-id"
293         type: "string"
294       modelCustomisationId:
295         description: "Additional attribute (not in the TMF API) - extended through\
296           \ @referredType - valued with model-customisation-id"
297         type: "string"
298   RelatedPartyRef:
299     description: "RelatedParty reference. A related party defines party or party role\
300       \ linked to a specific entity."
301     type: "object"
302     properties:
303       id:
304         description: "Unique identifier of a related party"
305         type: "string"
306       href:
307         description: "Reference of a related party.\nNot filled in Beijing release."
308         type: "string"
309       role:
310         description: "Role played by the related party.\nFilled with 'ONAPcustomer'"
311         type: "string"
312       '@referredType':
313         description: "Not managed in the Beijing release."
314         type: "string"
315   Value:
316     description: "Structure used to describe characteristic value.\nNot managed in\
317       \ Beijing release."
318     type: "object"
319     properties:
320       '@type':
321         description: "Not managed in Beijing release."
322         type: "string"
323       '@schemaLocation':
324         description: "Not managed in Beijing release."
325         type: "string"
326       serviceCharacteristicValue:
327         description: "Not managed in Beijing release."
328         type: "string"
329   ListRelatedPartyRef:
330     description: "This class is used to structure list of service(s) retrieved"
331     type: "object"
332     properties:
333       id:
334         description: "Unique identifier of a related party"
335         type: "string"
336       role:
337         description: "Role played by the related party - only role “ONAPcustomer”\
338           \ is managed in Beijing release."
339         type: "string"
340   ListServiceSpecificationRef:
341     description: "This class is used to structure list of service(s) retrieved"
342     type: "object"
343     properties:
344       id:
345         description: "Unique identifier of the service specification"
346         type: "string"
347       name:
348         description: "Name of the required service specification"
349         type: "string"
350   ListService:
351     description: "This class is used to structure list of service(s) retrieved"
352     type: "object"
353     properties:
354       id:
355         description: "Unique identifier of the service"
356         type: "string"
357       name:
358         description: "Name of the service"
359         type: "string"
360       serviceSpecification:
361         $ref: "#/definitions/ListServiceSpecificationRef"
362       relatedParty:
363         $ref: "#/definitions/ListRelatedPartyRef"
364   ServiceInventoryEvent:
365     description: "Structure for a service inventory event notification"
366     required:
367     - "id"
368     - "href"
369     - "name"
370     - "type"
371     - "state"
372     - "relatedParty"
373     type: "object"
374     properties:
375       id:
376         description: "The Service Instance Id"
377         type: "string"
378       href:
379         description: "A reference to the service inventory"
380         type: "string"
381       name:
382         description: "The name of the Service Instance"
383         type: "string"
384       type:
385         description: "The type of event, service-instance"
386         type: "string"
387       state:
388         description: "The state of the service instance"
389         type: "string"
390       relatedParty:
391         $ref: "#/definitions/RelatedPartyRef"
392   Notification:
393     description: "Notification structure for a service notification"
394     required:
395     - "eventId"
396     - "eventDate"
397     - "eventType"
398     - "event"
399     type: "object"
400     properties:
401       eventId:
402         description: ""
403         type: "string"
404       eventDate:
405         description: ""
406         type: "string"
407         format: "date-time"
408       eventType:
409         $ref: "#/definitions/eventType"
410       event:
411         $ref: "#/definitions/ServiceInventoryEvent"