1 # Copyright (c) 2018 Orange
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.swagger: "2.0"
16 description: "serviceCatalog API designed for ONAP Beijing Release.\nThis API is\
17 \ build from TMF open API17.5. \nOnly operation GET (by id & byList) for resource\
18 \ serviceSpecification is available\n\n"
20 title: "API ServiceCatalog"
22 url: "/redoc/logo.png"
23 backgroundColor: "#FFFFFF"
25 basePath: "/nbi/api/v4"
29 - "application/json;charset=utf-8"
31 - name: "ServiceSpecification"
34 /serviceSpecification:
37 - "ServiceSpecification"
39 - "application/json;charset=utf-8"
40 operationId: "serviceSpecificationFind"
41 summary: "List service specifications"
42 description: "This operation returns service specifications from a catalog.\n\
43 Only a predefined set of attribute is proposed : Based on SDC limitations,\
44 \ only attributes category and distributionStatus are available for serviceSpecification\
45 \ filtering\nFields attribute could be used to filter attributes retrieved"
51 description: "Field selection - used to filtering the attributes to be retreived"
56 description: "Service Category (filter)"
58 - name: "distributionStatus"
61 description: "Service distribution status (filter)"
69 $ref: "#/definitions/ServiceSpecification"
71 description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
72 \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
73 \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
74 \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
77 $ref: "#/definitions/ErrorRepresentation"
79 description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
80 \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
82 $ref: "#/definitions/ErrorRepresentation"
84 description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
85 \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
88 $ref: "#/definitions/ErrorRepresentation"
90 description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
93 $ref: "#/definitions/ErrorRepresentation"
95 description: "Unprocessable entity\n\nFunctional error"
97 $ref: "#/definitions/ErrorRepresentation"
99 description: "Internal Server Error\n\nList of supported error codes:\n\
102 $ref: "#/definitions/ErrorRepresentation"
104 description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
105 \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
108 $ref: "#/definitions/ErrorRepresentation"
109 /serviceSpecification/{id}:
112 - "ServiceSpecification"
114 - "application/json;charset=utf-8"
115 operationId: "serviceSpecificationGet"
116 summary: "Retrieve a service specification"
117 description: "This operation returns a service specification by its id from\
118 \ a catalog. Attribute selection is enabled using the fields attribute."
128 description: "Attribute selection"
134 $ref: "#/definitions/ServiceSpecification"
136 description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
137 \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
138 \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
139 \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
142 $ref: "#/definitions/ErrorRepresentation"
144 description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
145 \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
147 $ref: "#/definitions/ErrorRepresentation"
149 description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
150 \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
153 $ref: "#/definitions/ErrorRepresentation"
155 description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
158 $ref: "#/definitions/ErrorRepresentation"
160 description: "Unprocessable entity\n\nFunctional error"
162 $ref: "#/definitions/ErrorRepresentation"
164 description: "Internal Server Error\n\nList of supported error codes:\n\
167 $ref: "#/definitions/ErrorRepresentation"
169 description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
170 \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
173 $ref: "#/definitions/ErrorRepresentation"
174 /serviceSpecification/{id}/specificationInputSchema:
177 - "ServiceSpecification"
179 - "application/json;charset=utf-8"
180 operationId: "specificationInputSchemaGet"
181 summary: "Retrieve a service specification Input Schema"
182 description: "This operation returns a service specification Input schema by its id from\
183 \ a catalog. Attribute selection is enabled using the fields attribute."
193 description: "Attribute selection"
199 $ref: "#/definitions/SpecificationInputSchema"
201 description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
202 \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
203 \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
204 \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
207 $ref: "#/definitions/ErrorRepresentation"
209 description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
210 \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
212 $ref: "#/definitions/ErrorRepresentation"
214 description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
215 \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
218 $ref: "#/definitions/ErrorRepresentation"
220 description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
223 $ref: "#/definitions/ErrorRepresentation"
225 description: "Unprocessable entity\n\nFunctional error"
227 $ref: "#/definitions/ErrorRepresentation"
229 description: "Internal Server Error\n\nList of supported error codes:\n\
232 $ref: "#/definitions/ErrorRepresentation"
234 description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
235 \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
238 $ref: "#/definitions/ErrorRepresentation"
241 LifecycleStatusValues:
242 description: "Service lifecycle value from ONAP SDC"
245 - "NOT_CERTIFIED_CHECKOUT"
246 - "NOT_CERTIFIED_CHECKIN"
247 - "READY_FOR_CERTIFICATION"
248 - "CERTIFICATION_IN_PROGRESS"
251 description: "Service distribution status from ONAP."
254 - "DISTRIBUTION_NOT_APPROVED"
255 - "DISTRIBUTION_APPROVED"
257 - "DISTRIBUTION_REJECTED"
259 description: "This class is used to describe error.\nfor nbi Beijing release we\
260 \ do not manage additional error for serviceCatalog"
267 description: "Application related code (as defined in the API or from a common\
272 description: "Text that explains the reason for error. This can be shown to\
276 description: "Text that provide more details and corrective actions related\
277 \ to the error. This can be shown to a client user"
280 description: "http error code extension like 400-2"
283 description: "url pointing to documentation describing the error"
286 description: "The class type of a REST resource."
289 description: "it provides a link to the schema describing a REST resource."
292 description: "A time period"
296 description: "Start date and time of the period"
300 description: "End date and time of the period"
304 description: "Party linked to the service catalog.\nin nbi we retrieve information\
305 \ about last updater of the service in SDC"
309 description: "Unique identifier of the related party. Filled with lastUpdaterUserId"
312 description: "Role payed by the related party\nOnly role 'lastUpdater' is\
313 \ retrieved in Beijing release"
316 description: "Name of the related party - Filled with lastUpdatedFullName"
318 ServiceSpecification:
319 description: "ServiceSpecification is a class that offers characteristics to describe\
320 \ a type of service. Functionally, it acts as a template by which Services may\
321 \ be instantiated. By sharing the same specification, these services would therefore\
322 \ share the same set of characteristics.\nthe service information are retrieved\
329 description: "Unique identifier of the service specification. Filled with\
333 description: "Reference of the service specification"
336 description: "Name of the service specification- Filled with SDC Service name"
339 description: "A narrative that explains in detail what the service specification\
340 \ is - Filled with SDC Service description"
343 description: "This attribute allows to dynamically extends TMF class. Valued\
344 \ with 'ONAPservice'. We used this features to add following attributes:\n\
345 invariantUUID\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory\
346 \ (1)\ndistributionStatus"
348 default: "ONAPservice"
350 description: "Not used"
353 description: "Not used"
356 description: "Additional attribute (not in the TMF API) - extended through\
357 \ @type - invariantUUID"
360 description: "Additional attribute (not in the TMF API) - extended through\
361 \ @type - toscaModelURL"
364 description: "Additional attribute (not in the TMF API) - extended through\
365 \ @type - toscaResourceName"
368 description: "Additional attribute - extended through @type - category\nPlease\
369 \ note that this attribute is managed in TMF - in future release we'll introduce\
373 description: "Additional attribute - extended through @type - category\nPlease\
374 \ note that this attribute is managed in TMF - in future release we'll introduce\
378 $ref: "#/definitions/DistributionStatus"
380 description: "Service specification version - Filled with SDC Service version"
383 $ref: "#/definitions/LifecycleStatusValues"
385 $ref: "#/definitions/TargetServiceSchemaRef"
389 $ref: "#/definitions/Attachment"
393 $ref: "#/definitions/RelatedPartyRef"
394 resourceSpecification:
397 $ref: "#/definitions/ResourceSpecificationRef"
398 serviceSpecCharacteristic:
401 $ref: "#/definitions/ServiceSpecCharacteristic"
402 ServiceSpecCharacteristic:
403 description: "A characteristic quality or distinctive feature of a ServiceSpecification.\
404 \ \nServiceSpecCharacteristic are retrieved in the serviceTosca file in the\
405 \ topology_template section in the inputs section."
409 description: "Name of the characteristic - Filled with parameter_name"
412 description: "A narrative that explains in detail what the characteristic\
413 \ is - Filled with parameter_description"
416 description: "A kind of value that the characteristic can take on, from Dublin\
417 \ from Dublin we use the object type to describe service characteristic values"
420 description: "This attribute allows to dynamically extends TMF class. Valued\
421 \ with: 'ONAPserviceCharacteristic'. We do not used this feature in nbi"
424 description: "An url pointing to type description - we do not use it"
427 description: "A parameter to define if the characteristic is mandatory - Filled\
428 \ from parameter_required – if not fielded by default ‘true’"
432 description: "Status of the characteristic - filled with status_value"
434 serviceSpecCharacteristicValue:
437 $ref: "#/definitions/ServiceSpecCharacteristicValue"
439 description: "An attachment is a file uses to describe the service.\nIn nbi we\
440 \ use attachment to retrieve ONAP artifacts."
444 description: "Unique identifier of the attachment - filled with artifactUUID."
447 description: "Name of the attachment - filled with artifactName"
450 description: "Description of the attachment - filled with artifactDescription"
453 description: "This attribute allows to dynamically extends TMF class. Valued\
454 \ with 'ONAPartifact'. We used this features to add following attributes:\
455 \ \nartifactLabel\nartifactGroupType\nartifactTimeout\nartifactChecksum\n\
456 artifactVersion\ngeneratedFromUUID"
458 default: "ONAPartifact"
460 description: "Additional attribute (not in the TMF API) - extended through\
461 \ @type - artifactLabel"
464 description: "Additional attribute (not in the TMF API) - extended through\
465 \ @type - artifactGroupType"
468 description: "Additional attribute (not in the TMF API) - extended through\
469 \ @type - artifactTimeout"
472 description: "Additional attribute (not in the TMF API) - extended through\
473 \ @type - artifactChecksum"
476 description: "Additional attribute (not in the TMF API) - extended through\
477 \ @type - artifactVersion"
480 description: "Additional attribute (not in the TMF API) - extended through\
481 \ @type - generatedFromUUID"
484 description: "Uniform Resource Locator, is a web page address - filled with\
488 description: "Filled with artifactType"
490 ServiceSpecCharacteristicValue:
491 description: "A number or text that can be assigned to a service specification\
492 \ characteristic.\nServiceSpecCharacteristicValue are retrieved in the service\
497 description: "This attribute allows to dynamically extends TMF class. Valued\
498 \ with: 'ServiceSpecName_ServiceCharacteristic'."
501 description: "An url pointing to type description - we use it in nbi\
502 \ for specifying the specificationInputSchema url"
505 description: "A kind of value that the characteristic can take on,\
506 \ from Dublin release we use an object valueType to\
507 \ group the Tosca Model Inputs, the object schema is described\
508 \ by the specificationInputSchema url"
510 SpecificationInputSchema:
511 description: "A json schema of the service specification input characteristics\
512 \ \n. The Inputs in the schema files are obtained the service Tosca file Inputs"
515 ServiceCharacteristics:
516 $ref: "#/definitions/SchemaForServiceCharacteristics"
517 SchemaForServiceCharacteristics:
518 description: "The object describing the schema of the service specification input characteristics.\
519 \ \n. The Inputs in the schema files are obtained the service Tosca file Inputs"
523 description: "defines the parameter key names that are mandatory to send"
528 description: "defines all the input key names and types for the Service Instantiation"
530 ResourceSpecificationRef:
531 description: "A list of resourceSpec identified to deliver the service.\nfor nbi\
532 \ we retrieve resource information available in service description (through\
533 \ SDC api) bu as well information retrieved in the TOSCA file."
537 description: "Unique identifier of the resource specification - filled with\
541 description: "Version for this resource specification - filled with resourceVersion"
544 description: "Name of the resource specification - filled with resourceName"
547 description: "This attribute allows to dynamically extends TMF class. Valued\
548 \ with: 'ONAPresource'. We used this features to add following attributes:\n\
549 resourceInstanceName\nresourceInvariantUUID\nresourceType\nmodelCustomizationName\n\
550 modelCustomizationId"
552 default: "ONAPresource"
553 resourceInstanceName:
554 description: "Additional attribute (not in the TMF API) - extended through\
555 \ @type - resourceInstanceName"
557 resourceInvariantUUID:
558 description: "Additional attribute (not in the TMF API) - extended through\
559 \ @type - resourceInvariantUUID"
562 description: "Additional attribute (not in the TMF API) - extended through\
563 \ @type - resoucreType"
565 modelCustomizationName:
566 description: "Additional attribute (not in the TMF API) - extended through\
567 \ @type - Retrieved in the TOSCA file : attribute name in topology_template/node_template\
570 modelCustomizationId:
571 description: "Additional attribute (not in the TMF API) - extended through\
572 \ @type - Retrieved in the TOSCA file : attribute customizationUUID in topology_template/node_template\
575 TargetServiceSchemaRef: