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