Fix Spectral error and add https scheme
[externalapi/nbi.git] / docs / offeredapis / api_serviceInventory / swagger.yaml
1 #    Copyright (c) 2018 Orange
2 #
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
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
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"
14 swagger: "2.0"
15 info:
16   description: "Query information about instantiated services\n\nList of available\
17     \ subscription for serviceInventory notifications, see /hub resources for more\
18     \ information:\n\n- ServiceCreationNotification\n- ServiceAttributeValueChangeNotification\n\
19     - ServiceRemoveNotification\n\n"
20   version: "4.1.0"
21   title: "ServiceInventory API"
22   contact:
23     name: "ONAP"
24     url: "https://onap.readthedocs.io"
25     email: "onap-discuss@lists.onap.org"
26   license:
27     name: "Apache 2.0"
28     url: "http://www.apache.org/licenses/LICENSE-2.0"
29   x-planned-retirement-date: "205001"
30   x-component: "NBI"
31   x-logo:
32     url: "/redoc/logo.png"
33     backgroundColor: "#FFFFFF"
34 host: "serverRoot:30274"
35 basePath: "/nbi/api/v4"
36 schemes:
37 - "http"
38 - "https"
39 produces:
40 - "application/json;charset=utf-8"
41 tags:
42 - name: "Service"
43   description: "Provided by NBI"
44 - name: "Notification"
45   description: "provided by subscriber, which MUST has been registered by creating\
46     \ a Hub ressource on NBI"
47 paths:
48   x-interface:
49     api-version: "4.1.0"
50     last-mod-release: "Frankfurt"
51   /service:
52     get:
53       tags:
54       - "Service"
55       produces:
56       - "application/json;charset=utf-8"
57       operationId: "service_Find"
58       summary: "List services"
59       description: "This operation list service entities. \nAttribute selection is\
60         \ restricted. \nfields attribute may be used to filter retrieved attribute(s)\
61         \ for each service"
62       deprecated: false
63       parameters:
64       - name: "relatedParty.id"
65         required: false
66         in: "query"
67         description: ""
68         type: "string"
69       - name: "serviceSpecification.id"
70         required: false
71         in: "query"
72         description: ""
73         type: "string"
74       - name: "serviceSpecification.name"
75         required: false
76         in: "query"
77         description: ""
78         type: "string"
79       - name: "id"
80         required: false
81         in: "query"
82         description: ""
83         type: "string"
84       - name: "fields"
85         required: false
86         in: "query"
87         description: ""
88         type: "string"
89       responses:
90         "200":
91           description: "Ok"
92           schema:
93             type: "array"
94             items:
95               $ref: "#/definitions/ListService"
96   /service/{id}:
97     get:
98       tags:
99       - "Service"
100       produces:
101       - "application/json;charset=utf-8"
102       operationId: "service_Get"
103       summary: "Retrieve a service"
104       description: "This operation retrieves a service entity. \nAttribute selection\
105         \ is enabled for all first level attributes."
106       deprecated: false
107       parameters:
108       - name: "id"
109         required: true
110         in: "path"
111         type: "string"
112       responses:
113         "200":
114           description: "Ok"
115           schema:
116             $ref: "#/definitions/Service"
117   /notification:
118     post:
119       tags:
120       - "Notification"
121       consumes:
122       - "application/json;charset=utf-8"
123       produces:
124       - "application/json;charset=utf-8"
125       operationId: "notification_Create"
126       summary: "NBI will send notification to this operation provided by subscribers"
127       description: ""
128       deprecated: false
129       parameters:
130       - name: "Notification"
131         required: true
132         in: "body"
133         description: ""
134         schema:
135           $ref: "#/definitions/Notification"
136       responses:
137         "201":
138           description: "Created"
139           schema:
140             $ref: "#/definitions/Notification"
141 definitions:
142   eventType:
143     description: "The Event Type"
144     type: "string"
145     enum:
146     - "ServiceCreationNotification"
147     - "ServiceAttributeValueChangeNotification"
148     - "ServiceRemoveNotification"
149   ErrorRepresentation:
150     description: "This class is used to describe error."
151     required:
152     - "code"
153     - "reason"
154     type: "object"
155     properties:
156       code:
157         description: "Application related code (as defined in the API or from a common\
158           \ list)"
159         type: "integer"
160         format: "int32"
161       reason:
162         description: "Text that explains the reason for error. This can be shown to\
163           \ a client user."
164         type: "string"
165       message:
166         description: "Text that provide more details and corrective actions related\
167           \ to the error. This can be shown to a client user."
168         type: "string"
169       status:
170         description: "http error code extension like 400-2"
171         type: "string"
172       referenceError:
173         description: "url pointing to documentation describing the error"
174         type: "string"
175       '@type':
176         description: "The class type of a REST resource."
177         type: "string"
178       '@schemaLocation':
179         description: "it provides a link to the schema describing a REST resource."
180         type: "string"
181   Service:
182     description: "Instantiated service (service_instance) in AAI"
183     type: "object"
184     properties:
185       id:
186         description: "Unique identifier of the service - Valued with service-instance-id"
187         type: "string"
188       href:
189         description: "Reference of the service\nNot managed in Beijing release"
190         type: "string"
191       name:
192         description: "Name of the service - Valued with service-instance-name"
193         type: "string"
194       type:
195         description: "Service type - valued with 'service-instance'"
196         type: "string"
197       state:
198         description: "State of the service."
199         type: "string"
200       '@type':
201         description: "This attribute allows to dynamically extends TMF class. Not\
202           \ used in Beijing release."
203         type: "string"
204       '@baseType':
205         description: "Not managed in Beijing release"
206         type: "string"
207       '@schemaLocation':
208         description: "Not managed in Beijing release"
209         type: "string"
210       serviceSpecification:
211         $ref: "#/definitions/ServiceSpecificationRef"
212       characteristic:
213         type: "array"
214         items:
215           $ref: "#/definitions/ServiceCharacteristic"
216       supportingResource:
217         type: "array"
218         items:
219           $ref: "#/definitions/SupportingResource"
220       relatedParty:
221         type: "array"
222         items:
223           $ref: "#/definitions/RelatedPartyRef"
224   ServiceSpecificationRef:
225     description: "Service specification reference: ServiceSpecification of this service\
226       \ (catalog information)"
227     type: "object"
228     properties:
229       id:
230         description: "Unique identifier of the service specification. valued to model-version-id"
231         type: "string"
232       href:
233         description: "Reference of the service specification.\nnot managed in Beijing\
234           \ release."
235         type: "string"
236       name:
237         description: "Name of the required service specification"
238         type: "string"
239       version:
240         description: "Service specification version.\nNot managed in Beijing release"
241         type: "string"
242       '@referredType':
243         description: "This attribute allows to dynamically extends TMF class. Valued\
244           \ with 'ONAPservice'. We used this features to add following attribute:\
245           \ invariantUUID"
246         type: "string"
247       '@schemaLocation':
248         description: "Not managed in Beijing release"
249         type: "string"
250       invariantUUID:
251         description: "Additional attribute (not in the TMF API) - extended through\
252           \ @referredType - model-invariant-id"
253         type: "string"
254   ServiceCharacteristic:
255     description: "A list of name value pairs that define the service characteristics\n\
256       Not managed in Beijing release."
257     required:
258     - "name"
259     type: "object"
260     properties:
261       name:
262         description: "Name of the characteristic\nNot managed in Beijing release."
263         type: "string"
264       valueType:
265         description: "Type of value for this characteristic.\nNot managed in Beijing\
266           \ release."
267         type: "string"
268       value:
269         $ref: "#/definitions/Value"
270   SupportingResource:
271     description: "Supporting resource - A supportingResource will be retrieved for\
272       \ each relationship of the relationship-list where related-link describe a vnf"
273     type: "object"
274     properties:
275       id:
276         description: "Unique identifier of the supporting resource - Valued to vnf-id"
277         type: "string"
278       href:
279         description: "Reference of the supporting resource"
280         type: "string"
281       role:
282         description: "Not managed in Beijing release."
283         type: "string"
284       name:
285         description: "Name of the supporting resource - Valued with vnf_-name"
286         type: "string"
287       '@referredType':
288         description: "This attribute allows to dynamically extends TMF class. Valued\
289           \ with 'ONAP resource'. We used this features to add following attributes:\n\
290           \    status\t\n    modelInvariantId\n   modelVersionId\n   modelCustomisationId"
291         type: "string"
292       '@schemaLocation':
293         description: "Not managed in Beijing release."
294         type: "string"
295       status:
296         description: "Additional attribute (not in the TMF API) - extended through\
297           \ @referredType - valued with prov-status"
298         type: "string"
299       modelInvariantId:
300         description: "Additional attribute (not in the TMF API) - extended through\
301           \ @referredType - valued with model-invariant-id"
302         type: "string"
303       modelVersionId:
304         description: "Additional attribute (not in the TMF API) - extended through\
305           \ @referredType - valued with model-verson-id"
306         type: "string"
307       modelCustomisationId:
308         description: "Additional attribute (not in the TMF API) - extended through\
309           \ @referredType - valued with model-customisation-id"
310         type: "string"
311   RelatedPartyRef:
312     description: "RelatedParty reference. A related party defines party or party role\
313       \ linked to a specific entity."
314     type: "object"
315     properties:
316       id:
317         description: "Unique identifier of a related party"
318         type: "string"
319       href:
320         description: "Reference of a related party.\nNot filled in Beijing release."
321         type: "string"
322       role:
323         description: "Role played by the related party.\nFilled with 'ONAPcustomer'"
324         type: "string"
325       '@referredType':
326         description: "Not managed in the Beijing release."
327         type: "string"
328   Value:
329     description: "Structure used to describe characteristic value.\nNot managed in\
330       \ Beijing release."
331     type: "object"
332     properties:
333       '@type':
334         description: "Not managed in Beijing release."
335         type: "string"
336       '@schemaLocation':
337         description: "Not managed in Beijing release."
338         type: "string"
339       serviceCharacteristicValue:
340         description: "Not managed in Beijing release."
341         type: "string"
342   ListRelatedPartyRef:
343     description: "This class is used to structure list of service(s) retrieved"
344     type: "object"
345     properties:
346       id:
347         description: "Unique identifier of a related party"
348         type: "string"
349       role:
350         description: "Role played by the related party - only role “ONAPcustomer”\
351           \ is managed in Beijing release."
352         type: "string"
353   ListServiceSpecificationRef:
354     description: "This class is used to structure list of service(s) retrieved"
355     type: "object"
356     properties:
357       id:
358         description: "Unique identifier of the service specification"
359         type: "string"
360       name:
361         description: "Name of the required service specification"
362         type: "string"
363   ListService:
364     description: "This class is used to structure list of service(s) retrieved"
365     type: "object"
366     properties:
367       id:
368         description: "Unique identifier of the service"
369         type: "string"
370       name:
371         description: "Name of the service"
372         type: "string"
373       serviceSpecification:
374         $ref: "#/definitions/ListServiceSpecificationRef"
375       relatedParty:
376         $ref: "#/definitions/ListRelatedPartyRef"
377   ServiceInventoryEvent:
378     description: "Structure for a service inventory event notification"
379     required:
380     - "id"
381     - "href"
382     - "name"
383     - "type"
384     - "state"
385     - "relatedParty"
386     type: "object"
387     properties:
388       id:
389         description: "The Service Instance Id"
390         type: "string"
391       href:
392         description: "A reference to the service inventory"
393         type: "string"
394       name:
395         description: "The name of the Service Instance"
396         type: "string"
397       type:
398         description: "The type of event, service-instance"
399         type: "string"
400       state:
401         description: "The state of the service instance"
402         type: "string"
403       relatedParty:
404         $ref: "#/definitions/RelatedPartyRef"
405   Notification:
406     description: "Notification structure for a service notification"
407     required:
408     - "eventId"
409     - "eventDate"
410     - "eventType"
411     - "event"
412     type: "object"
413     properties:
414       eventId:
415         description: ""
416         type: "string"
417       eventDate:
418         description: ""
419         type: "string"
420         format: "date-time"
421       eventType:
422         $ref: "#/definitions/eventType"
423       event:
424         $ref: "#/definitions/ServiceInventoryEvent"