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