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