95e62faf6f288924e8c11a59f88aabbee9bd9868
[externalapi/nbi.git] / docs / offeredapis / swaggers / serviceCatalog_1_0_0.yaml
1 swagger: "2.0"
2 info:
3   description: "serviceCatalog API designed for ONAP Beijing Release.\nThis API is\
4     \ build from TMF open API17.5\nonly operation GET (by id & byList) for resource\
5     \ serviceSpecification is available"
6   version: "1.0.0"
7   title: "API ServiceCatalog"
8 host: "serverRoot"
9 basePath: "/nbi/api/v1"
10 schemes:
11 - "https"
12 consumes:
13 - "application/json;charset=utf-8"
14 produces:
15 - "application/json;charset=utf-8"
16 tags:
17 - name: "ServiceSpecification"
18   description: ""
19 paths:
20   /serviceSpecification:
21     get:
22       tags:
23       - "ServiceSpecification"
24       operationId: "serviceSpecificationFind"
25       summary: "List service specifications"
26       description: "This operation returns service specifications from a catalog.\n\
27         Only a predefined set of attribute is proposed : Based on SDC limitations,\
28         \ only attributes category and distributionStatus are available for serviceSpecification\
29         \ filtering\nFields attribute could be used to filter attributes retrieved\n\
30         \nSpecific business errors for current operation will be encapsulated in\n\
31         \nHTTP Response 422 Unprocessable entity\n"
32       deprecated: false
33       parameters:
34       - name: "fields"
35         required: false
36         in: "query"
37         description: "Field selection - used to filtering the attributes to be retreived"
38         type: "string"
39       - name: "category"
40         required: false
41         in: "query"
42         description: "Service Category (filter)"
43         type: "string"
44       - name: "distributionStatus"
45         required: false
46         in: "query"
47         description: "Service distribution status (filter)"
48         type: "string"
49       responses:
50         200:
51           description: "Success"
52           schema:
53             type: "array"
54             items:
55               $ref: "#/definitions/ServiceSpecification"
56         400:
57           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
58             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
59             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
60             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
61             \ parameter value"
62           schema:
63             $ref: "#/definitions/ErrorRepresentation"
64         401:
65           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
66             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
67           schema:
68             $ref: "#/definitions/ErrorRepresentation"
69         403:
70           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
71             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
72             \ requests"
73           schema:
74             $ref: "#/definitions/ErrorRepresentation"
75         404:
76           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
77             \ not found"
78           schema:
79             $ref: "#/definitions/ErrorRepresentation"
80         422:
81           description: "Unprocessable entity\n\nFunctional error"
82           schema:
83             $ref: "#/definitions/ErrorRepresentation"
84         500:
85           description: "Internal Server Error\n\nList of supported error codes:\n\
86             - 1: Internal error"
87           schema:
88             $ref: "#/definitions/ErrorRepresentation"
89         503:
90           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
91             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
92             \ retry later !"
93           schema:
94             $ref: "#/definitions/ErrorRepresentation"
95   /serviceSpecification/{id}:
96     get:
97       tags:
98       - "ServiceSpecification"
99       operationId: "serviceSpecificationGet"
100       summary: "Retrieve a service specification"
101       description: "This operation returns a service specification by its id from\
102         \ a catalog. Attribute selection is enabled using the fields attribute.\n\n\
103         Specific business errors for current operation will be encapsulated in\n\n\
104         HTTP Response 422 Unprocessable entity\n"
105       deprecated: false
106       parameters:
107       - name: "id"
108         in: "path"
109         required: true
110         type: "string"
111         description: ""
112       - name: "fields"
113         required: false
114         in: "query"
115         description: "Attribute selection"
116         type: "string"
117       responses:
118         200:
119           description: "Success"
120           schema:
121             $ref: "#/definitions/ServiceSpecification"
122         400:
123           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
124             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
125             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
126             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
127             \ parameter value"
128           schema:
129             $ref: "#/definitions/ErrorRepresentation"
130         401:
131           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
132             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
133           schema:
134             $ref: "#/definitions/ErrorRepresentation"
135         403:
136           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
137             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
138             \ requests"
139           schema:
140             $ref: "#/definitions/ErrorRepresentation"
141         404:
142           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
143             \ not found"
144           schema:
145             $ref: "#/definitions/ErrorRepresentation"
146         422:
147           description: "Unprocessable entity\n\nFunctional error"
148           schema:
149             $ref: "#/definitions/ErrorRepresentation"
150         500:
151           description: "Internal Server Error\n\nList of supported error codes:\n\
152             - 1: Internal error"
153           schema:
154             $ref: "#/definitions/ErrorRepresentation"
155         503:
156           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
157             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
158             \ retry later !"
159           schema:
160             $ref: "#/definitions/ErrorRepresentation"
161 definitions:
162   LifecycleStatusValues:
163     description: "Service lifecycle value from ONAP SDC"
164     type: "string"
165     enum:
166     - "NOT_CERTIFIED_CHECKOUT"
167     - "NOT_CERTIFIED_CHECKIN"
168     - "READY_FOR_CERTIFICATION"
169     - "CERTIFICATION_IN_PROGRESS"
170     - "CERTIFIED"
171   DistributionStatus:
172     description: "Service distribution status from ONAP."
173     type: "string"
174     enum:
175     - "DISTRIBUTION_NOT_APPROVED"
176     - "DISTRIBUTION_APPROVED"
177     - "DISTRIBUTED"
178     - "DISTRIBUTION_REJECTED"
179   ErrorRepresentation:
180     description: "This class is used to describe error.\nfor nbi Beijing release we\
181       \ do not manage additional error for serviceCatalog"
182     required:
183     - "code"
184     - "reason"
185     type: "object"
186     properties:
187       code:
188         description: "Application related code (as defined in the API or from a common\
189           \ list)"
190         type: "integer"
191         format: "int32"
192       reason:
193         description: "Text that explains the reason for error. This can be shown to\
194           \ a client user."
195         type: "string"
196       message:
197         description: "Text that provide more details and corrective actions related\
198           \ to the error. This can be shown to a client user"
199         type: "string"
200       status:
201         description: "http error code extension like 400-2"
202         type: "string"
203       referenceErrror:
204         description: "url pointing to documentation describing the error"
205         type: "string"
206       '@type':
207         description: "The class type of a REST resource."
208         type: "string"
209       '@schemaLocation':
210         description: "it provides a link to the schema describing a REST resource."
211         type: "string"
212   TimePeriod:
213     description: "A time period"
214     type: "object"
215     properties:
216       startDateTime:
217         description: "Start date and time of the period"
218         type: "string"
219         format: "date-time"
220       endDateTime:
221         description: "End date and time of the period"
222         type: "string"
223         format: "date-time"
224   RelatedPartyRef:
225     description: "Party linked to the service catalog.\nin nbi we retrieve information\
226       \ about last updater of the service in SDC"
227     type: "object"
228     properties:
229       id:
230         description: "Unique identifier of the related party. Filled with lastUpdaterUserId"
231         type: "string"
232       role:
233         description: "Role payed by the related party\nOnly role 'lastUpdater' is\
234           \ retrieved in Beijing release"
235         type: "string"
236       name:
237         description: "Name of the related party - Filled with lastUpdatedFullName"
238         type: "string"
239   ServiceSpecification:
240     description: "ServiceSpecification is a class that offers characteristics to describe\
241       \ a type of service. Functionally, it acts as a template by which Services may\
242       \ be instantiated. By sharing the same specification, these services would therefore\
243       \ share the same set of characteristics.\nthe service information are retrieved\
244       \ in SDC"
245     required:
246     - "invariantUUID"
247     type: "object"
248     properties:
249       id:
250         description: "Unique identifier of the service specification. Filled with\
251           \ SDC Service uuid"
252         type: "string"
253       href:
254         description: "Reference of the service specification- not mapped in Beijing"
255         type: "string"
256       name:
257         description: "Name of the service specification- Filled with SDC Service name"
258         type: "string"
259       description:
260         description: "A narrative that explains in detail what the service specification\
261           \ is - Filled with SDC Service description"
262         type: "string"
263       '@type':
264         description: "This attribute allows to dynamically extends TMF class. Valued\
265           \ with 'ONAPservice'. We used this features to add following attributes:\n\
266           invariantUUID\ntoscaModelURL\ntoscaResourceName\ncategory (1)\nsubcategory\
267           \ (1)\ndistributionStatus"
268         type: "string"
269         default: "ONAPservice"
270       '@schemaLocation':
271         description: "Not used for Beijing release"
272         type: "string"
273       '@baseType':
274         description: "Not used for Beijing release"
275         type: "string"
276       invariantUUID:
277         description: "Additional attribute (not in the TMF API) - extended through\
278           \ @type - invariantUUID"
279         type: "string"
280       toscaModelURL:
281         description: "Additional attribute (not in the TMF API) - extended through\
282           \ @type - toscaModelURL"
283         type: "string"
284       toscaResourceName:
285         description: "Additional attribute (not in the TMF API) - extended through\
286           \ @type - toscaResourceName"
287         type: "string"
288       category:
289         description: "Additional attribute - extended through @type - category\nPlease\
290           \ note that this attribute is managed in TMF - in future release we'll introduce\
291           \ category resource"
292         type: "string"
293       subcategory:
294         description: "Additional attribute - extended through @type - category\nPlease\
295           \ note that this attribute is managed in TMF - in future release we'll introduce\
296           \ category resourc"
297         type: "string"
298       distributionStatus:
299         $ref: "#/definitions/DistributionStatus"
300       version:
301         description: "Service specification version - Filled with SDC Service version"
302         type: "string"
303       lifecycleStatus:
304         $ref: "#/definitions/LifecycleStatusValues"
305       targetServiceSchema:
306         $ref: "#/definitions/TargetServiceSchemaRef"
307       attachment:
308         type: "array"
309         items:
310           $ref: "#/definitions/Attachment"
311       relatedParty:
312         type: "array"
313         items:
314           $ref: "#/definitions/RelatedPartyRef"
315       resourceSpecification:
316         type: "array"
317         items:
318           $ref: "#/definitions/ResourceSpecificationRef"
319       serviceSpecCharacteristic:
320         type: "array"
321         items:
322           $ref: "#/definitions/ServiceSpecCharacteristic"
323   ServiceSpecCharacteristic:
324     description: "A characteristic quality or distinctive feature of a ServiceSpecification.\
325       \ \nServiceSpecCharacteristic are retrieved in the serviceTosca file in the\
326       \ topology_template section in the inputs section."
327     type: "object"
328     properties:
329       name:
330         description: "Name of the characteristic - Filled with parameter_name"
331         type: "string"
332       description:
333         description: "A narrative that explains in detail what the characteristic\
334           \ is - Filled with parameter_description"
335         type: "string"
336       valueType:
337         description: "A kind of value that the characteristic can take on, such as\
338           \ numeric, text and so forth - Filled with parameter_type"
339         type: "string"
340       '@type':
341         description: "This attribute allows to dynamically extends TMF class. Valued\
342           \ with: 'ONAPserviceCharacteristic'. We do not used this features in nbi\
343           \ Beijing release."
344         type: "string"
345       '@schemaLocation':
346         description: "An url pointing to type description - we do not use it in nbi\
347           \ Beijing release"
348         type: "string"
349       required:
350         description: "A parameter to define if the characteristic is mandatory - Filled\
351           \ from parameter_required – if not fielded by default ‘true’"
352         type: "boolean"
353         default: true
354       status:
355         description: "Status of the characteristic - filled with status_value"
356         type: "string"
357       serviceSpecCharacteristicValue:
358         type: "array"
359         items:
360           $ref: "#/definitions/ServiceSpecCharacteristicValue"
361   Attachment:
362     description: "An attachment is a file uses to describe the service.\nIn nbi we\
363       \ use attachment to retrieve ONAP artifacts."
364     type: "object"
365     properties:
366       id:
367         description: "Unique identifier of the attachment - filled with artifactUUID."
368         type: "string"
369       name:
370         description: "Name of the attachment - filled with artifactName"
371         type: "string"
372       description:
373         description: "Description of the attachment - filled with artifactDescription"
374         type: "string"
375       '@type':
376         description: "This attribute allows to dynamically extends TMF class. Valued\
377           \ with 'ONAPartifact'. We used this features to add following attributes:\
378           \ \nartifactLabel\nartifactGroupType\nartifactTimeout\nartifactChecksum\n\
379           artifactVersion\ngeneratedFromUUID"
380         type: "string"
381         default: "ONAPartifact"
382       artifactLabel:
383         description: "Additional attribute (not in the TMF API) - extended through\
384           \ @type - artifactLabel"
385         type: "string"
386       artifactGroupType:
387         description: "Additional attribute (not in the TMF API) - extended through\
388           \ @type - artifactGroupType"
389         type: "string"
390       artifactTimeout:
391         description: "Additional attribute (not in the TMF API) - extended through\
392           \ @type - artifactTimeout"
393         type: "string"
394       artifactChecksum:
395         description: "Additional attribute (not in the TMF API) - extended through\
396           \ @type - artifactChecksum"
397         type: "string"
398       artifactVersion:
399         description: "Additional attribute (not in the TMF API) - extended through\
400           \ @type - artifactVersion"
401         type: "string"
402       generatedFromUUID:
403         description: "Additional attribute (not in the TMF API) - extended through\
404           \ @type - generatedFromUUID"
405         type: "string"
406       url:
407         description: "Uniform Resource Locator, is a web page address - filled with\
408           \ artifactURL"
409         type: "string"
410       mimeType:
411         description: "Filled with artifactType"
412         type: "string"
413   ServiceSpecCharacteristicValue:
414     description: "A number or text that can be assigned to a service specification\
415       \ characteristic.\nServiceSpecCharacteristicValue are retrieved in the service\
416       \ Tosca file"
417     type: "object"
418     properties:
419       valueType:
420         description: "A kind of value that the characteristic can take on, such as\
421           \ numeric, text, and so forth\nRetrieved in the Tosca in the topology_template\
422           \ section in the inputs section - parameter_type. \nWe do not manage parameter_type=\
423           \ list or map for Beijing release"
424         type: "string"
425       isDefault:
426         description: "Information calculated from parameter default in the Tosca file"
427         type: "boolean"
428       value:
429         description: "A discrete value that the characteristic can take on"
430         type: "string"
431   ResourceSpecificationRef:
432     description: "A list of resourceSpec identified to deliver the service.\nfor nbi\
433       \ we retrieve resource information available in service description (through\
434       \ SDC api) bu as well information retrieved in the TOSCA file."
435     type: "object"
436     properties:
437       id:
438         description: "Unique identifier of the resource specification - filled with\
439           \ resourceUUID"
440         type: "string"
441       version:
442         description: "Version for this resource specification - filled with resourceVersion"
443         type: "string"
444       name:
445         description: "Name of the resource specification - filled with resourceName"
446         type: "string"
447       '@type':
448         description: "This attribute allows to dynamically extends TMF class. Valued\
449           \ with: 'ONAPresource'. We used this features to add following attributes:\n\
450           resourceInstanceName\nresourceInvariantUUID\nresourceType\nmodelCustomizationName\n\
451           modelCustomizationId"
452         type: "string"
453         default: "ONAPresource"
454       resourceInstanceName:
455         description: "Additional attribute (not in the TMF API) - extended through\
456           \ @type - resourceInstanceName"
457         type: "string"
458       resourceInvariantUUID:
459         description: "Additional attribute (not in the TMF API) - extended through\
460           \ @type - resourceInvariantUUID"
461         type: "string"
462       resourceType:
463         description: "Additional attribute (not in the TMF API) - extended through\
464           \ @type - resoucreType"
465         type: "string"
466       modelCustomizationName:
467         description: "Additional attribute (not in the TMF API) - extended through\
468           \ @type - Retrieved in the TOSCA file : attribute name in topology_template/node_template\
469           \ for the resource"
470         type: "string"
471       modelCustomizationId:
472         description: "Additional attribute (not in the TMF API) - extended through\
473           \ @type - Retrieved in the TOSCA file : attribute customizationUUID in topology_template/node_template\
474           \ for the resource"
475         type: "string"
476   TargetServiceSchemaRef:
477     description: ""
478     required:
479     - "@type"
480     - "@schemaLocation"
481     type: "object"
482     properties:
483       '@type':
484         description: ""
485         type: "string"
486       '@schemaLocation':
487         description: ""
488         type: "string"