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