Add API Documentation for Casablanca
[externalapi/nbi.git] / docs / offeredapis / swaggers / serviceCatalog_3_0_0.json
1
2 {
3   "swagger": "2.0",
4   "info": {
5     "description": "serviceCatalog API designed for ONAP Casablanca Release.\nThis API is build from TMF open API17.5. \nOnly operation GET (by id & byList) for resource serviceSpecification is available",
6     "version": "3.0.0",
7     "title": "API ServiceCatalog",
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": "ServiceSpecification",
26       "description": ""
27     }
28   ],
29   "paths": {
30       "/serviceSpecification": {
31       "get": {
32         "tags": [
33            "ServiceSpecification"
34         ],
35         "produces": [
36            "application/json;charset=utf-8"
37         ],        
38         "operationId": "serviceSpecificationFind",
39         "summary": "List service specifications",
40         "description": "This operation returns service specifications from a catalog.\nOnly a predefined set of attribute is proposed : Based on SDC limitations, only attributes category and distributionStatus are available for serviceSpecification filtering\nFields attribute could be used to filter attributes retrieved\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": "fields",
47             "required": false,
48             "in": "query",
49             "description": "Field selection - used to filtering the attributes to be retreived",
50             
51               "type": "string"
52           },
53           {
54             "name": "category",
55             "required": false,
56             "in": "query",
57             "description": "Service Category (filter)",
58             
59               "type": "string"
60           },
61           {
62             "name": "distributionStatus",
63             "required": false,
64             "in": "query",
65             "description": "Service distribution status (filter)",
66             
67               "type": "string"
68           }
69         ],
70         "responses": {
71           "200": {
72             "description": "Success",
73             "schema": {
74               "type": "array",
75               "items": {
76               "$ref": "#/definitions/ServiceSpecification"
77               }
78             }
79
80           },
81           "400": {
82             
83             "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",
84             "schema": {
85             
86               "$ref": "#/definitions/ErrorRepresentation"
87             }
88           },
89           "401": {
90             
91             "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials\n- 42: Expired credentials",
92             "schema": {
93             
94               "$ref": "#/definitions/ErrorRepresentation"
95             }
96           },
97           "403": {
98             
99             "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",
100             "schema": {
101             
102               "$ref": "#/definitions/ErrorRepresentation"
103             }
104           },
105           "404": {
106             
107             "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
108             "schema": {
109             
110               "$ref": "#/definitions/ErrorRepresentation"
111             }
112           },
113           "422": {
114             
115             "description": "Unprocessable entity\n\nFunctional error",
116             "schema": {
117             
118               "$ref": "#/definitions/ErrorRepresentation"
119             }
120           },
121           "500": {
122             
123             "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
124             "schema": {
125             
126               "$ref": "#/definitions/ErrorRepresentation"
127             }
128           },
129           "503": {
130             
131             "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 !",
132             "schema": {
133             
134               "$ref": "#/definitions/ErrorRepresentation"
135             }
136           }
137         }
138       }
139     },
140       "/serviceSpecification/{id}": {
141       "get": {
142         "tags": [
143            "ServiceSpecification"
144         ],
145         "produces": [
146            "application/json;charset=utf-8"
147         ],        
148         "operationId": "serviceSpecificationGet",
149         "summary": "Retrieve a service specification",
150         "description": "This operation returns a service specification by its id from a catalog. Attribute selection is enabled using the fields attribute.\n\nSpecific business errors for current operation will be encapsulated in\n\nHTTP Response 422 Unprocessable entity\n",
151         "deprecated": false,
152         
153         "parameters": [
154           
155           {
156             "name": "id",
157             "in": "path",
158             "required": true,
159             "type": "string",
160             "description": ""
161           },
162           {
163             "name": "fields",
164             "required": false,
165             "in": "query",
166             "description": "Attribute selection",
167             
168               "type": "string"
169           }
170         ],
171         "responses": {
172           "200": {
173             "description": "Success",
174             "schema": {
175               "$ref": "#/definitions/ServiceSpecification"
176             }
177
178           },
179           "400": {
180             
181             "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",
182             "schema": {
183             
184               "$ref": "#/definitions/ErrorRepresentation"
185             }
186           },
187           "401": {
188             
189             "description": "Unauthorized\n\nList of supported error codes:\n- 40: Missing credentials\n- 41: Invalid credentials\n- 42: Expired credentials",
190             "schema": {
191             
192               "$ref": "#/definitions/ErrorRepresentation"
193             }
194           },
195           "403": {
196             
197             "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",
198             "schema": {
199             
200               "$ref": "#/definitions/ErrorRepresentation"
201             }
202           },
203           "404": {
204             
205             "description": "Not Found\n\nList of supported error codes:\n- 60: Resource not found",
206             "schema": {
207             
208               "$ref": "#/definitions/ErrorRepresentation"
209             }
210           },
211           "422": {
212             
213             "description": "Unprocessable entity\n\nFunctional error",
214             "schema": {
215             
216               "$ref": "#/definitions/ErrorRepresentation"
217             }
218           },
219           "500": {
220             
221             "description": "Internal Server Error\n\nList of supported error codes:\n- 1: Internal error",
222             "schema": {
223             
224               "$ref": "#/definitions/ErrorRepresentation"
225             }
226           },
227           "503": {
228             
229             "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 !",
230             "schema": {
231             
232               "$ref": "#/definitions/ErrorRepresentation"
233             }
234           }
235         }
236       }
237     }
238   },
239 "definitions": {
240   
241     "LifecycleStatusValues": {
242       "description": "Service lifecycle value from ONAP SDC",
243       
244       "type": "string",
245       "enum": [
246                   "NOT_CERTIFIED_CHECKOUT",
247                   "NOT_CERTIFIED_CHECKIN",
248                   "READY_FOR_CERTIFICATION",
249                   "CERTIFICATION_IN_PROGRESS",
250                   "CERTIFIED"]
251       
252     },
253     "DistributionStatus": {
254       "description": "Service distribution status from ONAP.",
255       
256       "type": "string",
257       "enum": [
258                   "DISTRIBUTION_NOT_APPROVED",
259                   "DISTRIBUTION_APPROVED",
260                   "DISTRIBUTED",
261                   "DISTRIBUTION_REJECTED"]
262       
263     },
264
265     "ErrorRepresentation": {
266       "description": "This class is used to describe error.\nfor nbi Beijing release we do not manage additional error for serviceCatalog",
267
268       
269       "required": [
270           
271             "code",
272             "reason"
273       ],
274       "type": "object",
275       "properties": {
276         "code": {
277           "description": "Application related code (as defined in the API or from a common list)",
278               "type": "integer",
279               "format": "int32"
280         },
281         "reason": {
282           "description": "Text that explains the reason for error. This can be shown to a client user.",
283               "type": "string"
284         },
285         "message": {
286           "description": "Text that provide more details and corrective actions related to the error. This can be shown to a client user",
287               "type": "string"
288         },
289         "status": {
290           "description": "http error code extension like 400-2",
291               "type": "string"
292         },
293         "referenceErrror": {
294           "description": "url pointing to documentation describing the error",
295               "type": "string"
296         },
297         "@type": {
298           "description": "The class type of a REST resource.",
299               "type": "string"
300         },
301         "@schemaLocation": {
302           "description": "it provides a link to the schema describing a REST resource.",
303               "type": "string"
304         }
305       }
306       
307     },
308
309     "TimePeriod": {
310       "description": "A time period",
311
312       
313       "type": "object",
314       "properties": {
315         "startDateTime": {
316           "description": "Start date and time of the period",
317               "type": "string",
318               "format": "date-time"
319         },
320         "endDateTime": {
321           "description": "End date and time of the period",
322               "type": "string",
323               "format": "date-time"
324         }
325       }
326       
327     },
328
329     "RelatedPartyRef": {
330       "description": "Party linked to the service catalog.\nin nbi we retrieve information about last updater of the service in SDC",
331
332       
333       "type": "object",
334       "properties": {
335         "id": {
336           "description": "Unique identifier of the related party. Filled with lastUpdaterUserId",
337               "type": "string"
338         },
339         "role": {
340           "description": "Role payed by the related party\nOnly role 'lastUpdater' is retrieved in Beijing release",
341               "type": "string"
342         },
343         "name": {
344           "description": "Name of the related party - Filled with lastUpdatedFullName",
345               "type": "string"
346         }
347       }
348       
349     },
350
351     "ServiceSpecification": {
352       "description": "ServiceSpecification is a class that offers characteristics to describe a type of service. Functionally, it acts as a template by which Services may be instantiated. By sharing the same specification, these services would therefore share the same set of characteristics.\nthe service information are retrieved in SDC",
353
354       
355       "required": [
356           
357             "invariantUUID"
358       ],
359       "type": "object",
360       "properties": {
361         "id": {
362           "description": "Unique identifier of the service specification. Filled with SDC Service uuid",
363               "type": "string"
364         },
365         "href": {
366           "description": "Reference of the service specification- not mapped in Beijing",
367               "type": "string"
368         },
369         "name": {
370           "description": "Name of the service specification- Filled with SDC Service name",
371               "type": "string"
372         },
373         "description": {
374           "description": "A narrative that explains in detail what the service specification is - Filled with SDC Service description",
375               "type": "string"
376         },
377         "@type": {
378           "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPservice'. We used this features to add following attributes:\ninvariantUUID\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory (1)\ndistributionStatus",
379               "type": "string",
380         
381                   "default": "ONAPservice"
382         },
383         "@schemaLocation": {
384           "description": "Not used for Beijing release",
385               "type": "string"
386         },
387         "@baseType": {
388           "description": "Not used for Beijing release",
389               "type": "string"
390         },
391         "invariantUUID": {
392           "description": "Additional attribute (not in the TMF API) - extended through @type - invariantUUID",
393               "type": "string"
394         },
395         "toscaModelURL": {
396           "description": "Additional attribute (not in the TMF API) - extended through @type - toscaModelURL",
397               "type": "string"
398         },
399         "toscaResourceName": {
400           "description": "Additional attribute (not in the TMF API) - extended through @type - toscaResourceName",
401               "type": "string"
402         },
403         "category": {
404           "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resource",
405               "type": "string"
406         },
407         "subcategory": {
408           "description": "Additional attribute - extended through @type - category\nPlease note that this attribute is managed in TMF - in future release we'll introduce category resourc",
409               "type": "string"
410         },
411         "distributionStatus": {
412           
413            "$ref": "#/definitions/DistributionStatus"
414         },
415         "version": {
416           "description": "Service specification version - Filled with SDC Service version",
417               "type": "string"
418         },
419         "lifecycleStatus": {
420           
421            "$ref": "#/definitions/LifecycleStatusValues"
422         },
423         "targetServiceSchema": {
424           
425               "$ref": "#/definitions/TargetServiceSchemaRef"
426         },
427         "attachment": {
428           
429           "type": "array",
430           "items": {
431               "$ref": "#/definitions/Attachment"
432           }
433         },
434         "relatedParty": {
435           
436           "type": "array",
437           "items": {
438               "$ref": "#/definitions/RelatedPartyRef"
439           }
440         },
441         "resourceSpecification": {
442           
443           "type": "array",
444           "items": {
445               "$ref": "#/definitions/ResourceSpecificationRef"
446           }
447         },
448         "serviceSpecCharacteristic": {
449           
450           "type": "array",
451           "items": {
452               "$ref": "#/definitions/ServiceSpecCharacteristic"
453           }
454         }
455       }
456       
457     },
458
459     "ServiceSpecCharacteristic": {
460       "description": "A characteristic quality or distinctive feature of a ServiceSpecification. \nServiceSpecCharacteristic are retrieved in the serviceTosca file in the topology_template section in the inputs section.",
461
462       
463       "type": "object",
464       "properties": {
465         "name": {
466           "description": "Name of the characteristic - Filled with parameter_name",
467               "type": "string"
468         },
469         "description": {
470           "description": "A narrative that explains in detail what the characteristic is - Filled with parameter_description",
471               "type": "string"
472         },
473         "valueType": {
474           "description": "A kind of value that the characteristic can take on, such as numeric, text and so forth - Filled with parameter_type",
475               "type": "string"
476         },
477         "@type": {
478           "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ONAPserviceCharacteristic'. We do not used this features in nbi Beijing release.",
479               "type": "string"
480         },
481         "@schemaLocation": {
482           "description": "An url pointing to type description - we do not use it in nbi Beijing release",
483               "type": "string"
484         },
485         "required": {
486           "description": "A parameter to define if the characteristic is mandatory - Filled from parameter_required – if not fielded by default ‘true’",
487               "type": "boolean",
488         
489                   "default": true
490         },
491         "status": {
492           "description": "Status of the characteristic - filled with status_value",
493               "type": "string"
494         },
495         "serviceSpecCharacteristicValue": {
496           
497           "type": "array",
498           "items": {
499               "$ref": "#/definitions/ServiceSpecCharacteristicValue"
500           }
501         }
502       }
503       
504     },
505
506     "Attachment": {
507       "description": "An attachment is a file uses to describe the service.\nIn nbi we use attachment to retrieve ONAP artifacts.",
508
509       
510       "type": "object",
511       "properties": {
512         "id": {
513           "description": "Unique identifier of the attachment - filled with artifactUUID.",
514               "type": "string"
515         },
516         "name": {
517           "description": "Name of the attachment - filled with artifactName",
518               "type": "string"
519         },
520         "description": {
521           "description": "Description of the attachment - filled with artifactDescription",
522               "type": "string"
523         },
524         "@type": {
525           "description": "This attribute allows to dynamically extends TMF class. Valued with 'ONAPartifact'. We used this features to add following attributes: \nartifactLabel\nartifactGroupType\nartifactTimeout\nartifactChecksum\nartifactVersion\ngeneratedFromUUID",
526               "type": "string",
527         
528                   "default": "ONAPartifact"
529         },
530         "artifactLabel": {
531           "description": "Additional attribute (not in the TMF API) - extended through @type - artifactLabel",
532               "type": "string"
533         },
534         "artifactGroupType": {
535           "description": "Additional attribute (not in the TMF API) - extended through @type - artifactGroupType",
536               "type": "string"
537         },
538         "artifactTimeout": {
539           "description": "Additional attribute (not in the TMF API) - extended through @type - artifactTimeout",
540               "type": "string"
541         },
542         "artifactChecksum": {
543           "description": "Additional attribute (not in the TMF API) - extended through @type - artifactChecksum",
544               "type": "string"
545         },
546         "artifactVersion": {
547           "description": "Additional attribute (not in the TMF API) - extended through @type - artifactVersion",
548               "type": "string"
549         },
550         "generatedFromUUID": {
551           "description": "Additional attribute (not in the TMF API) - extended through @type - generatedFromUUID",
552               "type": "string"
553         },
554         "url": {
555           "description": "Uniform Resource Locator, is a web page address - filled with artifactURL",
556               "type": "string"
557         },
558         "mimeType": {
559           "description": "Filled with artifactType",
560               "type": "string"
561         }
562       }
563       
564     },
565
566     "ServiceSpecCharacteristicValue": {
567       "description": "A number or text that can be assigned to a service specification characteristic.\nServiceSpecCharacteristicValue are retrieved in the service Tosca file",
568
569       
570       "type": "object",
571       "properties": {
572         "valueType": {
573           "description": "A kind of value that the characteristic can take on, such as numeric, text, and so forth\nRetrieved in the Tosca in the topology_template section in the inputs section - parameter_type. \nWe do not manage parameter_type= list or map for Beijing release",
574               "type": "string"
575         },
576         "isDefault": {
577           "description": "Information calculated from parameter default in the Tosca file",
578               "type": "boolean"
579         },
580         "value": {
581           "description": "A discrete value that the characteristic can take on",
582               "type": "string"
583         }
584       }
585       
586     },
587
588     "ResourceSpecificationRef": {
589       "description": "A list of resourceSpec identified to deliver the service.\nfor nbi we retrieve resource information available in service description (through SDC api) bu as well information retrieved in the TOSCA file.",
590
591       
592       "type": "object",
593       "properties": {
594         "id": {
595           "description": "Unique identifier of the resource specification - filled with resourceUUID",
596               "type": "string"
597         },
598         "version": {
599           "description": "Version for this resource specification - filled with resourceVersion",
600               "type": "string"
601         },
602         "name": {
603           "description": "Name of the resource specification - filled with resourceName",
604               "type": "string"
605         },
606         "@type": {
607           "description": "This attribute allows to dynamically extends TMF class. Valued with: 'ONAPresource'. We used this features to add following attributes:\nresourceInstanceName\nresourceInvariantUUID\nresourceType\nmodelCustomizationName\nmodelCustomizationId",
608               "type": "string",
609         
610                   "default": "ONAPresource"
611         },
612         "resourceInstanceName": {
613           "description": "Additional attribute (not in the TMF API) - extended through @type - resourceInstanceName",
614               "type": "string"
615         },
616         "resourceInvariantUUID": {
617           "description": "Additional attribute (not in the TMF API) - extended through @type - resourceInvariantUUID",
618               "type": "string"
619         },
620         "resourceType": {
621           "description": "Additional attribute (not in the TMF API) - extended through @type - resoucreType",
622               "type": "string"
623         },
624         "modelCustomizationName": {
625           "description": "Additional attribute (not in the TMF API) - extended through @type - Retrieved in the TOSCA file : attribute name in topology_template/node_template for the resource",
626               "type": "string"
627         },
628         "modelCustomizationId": {
629           "description": "Additional attribute (not in the TMF API) - extended through @type - Retrieved in the TOSCA file : attribute customizationUUID in topology_template/node_template for the resource",
630               "type": "string"
631         }
632       }
633       
634     },
635
636     "TargetServiceSchemaRef": {
637       "description": "",
638
639       
640       "required": [
641           
642             "@type",
643             "@schemaLocation"
644       ],
645       "type": "object",
646       "properties": {
647         "@type": {
648           "description": "",
649               "type": "string"
650         },
651         "@schemaLocation": {
652           "description": "",
653               "type": "string"
654         }
655       }
656       
657     }
658   }
659 }
660