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