b9cfbc6fa82db5f894947a17c12e166b9b919786
[externalapi/nbi.git] / docs / offeredapis / api_serviceCatalog / swagger.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\n\n"
6   version: "4.0.1"
7   title: "API ServiceCatalog"
8   x-logo:
9     url: "/redoc/logo.png"
10     backgroundColor: "#FFFFFF"
11 host: "serverRoot"
12 basePath: "/nbi/api/v1"
13 schemes:
14 - "https"
15 produces:
16 - "application/json;charset=utf-8"
17 tags:
18 - name: "ServiceSpecification"
19   description: ""
20 paths:
21   /serviceSpecification:
22     get:
23       tags:
24       - "ServiceSpecification"
25       produces:
26       - "application/json;charset=utf-8"
27       operationId: "serviceSpecificationFind"
28       summary: "List service specifications"
29       description: "This operation returns service specifications from a catalog.\n\
30         Only a predefined set of attribute is proposed : Based on SDC limitations,\
31         \ only attributes category and distributionStatus are available for serviceSpecification\
32         \ filtering\nFields attribute could be used to filter attributes retrieved"
33       deprecated: false
34       parameters:
35       - name: "fields"
36         required: false
37         in: "query"
38         description: "Field selection - used to filtering the attributes to be retreived"
39         type: "string"
40       - name: "category"
41         required: false
42         in: "query"
43         description: "Service Category (filter)"
44         type: "string"
45       - name: "distributionStatus"
46         required: false
47         in: "query"
48         description: "Service distribution status (filter)"
49         type: "string"
50       responses:
51         200:
52           description: "Ok"
53           schema:
54             type: "array"
55             items:
56               $ref: "#/definitions/ServiceSpecification"
57         400:
58           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
59             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
60             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
61             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
62             \ parameter value"
63           schema:
64             $ref: "#/definitions/ErrorRepresentation"
65         401:
66           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
67             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
68           schema:
69             $ref: "#/definitions/ErrorRepresentation"
70         403:
71           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
72             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
73             \ requests"
74           schema:
75             $ref: "#/definitions/ErrorRepresentation"
76         404:
77           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
78             \ not found"
79           schema:
80             $ref: "#/definitions/ErrorRepresentation"
81         422:
82           description: "Unprocessable entity\n\nFunctional error"
83           schema:
84             $ref: "#/definitions/ErrorRepresentation"
85         500:
86           description: "Internal Server Error\n\nList of supported error codes:\n\
87             - 1: Internal error"
88           schema:
89             $ref: "#/definitions/ErrorRepresentation"
90         503:
91           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
92             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
93             \ retry later !"
94           schema:
95             $ref: "#/definitions/ErrorRepresentation"
96   /serviceSpecification/{id}:
97     get:
98       tags:
99       - "ServiceSpecification"
100       produces:
101       - "application/json;charset=utf-8"
102       operationId: "serviceSpecificationGet"
103       summary: "Retrieve a service specification"
104       description: "This operation returns a service specification by its id from\
105         \ a catalog. Attribute selection is enabled using the fields attribute."
106       deprecated: false
107       parameters:
108       - name: "id"
109         required: true
110         in: "path"
111         type: "string"
112       - name: "fields"
113         required: false
114         in: "query"
115         description: "Attribute selection"
116         type: "string"
117       responses:
118         200:
119           description: "Ok"
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"