blob: 11dbcbc5934226b146dacf87cdaed23444e5e9c3 [file] [log] [blame]
Lusheng Ji6553a132017-10-12 02:47:00 +00001swagger: '2.0'
2info:
3 version: "2.1.0"
4 title: DCAE Inventory API
5 description: |
6 DCAE Inventory is a web service that provides the following:
7
8 1. Real-time data on all DCAE services and their components
9 2. Comprehensive details on available DCAE service types
10 contact:
11 email: dcae@lists.openecomp.org
12externalDocs:
13 description: DCAE Inventory
14 url: https://gerrit.onap.org/r/#/admin/projects/dcae/dcae-inventory
15paths:
16 /dcae-service-types:
17 get:
18 summary: ""
19 description: "Get a list of `DCAEServiceType` objects."
20 operationId: "dcaeServiceTypesGet"
21 consumes:
22 - "application/json"
23 - "application/vnd.dcae.inventory.v1+json"
24 produces:
25 - "application/json"
26 - "application/vnd.dcae.inventory.v1+json"
27 parameters:
28 - name: "typeName"
29 in: "query"
30 description: "Filter by service type name"
31 required: false
32 type: "string"
33 - name: "onlyLatest"
34 in: "query"
35 description: "If set to true, query returns just the latest versions of DCAE\
36 \ service types. If set to false, then all versions are returned. Default\
37 \ is true"
38 required: false
39 type: "boolean"
40 default: true
41 - name: "onlyActive"
42 in: "query"
43 description: "If set to true, query returns only *active* DCAE service types.\
44 \ If set to false, then all DCAE service types are returned. Default is\
45 \ true"
46 required: false
47 type: "boolean"
48 default: true
49 - name: "vnfType"
50 in: "query"
51 description: "Filter by associated vnf type. No wildcards, matches are explicit.\
52 \ This field is treated case insensitive."
53 required: false
54 type: "string"
55 - name: "serviceId"
56 in: "query"
57 description: "Filter by assocaited service id. Instances with service id null\
58 \ or empty is always returned."
59 required: false
60 type: "string"
61 - name: "serviceLocation"
62 in: "query"
63 description: "Filter by associated service location. Instances with service\
64 \ location null or empty is always returned."
65 required: false
66 type: "string"
67 - name: "asdcServiceId"
68 in: "query"
69 description: "Filter by associated asdc design service id. Setting this to\
70 \ `NONE` will return instances that have asdc service id set to null"
71 required: false
72 type: "string"
73 - name: "asdcResourceId"
74 in: "query"
75 description: "Filter by associated asdc design resource id. Setting this to\
76 \ `NONE` will return instances that have asdc resource id set to null"
77 required: false
78 type: "string"
79 - name: "offset"
80 in: "query"
81 description: "Query resultset offset used for pagination (zero-based)"
82 required: false
83 type: "integer"
84 format: "int32"
85 responses:
86 200:
87 description: "List of `DCAEServiceType` objects"
88 schema:
89 $ref: "#/definitions/InlineResponse200"
90 post:
91 summary: ""
92 description: "Inserts a new `DCAEServiceType` or updates an existing instance.\
93 \ Updates are only allowed iff there are no running DCAE services of the requested\
94 \ type,"
95 operationId: "dcaeServiceTypesTypeNamePut"
96 consumes:
97 - "application/json"
98 produces:
99 - "application/json"
100 parameters:
101 - in: "body"
102 name: "body"
103 required: true
104 schema:
105 $ref: "#/definitions/DCAEServiceTypeRequest"
106 responses:
107 200:
108 description: "Single `DCAEServiceType` object."
109 schema:
110 $ref: "#/definitions/DCAEServiceType"
111 400:
112 description: "Bad request provided."
113 schema:
114 $ref: "#/definitions/ApiResponseMessage"
115 409:
116 description: "Failed to update because there are still DCAE services of\
117 \ the requested type running."
118 schema:
119 $ref: "#/definitions/ApiResponseMessage"
120 /dcae-service-types/{typeId}:
121 get:
122 summary: ""
123 description: "Get a `DCAEServiceType` object."
124 operationId: "dcaeServiceTypesTypeIdGet"
125 consumes:
126 - "application/json"
127 produces:
128 - "application/json"
129 parameters:
130 - name: "typeId"
131 in: "path"
132 required: true
133 type: "string"
134 responses:
135 200:
136 description: "Single `DCAEServiceType` object"
137 schema:
138 $ref: "#/definitions/DCAEServiceType"
139 404:
140 description: "Resource not found"
141 schema:
142 $ref: "#/definitions/DCAEServiceType"
143 delete:
144 summary: ""
145 description: "Deactivates existing `DCAEServiceType` instances"
146 operationId: "dcaeServiceTypesTypeIdDelete"
147 consumes:
148 - "application/vnd.dcae.inventory.v1+json"
149 - "application/json"
150 produces:
151 - "application/vnd.dcae.inventory.v1+json"
152 - "application/json"
153 parameters:
154 - name: "typeId"
155 in: "path"
156 required: true
157 type: "string"
158 responses:
159 200:
160 description: "`DCAEServiceType` has been deactivated"
161 schema:
162 $ref: "#/definitions/ApiResponseMessage"
163 410:
164 description: "`DCAEServiceType` already gone"
165 schema:
166 $ref: "#/definitions/ApiResponseMessage"
167 404:
168 description: "`DCAEServiceType` not found"
169 schema:
170 $ref: "#/definitions/ApiResponseMessage"
171 /dcae-services:
172 get:
173 summary: ""
174 description: "Get a list of `DCAEService` objects."
175 operationId: "dcaeServicesGet"
176 consumes:
177 - "application/json"
178 - "application/vnd.dcae.inventory.v1+json"
179 produces:
180 - "application/json"
181 - "application/vnd.dcae.inventory.v1+json"
182 parameters:
183 - name: "typeId"
184 in: "query"
185 description: "DCAE service type name"
186 required: false
187 type: "string"
188 - name: "vnfId"
189 in: "query"
190 required: false
191 type: "string"
192 - name: "vnfType"
193 in: "query"
194 description: "Filter by associated vnf type. This field is treated case insensitive."
195 required: false
196 type: "string"
197 - name: "vnfLocation"
198 in: "query"
199 required: false
200 type: "string"
201 - name: "componentType"
202 in: "query"
203 description: "Use to filter by a specific DCAE service component type"
204 required: false
205 type: "string"
206 - name: "shareable"
207 in: "query"
208 description: "Use to filter by DCAE services that have shareable components\
209 \ or not"
210 required: false
211 type: "boolean"
212 - name: "created"
213 in: "query"
214 description: "Use to filter by created time"
215 required: false
216 type: "string"
217 - name: "offset"
218 in: "query"
219 description: "Query resultset offset used for pagination (zero-based)"
220 required: false
221 type: "integer"
222 format: "int32"
223 responses:
224 200:
225 description: "List of `DCAEService` objects"
226 schema:
227 $ref: "#/definitions/InlineResponse2001"
228 502:
229 description: "Bad response from DCAE controller"
230 schema:
231 $ref: "#/definitions/ApiResponseMessage"
232 504:
233 description: "Failed to connect with DCAE controller"
234 schema:
235 $ref: "#/definitions/ApiResponseMessage"
236 /dcae-services-groupby/{propertyName}:
237 get:
238 summary: ""
239 description: "Get a list of unique values for the given `propertyName`"
240 operationId: "dcaeServicesGroupbyPropertyNameGet"
241 consumes:
242 - "application/json"
243 - "application/vnd.dcae.inventory.v1+json"
244 produces:
245 - "application/json"
246 - "application/vnd.dcae.inventory.v1+json"
247 parameters:
248 - name: "propertyName"
249 in: "path"
250 description: "Property to find unique values. Restricted to `type`, `vnfType`,\
251 \ `vnfLocation`"
252 required: true
253 type: "string"
254 responses:
255 200:
256 description: "List of unique property values"
257 schema:
258 $ref: "#/definitions/DCAEServiceGroupByResults"
259 /dcae-services/{serviceId}:
260 get:
261 summary: ""
262 description: "Get a `DCAEService` object."
263 operationId: "dcaeServicesServiceIdGet"
264 consumes:
265 - "application/json"
266 - "application/vnd.dcae.inventory.v1+json"
267 produces:
268 - "application/json"
269 - "application/vnd.dcae.inventory.v1+json"
270 parameters:
271 - name: "serviceId"
272 in: "path"
273 required: true
274 type: "string"
275 responses:
276 200:
277 description: "Single `DCAEService` object"
278 schema:
279 $ref: "#/definitions/DCAEService"
280 502:
281 description: "Bad response from DCAE controller"
282 schema:
283 $ref: "#/definitions/ApiResponseMessage"
284 404:
285 description: "DCAE service not found"
286 schema:
287 $ref: "#/definitions/ApiResponseMessage"
288 504:
289 description: "Failed to connect with DCAE controller"
290 schema:
291 $ref: "#/definitions/ApiResponseMessage"
292 put:
293 summary: ""
294 description: "Put a new or update an existing `DCAEService` object."
295 operationId: "dcaeServicesServiceIdPut"
296 consumes:
297 - "application/json"
298 - "application/vnd.dcae.inventory.v1+json"
299 produces:
300 - "application/json"
301 - "application/vnd.dcae.inventory.v1+json"
302 parameters:
303 - name: "serviceId"
304 in: "path"
305 required: true
306 type: "string"
307 - in: "body"
308 name: "body"
309 required: true
310 schema:
311 $ref: "#/definitions/DCAEServiceRequest"
312 responses:
313 200:
314 description: "Single `DCAEService` object"
315 schema:
316 $ref: "#/definitions/DCAEService"
317 422:
318 description: "Bad request provided"
319 schema:
320 $ref: "#/definitions/ApiResponseMessage"
321 delete:
322 summary: ""
323 description: "Remove an existing `DCAEService` object."
324 operationId: "dcaeServicesServiceIdDelete"
325 consumes:
326 - "application/vnd.dcae.inventory.v1+json"
327 - "application/json"
328 produces:
329 - "application/json"
330 - "application/vnd.dcae.inventory.v1+json"
331 parameters:
332 - name: "serviceId"
333 in: "path"
334 required: true
335 type: "string"
336 responses:
337 200:
338 description: "DCAE service has been removed"
339 404:
340 description: "Unknown DCAE service"
341 schema:
342 $ref: "#/definitions/ApiResponseMessage"
343definitions:
344 DCAEServiceTypeRequest:
345 type: "object"
346 required:
347 - "blueprintTemplate"
348 - "owner"
349 - "typeName"
350 - "typeVersion"
351 properties:
352 owner:
353 type: "string"
354 typeName:
355 type: "string"
356 description: "Descriptive name for this DCAE service type"
357 typeVersion:
358 type: "integer"
359 format: "int32"
360 description: "Version number for this DCAE service type"
361 blueprintTemplate:
362 type: "string"
363 description: "String representation of a Cloudify blueprint with unbound variables"
364 serviceIds:
365 type: "array"
366 description: "List of service ids that are used to associate with DCAE service\
367 \ type. DCAE service types with this propery as null or empty means them\
368 \ apply for every service id."
369 items:
370 type: "string"
371 vnfTypes:
372 type: "array"
373 items:
374 type: "string"
375 serviceLocations:
376 type: "array"
377 description: "List of service locations that are used to associate with DCAE\
378 \ service type. DCAE service types with this propery as null or empty means\
379 \ them apply for every service location."
380 items:
381 type: "string"
382 asdcServiceId:
383 type: "string"
384 description: "Id of service this DCAE service type is associated with. Value\
385 \ source is from ASDC's notification event's field `serviceInvariantUUID`."
386 asdcResourceId:
387 type: "string"
388 description: "Id of vf/vnf instance this DCAE service type is associated with.\
389 \ Value source is from ASDC's notification event's field `resourceInvariantUUID`."
390 asdcServiceURL:
391 type: "string"
392 description: "URL to the ASDC service model"
393 DCAEServiceComponentRequest:
394 type: "object"
395 required:
396 - "componentId"
397 - "componentSource"
398 - "componentType"
399 - "shareable"
400 properties:
401 componentId:
402 type: "string"
403 description: "The id format is unique to the source"
404 componentType:
405 type: "string"
406 componentSource:
407 type: "string"
408 description: "Specifies the name of the underying source service that is responsible\
409 \ for this components"
410 enum:
411 - "DCAEController"
412 - "DMaaPController"
413 shareable:
414 type: "integer"
415 format: "int32"
416 description: "Used to determine if this component can be shared amongst different\
417 \ DCAE services"
418 DCAEServiceGroupByResultsPropertyValues:
419 type: "object"
420 properties:
421 count:
422 type: "integer"
423 format: "int32"
424 propertyValue:
425 type: "string"
426 dcaeServiceQueryLink:
427 description: "Link.title is the DCAE service property value. Following this\
428 \ link will provide a list of DCAE services that all have this property\
429 \ value."
430 $ref: "#/definitions/Link"
431 DCAEServiceGroupByResults:
432 type: "object"
433 properties:
434 propertyName:
435 type: "string"
436 description: "Property name of DCAE service that the group by operation was\
437 \ performed on"
438 propertyValues:
439 type: "array"
440 items:
441 $ref: "#/definitions/DCAEServiceGroupByResultsPropertyValues"
442 InlineResponse200:
443 type: "object"
444 properties:
445 links:
446 $ref: "#/definitions/InlineResponse200Links"
447 totalCount:
448 type: "integer"
449 format: "int32"
450 items:
451 type: "array"
452 items:
453 $ref: "#/definitions/DCAEServiceType"
454 DCAEServiceRequest:
455 type: "object"
456 required:
457 - "components"
458 - "typeId"
459 - "vnfId"
460 - "vnfLocation"
461 - "vnfType"
462 properties:
463 typeId:
464 type: "string"
465 description: "Id of the associated DCAE service type"
466 vnfId:
467 type: "string"
468 description: "Id of the associated VNF that this service is monitoring"
469 vnfType:
470 type: "string"
471 description: "The type of the associated VNF that this service is monitoring"
472 vnfLocation:
473 type: "string"
474 description: "Location identifier of the associated VNF that this service\
475 \ is monitoring"
476 deploymentRef:
477 type: "string"
478 description: "Reference to a Cloudify deployment"
479 components:
480 type: "array"
481 description: "List of DCAE service components that this service is composed\
482 \ of"
483 items:
484 $ref: "#/definitions/DCAEServiceComponentRequest"
485 InlineResponse200Links:
486 type: "object"
487 properties:
488 previousLink:
489 $ref: "#/definitions/Link"
490 nextLink:
491 $ref: "#/definitions/Link"
492 description: "Pagination links"
493 ApiResponseMessage:
494 type: "object"
495 properties:
496 code:
497 type: "integer"
498 format: "int32"
499 type:
500 type: "string"
501 message:
502 type: "string"
503 DCAEService:
504 type: "object"
505 properties:
506 serviceId:
507 type: "string"
508 selfLink:
509 description: "Link.title is serviceId"
510 $ref: "#/definitions/Link"
511 created:
512 type: "string"
513 format: "date-time"
514 modified:
515 type: "string"
516 format: "date-time"
517 typeLink:
518 description: "Link.title is typeId"
519 $ref: "#/definitions/Link"
520 vnfId:
521 type: "string"
522 vnfLink:
523 description: "Link.title is vnfId"
524 $ref: "#/definitions/Link"
525 vnfType:
526 type: "string"
527 vnfLocation:
528 type: "string"
529 description: "Location information of the associated VNF"
530 deploymentRef:
531 type: "string"
532 description: "Reference to a Cloudify deployment"
533 components:
534 type: "array"
535 items:
536 $ref: "#/definitions/DCAEServiceComponent"
537 InlineResponse2001:
538 type: "object"
539 properties:
540 links:
541 $ref: "#/definitions/InlineResponse200Links"
542 totalCount:
543 type: "integer"
544 format: "int32"
545 items:
546 type: "array"
547 items:
548 $ref: "#/definitions/DCAEService"
549 UriBuilder:
550 type: "object"
551 Link:
552 type: "object"
553 properties:
554 title:
555 type: "string"
556 rel:
557 type: "string"
558 uri:
559 type: "string"
560 format: "uri"
561 uriBuilder:
562 $ref: "#/definitions/UriBuilder"
563 rels:
564 type: "array"
565 items:
566 type: "string"
567 params:
568 type: "object"
569 additionalProperties:
570 type: "string"
571 type:
572 type: "string"
573 DCAEServiceComponent:
574 type: "object"
575 required:
576 - "componentId"
577 - "componentLink"
578 - "componentSource"
579 - "componentType"
580 - "created"
581 - "modified"
582 - "shareable"
583 properties:
584 componentId:
585 type: "string"
586 description: "The id format is unique to the source"
587 componentLink:
588 description: "Link to the underlying resource of this component"
589 $ref: "#/definitions/Link"
590 created:
591 type: "string"
592 format: "date-time"
593 modified:
594 type: "string"
595 format: "date-time"
596 componentType:
597 type: "string"
598 componentSource:
599 type: "string"
600 description: "Specifies the name of the underying source service that is responsible\
601 \ for this components"
602 enum:
603 - "DCAEController"
604 - "DMaaPController"
605 status:
606 type: "string"
607 location:
608 type: "string"
609 description: "Location information of the component"
610 shareable:
611 type: "integer"
612 format: "int32"
613 description: "Used to determine if this component can be shared amongst different\
614 \ DCAE services"
615 DCAEServiceType:
616 type: "object"
617 required:
618 - "blueprintTemplate"
619 - "created"
620 - "owner"
621 - "selfLink"
622 - "typeId"
623 - "typeName"
624 - "typeVersion"
625 properties:
626 owner:
627 type: "string"
628 typeName:
629 type: "string"
630 description: "Descriptive name for this DCAE service type"
631 typeVersion:
632 type: "integer"
633 format: "int32"
634 description: "Version number for this DCAE service type"
635 blueprintTemplate:
636 type: "string"
637 description: "String representation of a Cloudify blueprint with unbound variables"
638 serviceIds:
639 type: "array"
640 description: "List of service ids that are used to associate with DCAE service\
641 \ type. DCAE service types with this propery as null or empty means them\
642 \ apply for every service id."
643 items:
644 type: "string"
645 vnfTypes:
646 type: "array"
647 items:
648 type: "string"
649 serviceLocations:
650 type: "array"
651 description: "List of service locations that are used to associate with DCAE\
652 \ service type. DCAE service types with this propery as null or empty means\
653 \ them apply for every service location."
654 items:
655 type: "string"
656 asdcServiceId:
657 type: "string"
658 description: "Id of service this DCAE service type is associated with. Value\
659 \ source is from ASDC's notification event's field `serviceInvariantUUID`."
660 asdcResourceId:
661 type: "string"
662 description: "Id of vf/vnf instance this DCAE service type is associated with.\
663 \ Value source is from ASDC's notification event's field `resourceInvariantUUID`."
664 asdcServiceURL:
665 type: "string"
666 description: "URL to the ASDC service model"
667 typeId:
668 type: "string"
669 description: "Unique identifier for this DCAE service type"
670 selfLink:
671 description: "Link to self where the Link.title is typeName"
672 $ref: "#/definitions/Link"
673 created:
674 type: "string"
675 format: "date-time"
676 description: "Created timestamp for this DCAE service type in epoch time"
677 deactivated:
678 type: "string"
679 format: "date-time"
680 description: "Deactivated timestamp for this DCAE service type in epoch time"