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