c4b6f4b736675417c8ac5c01c3e731cc15963da7
[cps.git] / docs / api / swagger / ncmp / openapi-inventory.yaml
1 openapi: 3.0.1
2 info:
3   title: NCMP Inventory API
4   description: NCMP Inventory API
5   version: "1.0"
6 servers:
7   - url: /ncmpInventory
8 paths:
9   /v1/ch:
10     post:
11       tags:
12         - network-cm-proxy-inventory
13       summary: DMI notifies NCMP of new CM Handles
14       description: "Register a DMI Plugin with any new, updated or removed CM Handles."
15       operationId: updateDmiPluginRegistration
16       requestBody:
17         content:
18           application/json:
19             schema:
20               $ref: '#/components/schemas/RestDmiPluginRegistration'
21         required: true
22       responses:
23         "201":
24           description: Created
25           content: {}
26         "400":
27           description: Bad Request
28           content:
29             application/json:
30               schema:
31                 $ref: '#/components/schemas/ErrorMessage'
32         "401":
33           description: Unauthorized
34           content:
35             application/json:
36               schema:
37                 $ref: '#/components/schemas/ErrorMessage'
38         "403":
39           description: Forbidden
40           content:
41             application/json:
42               schema:
43                 $ref: '#/components/schemas/ErrorMessage'
44 components:
45   schemas:
46     RestDmiPluginRegistration:
47       type: object
48       properties:
49         dmiPlugin:
50           type: string
51           example: onap-dmi-plugin
52         createdCmHandles:
53           type: array
54           items:
55             $ref: '#/components/schemas/RestCmHandle'
56         updatedCmHandles:
57           type: array
58           items:
59             $ref: '#/components/schemas/RestCmHandle'
60         removedCmHandles:
61           type: array
62           items:
63             type: string
64     RestCmHandle:
65       required:
66         - cmHandle
67       type: object
68       properties:
69         cmHandle:
70           type: string
71           example: cmHandle123
72         cmHandleProperties:
73           $ref: '#/components/schemas/RestCmHandleAdditionalProperties'
74     RestCmHandleAdditionalProperties:
75       type: object
76       additionalProperties:
77         type: string
78         example: system-001
79     ErrorMessage:
80       title: Error
81       type: object
82       properties:
83         status:
84           type: string
85         message:
86           type: string
87         details:
88           type: string