81b882de7e2bc05463e934f7f1fbc5c51d2bca1c
[externalapi/nbi.git] / docs / offeredapis / api_serviceInventory / swagger.json
1
2     {
3     "swagger": "2.0",
4     "info": {
5     "description": "Query information about instantiated services\n\nList of available subscription for serviceInventory notifications, see /hub resources for more information:\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n- ServiceRemoveNotification\n\n",
6     "version": "4.0.0_inProgress",
7     "title": "API ServiceInventory",
8     "x-logo": {
9     "url": "/redoc/logo.png",
10     "backgroundColor": "#FFFFFF"
11     }
12     },
13     
14       "host": "localhost:8080",
15       "basePath":       "/nbi/api/v4",
16       "schemes": [
17       "http"
18       ],
19     "produces": [
20     "application/json;charset=utf-8"
21     ],
22     "tags": [
23     
24       {
25       "name": "Service",
26       "description": "Provided by NBI"
27       },
28       {
29       "name": "Notification",
30       "description": "provided by subscriber, which MUST has been registered by creating a Hub ressource on NBI"
31       }
32     ],
33     "paths": {
34       "/service": {
35     "get": {
36     "tags": [
37     "Service"
38     ],
39         "produces": [
40            "application/json;charset=utf-8"
41       ],
42     "operationId": "serviceFind",
43     "summary": "List services",
44     "description": "This operation list service entities. \nAttribute selection is restricted. \nfields attribute may be used to filter retrieved attribute(s) for each service",
45     "deprecated": false,
46     
47       "parameters": [
48       
49     {
50     "name": "relatedParty.id",
51     "required": false,
52     "in": "query",
53     "description": "",
54     
55     "type": "string"
56     },
57     {
58     "name": "serviceSpecification.id",
59     "required": false,
60     "in": "query",
61     "description": "",
62     
63     "type": "string"
64     },
65     {
66     "name": "serviceSpecification.name",
67     "required": false,
68     "in": "query",
69     "description": "",
70     
71     "type": "string"
72     },
73     {
74     "name": "id",
75     "required": false,
76     "in": "query",
77     "description": "",
78     
79     "type": "string"
80     },
81     {
82     "name": "fields",
83     "required": false,
84     "in": "query",
85     "description": "",
86     
87     "type": "string"
88     }
89       ],
90     "responses": {
91     "200": {
92     "description": "Ok",
93     "schema": {
94       "type": "array",
95       "items": {
96     "$ref": "#/definitions/ListService"
97       }
98     }
99     
100     }
101     }
102     }
103       },
104       "/service/{id}": {
105     "get": {
106     "tags": [
107     "Service"
108     ],
109         "produces": [
110            "application/json;charset=utf-8"
111       ],
112     "operationId": "serviceGet",
113     "summary": "Retrieve a service",
114     "description": "This operation retrieves a service entity. \nAttribute selection is enabled for all first level attributes.",
115     "deprecated": false,
116     
117       "parameters": [
118       
119     {
120     "name": "id",
121     "required": true,
122     "in": "path",
123     "type" : "string"
124     }
125       ],
126     "responses": {
127     "200": {
128     "description": "Ok",
129     "schema": {
130     "$ref": "#/definitions/Service"
131     }
132     
133     }
134     }
135     }
136       },
137       "/notification": {
138     "post": {
139     "tags": [
140     "Notification"
141     ],
142         "consumes": [
143            "application/json;charset=utf-8"
144     ],
145         "produces": [
146            "application/json;charset=utf-8"
147       ],
148     "operationId": "notificationCreate",
149     "summary": "NBI will send notification to this operation provided by subscribers",
150     "description": "",
151     "deprecated": false,
152     
153       "parameters": [
154       
155     {
156     "name": "Notification",
157     "required": true,
158     "in": "body",
159     "description": "",
160     "schema": {
161     "$ref": "#/definitions/Notification"
162       }
163     }
164       ],
165     "responses": {
166     "201": {
167     "description": "Created",
168     "schema": {
169     "$ref": "#/definitions/Notification"
170     }
171     
172     }
173     }
174     }
175       }
176     },
177     "definitions": {
178     
179     "eventType": {
180     "description": "",
181     
182       "type": "string",
183       "enum": [
184         "ServiceCreationNotification",
185         "ServiceAttributeValueChangeNotification",
186         "ServiceRemoveNotification"]
187     
188     },    
189
190     "ErrorRepresentation": {
191     "description": "This class is used to describe error.",
192
193     
194     "required": [
195     
196       "code",
197       "reason"
198     ],
199     "type": "object",
200     "properties": {
201     "code": {
202     "description": "Application related code (as defined in the API or from a common list)",
203     "type": "integer",
204     "format": "int32"
205     },
206     "reason": {
207     "description": "Text that explains the reason for error. This can be shown to a client user.",
208     "type": "string"
209     },
210     "message": {
211     "description": "Text that provide more details and corrective actions related to the error. This can be shown to a client user.",
212     "type": "string"
213     },
214     "status": {
215     "description": "http error code extension like 400-2",
216     "type": "string"
217     },
218     "referenceError": {
219     "description": "url pointing to documentation describing the error",
220     "type": "string"
221     },
222     "@type": {
223     "description": "The class type of a REST resource.",
224     "type": "string"
225     },
226     "@schemaLocation": {
227     "description": "it provides a link to the schema describing a REST resource.",
228     "type": "string"
229     }
230     }
231     
232     },    
233
234     "Service": {
235     "description": "Instantiated service (service_instance) in AAI",
236
237     
238     "type": "object",
239     "properties": {
240     "id": {
241     "description": "Unique identifier of the service - Valued with service-instance-id",
242     "type": "string"
243     },
244     "href": {
245     "description": "Reference of the service\nNot managed in Beijing release",
246     "type": "string"
247     },
248     "name": {
249     "description": "Name of the service - Valued with service-instance-name",
250     "type": "string"
251     },
252     "type": {
253     "description": "Service type - valued with 'service-instance'",
254     "type": "string"
255     },
256     "state": {
257     "description": "State of the service.",
258     "type": "string"
259     },
260     "@type": {
261     "description": "This attribute allows to dynamically extends TMF class. Not used in Beijing release.",
262     "type": "string"
263     },
264     "@baseType": {
265     "description": "Not managed in Beijing release",
266     "type": "string"
267     },
268     "@schemaLocation": {
269     "description": "Not managed in Beijing release",
270     "type": "string"
271     },
272     "serviceSpecification": {
273     
274     "$ref": "#/definitions/ServiceSpecificationRef"
275     },
276     "characteristic": {
277     
278     "type": "array",
279     "items": {
280     "$ref": "#/definitions/ServiceCharacteristic"
281     }
282     },
283     "supportingResource": {
284     
285     "type": "array",
286     "items": {
287     "$ref": "#/definitions/SupportingResource"
288     }
289     },
290     "relatedParty": {
291     
292     "type": "array",
293     "items": {
294     "$ref": "#/definitions/RelatedPartyRef"
295     }
296     }
297     }
298     
299     },    
300
301     "ServiceSpecificationRef": {
302     "description": "Service specification reference: ServiceSpecification of this service (catalog information)",
303
304     
305     "type": "object",
306     "properties": {
307     "id": {
308     "description": "Unique identifier of the service specification. valued to model-version-id",
309     "type": "string"
310     },
311     "href": {
312     "description": "Reference of the service specification.\nnot managed in Beijing release.",
313     "type": "string"
314     },
315     "name": {
316     "description": "Name of the required service specification",
317     "type": "string"
318     },
319     "version": {
320     "description": "Service specification version.\nNot managed in Beijing release",
321     "type": "string"
322     },
323     "@referredType": {
324     "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attribute: invariantUUID",
325     "type": "string"
326     },
327     "@schemaLocation": {
328     "description": "Not managed in Beijing release",
329     "type": "string"
330     },
331     "invariantUUID": {
332     "description": "Additional attribute (not in the TMF API) - extended through @referredType - model-invariant-id",
333     "type": "string"
334     }
335     }
336     
337     },    
338
339     "ServiceCharacteristic": {
340     "description": "A list of name value pairs that define the service characteristics\nNot managed in Beijing release.",
341
342     
343     "required": [
344     
345       "name"
346     ],
347     "type": "object",
348     "properties": {
349     "name": {
350     "description": "Name of the characteristic\nNot managed in Beijing release.",
351     "type": "string"
352     },
353     "valueType": {
354     "description": "Type of value for this characteristic.\nNot managed in Beijing release.",
355     "type": "string"
356     },
357     "value": {
358     
359     "$ref": "#/definitions/Value"
360     }
361     }
362     
363     },    
364
365     "SupportingResource": {
366     "description": "Supporting resource - A supportingResource will be retrieved for each relationship of the relationship-list where related-link describe a vnf",
367
368     
369     "type": "object",
370     "properties": {
371     "id": {
372     "description": "Unique identifier of the supporting resource - Valued to vnf-id",
373     "type": "string"
374     },
375     "href": {
376     "description": "Reference of the supporting resource",
377     "type": "string"
378     },
379     "role": {
380     "description": "Not managed in Beijing release.",
381     "type": "string"
382     },
383     "name": {
384     "description": "Name of the supporting resource - Valued with vnf_-name",
385     "type": "string"
386     },
387     "@referredType": {
388     "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAP resource'. We used this features to add following attributes:\n    status\t\n    modelInvariantId\n   modelVersionId\n   modelCustomisationId",
389     "type": "string"
390     },
391     "@schemaLocation": {
392     "description": "Not managed in Beijing release.",
393     "type": "string"
394     },
395     "status": {
396     "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with prov-status",
397     "type": "string"
398     },
399     "modelInvariantId": {
400     "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-invariant-id",
401     "type": "string"
402     },
403     "modelVersionId": {
404     "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-verson-id",
405     "type": "string"
406     },
407     "modelCustomisationId": {
408     "description": "Additional attribute (not in the TMF API) - extended through @referredType - valued with model-customisation-id",
409     "type": "string"
410     }
411     }
412     
413     },    
414
415     "RelatedPartyRef": {
416     "description": "RelatedParty reference. A related party defines party or party role linked to a specific entity.",
417
418     
419     "type": "object",
420     "properties": {
421     "id": {
422     "description": "Unique identifier of a related party",
423     "type": "string"
424     },
425     "href": {
426     "description": "Reference of a related party.\nNot filled in Beijing release.",
427     "type": "string"
428     },
429     "role": {
430     "description": "Role played by the related party.\nFilled with 'ONAPcustomer'",
431     "type": "string"
432     },
433     "@referredType": {
434     "description": "Not managed in the Beijing release.",
435     "type": "string"
436     }
437     }
438     
439     },    
440
441     "Value": {
442     "description": "Structure used to describe characteristic value.\nNot managed in Beijing release.",
443
444     
445     "type": "object",
446     "properties": {
447     "@type": {
448     "description": "Not managed in Beijing release.",
449     "type": "string"
450     },
451     "@schemaLocation": {
452     "description": "Not managed in Beijing release.",
453     "type": "string"
454     },
455     "serviceCharacteristicValue": {
456     "description": "Not managed in Beijing release.",
457     "type": "string"
458     }
459     }
460     
461     },    
462
463     "ListRelatedPartyRef": {
464     "description": "This class is used to structure list of service(s) retrieved",
465
466     
467     "type": "object",
468     "properties": {
469     "id": {
470     "description": "Unique identifier of a related party",
471     "type": "string"
472     },
473     "role": {
474     "description": "Role played by the related party - only role “ONAPcustomer” is managed in Beijing release.",
475     "type": "string"
476     }
477     }
478     
479     },    
480
481     "ListServiceSpecificationRef": {
482     "description": "This class is used to structure list of service(s) retrieved",
483
484     
485     "type": "object",
486     "properties": {
487     "id": {
488     "description": "Unique identifier of the service specification",
489     "type": "string"
490     },
491     "name": {
492     "description": "Name of the required service specification",
493     "type": "string"
494     }
495     }
496     
497     },    
498
499     "ListService": {
500     "description": "This class is used to structure list of service(s) retrieved",
501
502     
503     "type": "object",
504     "properties": {
505     "id": {
506     "description": "Unique identifier of the service",
507     "type": "string"
508     },
509     "name": {
510     "description": "Name of the service",
511     "type": "string"
512     },
513     "serviceSpecification": {
514     
515     "$ref": "#/definitions/ListServiceSpecificationRef"
516     },
517     "relatedParty": {
518     
519     "$ref": "#/definitions/ListRelatedPartyRef"
520     }
521     }
522     
523     },    
524
525     "ServiceInventoryEvent": {
526     "description": "Structure for a service inventory event notification",
527
528     
529     "required": [
530     
531       "id",
532       "href",
533       "name",
534       "type",
535       "state",
536       "relatedParty"
537     ],
538     "type": "object",
539     "properties": {
540     "id": {
541     "description": "The Service Instance Id",
542     "type": "string"
543     },
544     "href": {
545     "description": "A reference to the service inventory",
546     "type": "string"
547     },
548     "name": {
549     "description": "The name of the Service Instance",
550     "type": "string"
551     },
552     "type": {
553     "description": "The type of event, service-instance",
554     "type": "string"
555     },
556     "state": {
557     "description": "The state of the service instance",
558     "type": "string"
559     },
560     "relatedParty": {
561     
562     "$ref": "#/definitions/RelatedPartyRef"
563     }
564     }
565     
566     },    
567
568     "Notification": {
569     "description": "Notification structure for a service notification",
570
571     
572     "required": [
573     
574       "eventId",
575       "eventDate",
576       "eventType",
577       "event"
578     ],
579     "type": "object",
580     "properties": {
581     "eventId": {
582     "description": "",
583     "type": "string"
584     },
585     "eventDate": {
586     "description": "",
587     "type": "string",
588     "format": "date-time"
589     },
590     "eventType": {
591     
592     "$ref": "#/definitions/eventType"
593     },
594     "event": {
595     
596     "$ref": "#/definitions/ServiceInventoryEvent"
597     }
598     }
599     
600     }
601     }
602     }
603