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