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