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