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