Add API Documentation for Casablanca
[externalapi/nbi.git] / docs / offeredapis / swaggers / serviceInventory_3_0_0.yaml
1 swagger: "2.0"
2 info:
3   description: "serviceInventory API designed for ONAP Casablanca Release.\nThis API\
4     \ is build from TMF open API18.0 (applying TMF Guideline 3.0)\nonly operation\
5     \ GET (by id & byList) for resource serviceSpecification is available"
6   version: "3.0.0"
7   title: "API ServiceInventory"
8   x-logo:
9     url: "/redoc/logo.png"
10     backgroundColor: "#FFFFFF"
11 host: "serverRoot"
12 basePath: "/nbi/api/v3"
13 schemes:
14 - "https"
15 produces:
16 - "application/json;charset=utf-8"
17 tags:
18 - name: "Service"
19   description: ""
20 paths:
21   /service:
22     get:
23       tags:
24       - "Service"
25       produces:
26       - "application/json;charset=utf-8"
27       operationId: "serviceFind"
28       summary: "List services"
29       description: "This operation list service entities. \nAttribute selection is\
30         \ restricted. \nfields attribute may be used to filter retrieved attribute(s)\
31         \ for each service\n\nSpecific business errors for current operation will\
32         \ be encapsulated in\n\nHTTP Response 422 Unprocessable entity\n"
33       deprecated: false
34       parameters:
35       - name: "relatedParty.id"
36         required: false
37         in: "query"
38         description: ""
39         type: "string"
40       - name: "serviceSpecification.id"
41         required: false
42         in: "query"
43         description: ""
44         type: "string"
45       - name: "serviceSpecification.name"
46         required: false
47         in: "query"
48         description: ""
49         type: "string"
50       - name: "id"
51         required: false
52         in: "query"
53         description: ""
54         type: "string"
55       - name: "fields"
56         required: false
57         in: "query"
58         description: ""
59         type: "string"
60       responses:
61         200:
62           description: "Success"
63           schema:
64             type: "array"
65             items:
66               $ref: "#/definitions/ListService"
67         400:
68           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
69             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
70             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
71             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
72             \ parameter value"
73           schema:
74             $ref: "#/definitions/ErrorRepresentation"
75         401:
76           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
77             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
78           schema:
79             $ref: "#/definitions/ErrorRepresentation"
80         403:
81           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
82             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
83             \ requests"
84           schema:
85             $ref: "#/definitions/ErrorRepresentation"
86         404:
87           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
88             \ not found"
89           schema:
90             $ref: "#/definitions/ErrorRepresentation"
91         422:
92           description: "Unprocessable entity\n\nFunctional error"
93           schema:
94             $ref: "#/definitions/ErrorRepresentation"
95         500:
96           description: "Internal Server Error\n\nList of supported error codes:\n\
97             - 1: Internal error"
98           schema:
99             $ref: "#/definitions/ErrorRepresentation"
100         503:
101           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
102             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
103             \ retry later !"
104           schema:
105             $ref: "#/definitions/ErrorRepresentation"
106   /service/{id}:
107     get:
108       tags:
109       - "Service"
110       produces:
111       - "application/json;charset=utf-8"
112       operationId: "serviceGet"
113       summary: "Retrieve a service"
114       description: "This operation retrieves a service entity. \nAttribute selection\
115         \ is enabled for all first level attributes.\n\nSpecific business errors for\
116         \ current operation will be encapsulated in\n\nHTTP Response 422 Unprocessable\
117         \ entity\n"
118       deprecated: false
119       parameters:
120       - name: "id"
121         in: "path"
122         required: true
123         type: "string"
124         description: ""
125       - name: "relatedParty.id"
126         required: false
127         in: "query"
128         description: ""
129         type: "string"
130       - name: "serviceSpecification.id"
131         required: false
132         in: "query"
133         description: ""
134         type: "string"
135       - name: "serviceSpecification.name"
136         required: false
137         in: "query"
138         description: ""
139         type: "string"
140       responses:
141         200:
142           description: "Success"
143           schema:
144             $ref: "#/definitions/Service"
145         400:
146           description: "Bad Request\n\nList of supported error codes:\n- 20: Invalid\
147             \ URL parameter value\n- 21: Missing body\n- 22: Invalid body\n- 23: Missing\
148             \ body field\n- 24: Invalid body field\n- 25: Missing header\n- 26: Invalid\
149             \ header value\n- 27: Missing query-string parameter\n- 28: Invalid query-string\
150             \ parameter value"
151           schema:
152             $ref: "#/definitions/ErrorRepresentation"
153         401:
154           description: "Unauthorized\n\nList of supported error codes:\n- 40: Missing\
155             \ credentials\n- 41: Invalid credentials\n- 42: Expired credentials"
156           schema:
157             $ref: "#/definitions/ErrorRepresentation"
158         403:
159           description: "Forbidden\n\nList of supported error codes:\n- 50: Access\
160             \ denied\n- 51: Forbidden requester\n- 52: Forbidden user\n- 53: Too many\
161             \ requests"
162           schema:
163             $ref: "#/definitions/ErrorRepresentation"
164         404:
165           description: "Not Found\n\nList of supported error codes:\n- 60: Resource\
166             \ not found"
167           schema:
168             $ref: "#/definitions/ErrorRepresentation"
169         422:
170           description: "Unprocessable entity\n\nFunctional error"
171           schema:
172             $ref: "#/definitions/ErrorRepresentation"
173         500:
174           description: "Internal Server Error\n\nList of supported error codes:\n\
175             - 1: Internal error"
176           schema:
177             $ref: "#/definitions/ErrorRepresentation"
178         503:
179           description: "Service Unavailable\n\nList of supported error codes:\n- 5:\
180             \ The service is temporarily unavailable\n- 6: Orange API is over capacity,\
181             \ retry later !"
182           schema:
183             $ref: "#/definitions/ErrorRepresentation"
184 definitions:
185   ErrorRepresentation:
186     description: "This class is used to describe error.\nfor nbi Beijing release we\
187       \ do not manage additional error for serviceCatalog"
188     required:
189     - "code"
190     - "reason"
191     type: "object"
192     properties:
193       code:
194         description: "Application related code (as defined in the API or from a common\
195           \ list)"
196         type: "integer"
197         format: "int32"
198       reason:
199         description: "Text that explains the reason for error. This can be shown to\
200           \ a client user."
201         type: "string"
202       message:
203         description: "Text that provide more details and corrective actions related\
204           \ to the error. This can be shown to a client user."
205         type: "string"
206       status:
207         description: "http error code extension like 400-2"
208         type: "string"
209       referenceError:
210         description: "url pointing to documentation describing the error"
211         type: "string"
212       '@type':
213         description: "The class type of a REST resource."
214         type: "string"
215       '@schemaLocation':
216         description: "it provides a link to the schema describing a REST resource."
217         type: "string"
218   Service:
219     description: "Instantiated service (service_instance) in AAI"
220     type: "object"
221     properties:
222       id:
223         description: "Unique identifier of the service - Valued with service-instance-id"
224         type: "string"
225       href:
226         description: "Reference of the service\nNot managed in Beijing release"
227         type: "string"
228       name:
229         description: "Name of the service - Valued with service-instance-name"
230         type: "string"
231       type:
232         description: "Service type - valued with 'service-instance'"
233         type: "string"
234       state:
235         description: "State of the service. Not managed in Beijing release"
236         type: "string"
237       hasStarted:
238         description: "This is a Boolean attribute that, if TRUE, signifies that this\
239           \ Service has already been started. If the value of this attribute is FALSE,\
240           \ then this signifies that this Service has NOT been Started\nNot managed\
241           \ in Beijing release"
242         type: "boolean"
243       '@type':
244         description: "This attribute allows to dynamically extends TMF class. Not\
245           \ used in Beijing release."
246         type: "string"
247       '@baseType':
248         description: "Not managed in Beijing release"
249         type: "string"
250       '@schemaLocation':
251         description: "Not managed in Beijing release"
252         type: "string"
253       serviceSpecification:
254         $ref: "#/definitions/ServiceSpecificationRef"
255       characteristic:
256         type: "array"
257         items:
258           $ref: "#/definitions/ServiceCharacteristic"
259       supportingResource:
260         type: "array"
261         items:
262           $ref: "#/definitions/SupportingResource"
263       relatedParty:
264         type: "array"
265         items:
266           $ref: "#/definitions/RelatedPartyRef"
267   ServiceSpecificationRef:
268     description: "Service specification reference: ServiceSpecification of this service\
269       \ (catalog information)"
270     type: "object"
271     properties:
272       id:
273         description: "Unique identifier of the service specification. valued to model-version-id"
274         type: "string"
275       href:
276         description: "Reference of the service specification.\nnot managed in Beijing\
277           \ release."
278         type: "string"
279       name:
280         description: "Name of the required service specification"
281         type: "string"
282       version:
283         description: "Service specification version.\nNot managed in Beijing release"
284         type: "string"
285       '@referredType':
286         description: "This attribute allows to dynamically extends TMF class. Valued\
287           \ with 'ONAPservice'. We used this features to add following attribute:\
288           \ invariantUUID"
289         type: "string"
290       '@schemaLocation':
291         description: "Not managed in Beijing release"
292         type: "string"
293       invariantUUID:
294         description: "Additional attribute (not in the TMF API) - extended through\
295           \ @referredType - model-invariant-id"
296         type: "string"
297   ServiceCharacteristic:
298     description: "A list of name value pairs that define the service characteristics\n\
299       Not managed in Beijing release."
300     required:
301     - "name"
302     type: "object"
303     properties:
304       name:
305         description: "Name of the characteristic\nNot managed in Beijing release."
306         type: "string"
307       valueType:
308         description: "Type of value for this characteristic.\nNot managed in Beijing\
309           \ release."
310         type: "string"
311       value:
312         $ref: "#/definitions/Value"
313   SupportingResource:
314     description: "Supporting resource - A supportingResource will be retrieved for\
315       \ each relationship of the relationship-list where related-link describe a vnf"
316     type: "object"
317     properties:
318       id:
319         description: "Unique identifier of the supporting resource - Valued to vnf-id"
320         type: "string"
321       href:
322         description: "Reference of the supporting resource"
323         type: "string"
324       role:
325         description: "Not managed in Beijing release."
326         type: "string"
327       name:
328         description: "Name of the supporting resource - Valued with vnf_-name"
329         type: "string"
330       '@referredType':
331         description: "This attribute allows to dynamically extends TMF class. Valued\
332           \ with 'ONAP resource'. We used this features to add following attributes:\n\
333           \    status\t\n    modelInvariantId\n   modelVersionId\n   modelCustomisationId"
334         type: "string"
335       '@schemaLocation':
336         description: "Not managed in Beijing release."
337         type: "string"
338       status:
339         description: "Additional attribute (not in the TMF API) - extended through\
340           \ @referredType - valued with prov-status"
341         type: "string"
342       modelInvariantId:
343         description: "Additional attribute (not in the TMF API) - extended through\
344           \ @referredType - valued with model-invariant-id"
345         type: "string"
346       modelVersionId:
347         description: "Additional attribute (not in the TMF API) - extended through\
348           \ @referredType - valued with model-verson-id"
349         type: "string"
350       modelCustomisationId:
351         description: "Additional attribute (not in the TMF API) - extended through\
352           \ @referredType - valued with model-customisation-id"
353         type: "string"
354   RelatedPartyRef:
355     description: "RelatedParty reference. A related party defines party or party role\
356       \ linked to a specific entity.\nOnly ONAP Customer is managed in Beijing release."
357     type: "object"
358     properties:
359       id:
360         description: "Unique identifier of a related party"
361         type: "string"
362       href:
363         description: "Reference of a related party.\nNot filled in Beijing release."
364         type: "string"
365       role:
366         description: "Role played by the related party.\nFilled with 'ONAPcustomer'"
367         type: "string"
368       '@referredType':
369         description: "Not managed in the Beijing release."
370         type: "string"
371   Value:
372     description: "Structure used to describe characteristic value.\nNot managed in\
373       \ Beijing release."
374     type: "object"
375     properties:
376       '@type':
377         description: "Not managed in Beijing release."
378         type: "string"
379       '@schemaLocation':
380         description: "Not managed in Beijing release."
381         type: "string"
382       serviceCharacteristicValue:
383         description: "Not managed in Beijing release."
384         type: "string"
385   ListRelatedPartyRef:
386     description: "This class is used to structure list of service(s) retrieved"
387     type: "object"
388     properties:
389       id:
390         description: "Unique identifier of a related party"
391         type: "string"
392       role:
393         description: "Role played by the related party - only role “ONAPcustomer”\
394           \ is managed in Beijing release."
395         type: "string"
396   ListServiceSpecificationRef:
397     description: "This class is used to structure list of service(s) retrieved"
398     type: "object"
399     properties:
400       id:
401         description: "Unique identifier of the service specification"
402         type: "string"
403       name:
404         description: "Name of the required service specification"
405         type: "string"
406   ListService:
407     description: "This class is used to structure list of service(s) retrieved"
408     type: "object"
409     properties:
410       id:
411         description: "Unique identifier of the service"
412         type: "string"
413       name:
414         description: "Name of the service"
415         type: "string"
416       serviceSpecification:
417         $ref: "#/definitions/ListServiceSpecificationRef"
418       relatedParty:
419         $ref: "#/definitions/ListRelatedPartyRef"