34a087b85c52f6b849d8cdb13f121e3f5778c944
[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         "204":
24           description: No Content
25           content: {}
26         "400":
27           description: Bad Request
28           content:
29             application/json:
30               schema:
31                 $ref: '#/components/schemas/ErrorMessage'
32               example:
33                 status: 400 BAD_REQUEST
34                 message: Bad request error message
35                 details: Bad request error details
36         "401":
37           description: Unauthorized
38           content:
39             application/json:
40               schema:
41                 $ref: '#/components/schemas/ErrorMessage'
42               example:
43                 status: 401
44                 message: Unauthorized error message
45                 details: Unauthorized error details
46         "403":
47           description: Forbidden
48           content:
49             application/json:
50               schema:
51                 $ref: '#/components/schemas/ErrorMessage'
52               example:
53                 status: 403
54                 message: Forbidden error message
55                 details: Forbidden error details
56 components:
57   schemas:
58     RestDmiPluginRegistration:
59       type: object
60       properties:
61         dmiPlugin:
62           type: string
63           example: my-dmi-plugin
64         dmiDataPlugin:
65           type: string
66           example: my-dmi-data-plugin
67         dmiModelPlugin:
68           type: string
69           example: my-dmi-model-plugin
70         createdCmHandles:
71           type: array
72           items:
73             $ref: '#/components/schemas/RestCmHandle'
74         updatedCmHandles:
75           type: array
76           items:
77             $ref: '#/components/schemas/RestCmHandle'
78         removedCmHandles:
79           type: array
80           items:
81             type: string
82             example: "[\"my-cm-handle1\",\"my-cm-handle2\",\"my-cm-handle3\"]"
83     RestCmHandle:
84       required:
85       - cmHandle
86       type: object
87       properties:
88         cmHandle:
89           type: string
90           example: my-cm-handle
91         cmHandleProperties:
92           $ref: '#/components/schemas/RestCmHandleProperties'
93         publicCmHandleProperties:
94           $ref: '#/components/schemas/RestCmHandleProperties'
95     RestCmHandleProperties:
96       type: object
97       additionalProperties:
98         type: string
99         example: my-property
100     ErrorMessage:
101       title: Error
102       type: object
103       properties:
104         status:
105           type: string
106         message:
107           type: string
108         details:
109           type: string