blob: f261c0da4df565fa57d9e1ef07c037a975e89b94 [file] [log] [blame]
DylanB95ESTb5a23832021-06-02 19:45:46 +01001# ============LICENSE_START=======================================================
lukegleesonb208aeb2021-07-08 16:48:15 +01002# Copyright (C) 2021 Nordix Foundation
DylanB95ESTb5a23832021-06-02 19:45:46 +01003# ================================================================================
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
lukegleesonb208aeb2021-07-08 16:48:15 +01009#
DylanB95ESTb5a23832021-06-02 19:45:46 +010010# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16# SPDX-License-Identifier: Apache-2.0
17# ============LICENSE_END=========================================================
18
19openapi: 3.0.1
20info:
21 title: NCMP DMI Plugin
22 description: Adds Data Model Inventory Registry capability for ONAP
23 version: "1.0.0"
24servers:
25 - url: //localhost:8088/
26tags:
tragait7c4a9aa2021-07-19 13:46:37 +010027 - name: dmi-plugin-internal
28 description: DMI plugin internal rest apis
29 - name: dmi-plugin
30 description: DMI plugin rest apis
31
32
DylanB95ESTb5a23832021-06-02 19:45:46 +010033paths:
tragait7c4a9aa2021-07-19 13:46:37 +010034 /v1/ch/{cmHandle}/modules :
35 post:
DylanB95ESTb5a23832021-06-02 19:45:46 +010036 tags:
37 - dmi-plugin
tragait7c4a9aa2021-07-19 13:46:37 +010038 summary: Get all modules for cm handle
39 description: Get all modules for given cm handle
40 operationId: getModulesForCmHandle
41 parameters:
42 - name: cmHandle
43 in: path
44 description: The cm handle to fetch all the modules
45 required: true
46 schema:
47 type: string
DylanB95ESTb5a23832021-06-02 19:45:46 +010048 responses:
49 '200':
tragait7c4a9aa2021-07-19 13:46:37 +010050 description: OK
51 content:
52 application/json:
53 schema:
54 type: string
55 example: {
56 'schemas': {
57 'schema': [
58 {
59 'identifier': 'example-identifier',
60 'version': 'example-version',
61 'format': 'example-format',
62 'namespace': 'example:namespace',
63 'location': [
64 'example-location'
65 ]
66 }
67 ]
68 }
69 }
DylanB95ESTb5a23832021-06-02 19:45:46 +010070 '400':
71 $ref: 'components.yml#/components/responses/BadRequest'
72 '401':
73 $ref: 'components.yml#/components/responses/Unauthorized'
74 '403':
tragait2270d762021-07-08 15:42:19 +010075 $ref: 'components.yml#/components/responses/Forbidden'
76
77 /v1/inventory/cmHandles:
78 post:
79 tags:
80 - dmi-plugin-internal
81 summary: register given list of cm handles (internal use only)
82 description: register given list of cm handles (internal use only)
83 x-api-audience: component-internal
84 operationId: registerCmHandles
85 requestBody:
86 description: list of cm handles
87 content:
88 application/json:
89 schema:
90 $ref: 'components.yml#/components/schemas/CmHandles'
91 required: true
92 responses:
93 '201':
94 $ref: 'components.yml#/components/responses/Created'
95 '400':
96 $ref: 'components.yml#/components/responses/BadRequest'
97 '401':
98 $ref: 'components.yml#/components/responses/Unauthorized'
99 '403':
niamhcore3139ece2021-07-30 16:25:16 +0100100 $ref: 'components.yml#/components/responses/Forbidden'
101
102 /v1/ch/{cmHandle}/moduleResources:
103 post:
104 description: Retrieve module resources for one or more modules
105 tags:
106 - dmi-plugin
107 summary: Retrieve module resources
108 operationId: retrieveModuleResources
109 parameters:
110 - $ref: 'components.yml#/components/parameters/cmHandleInPath'
111 requestBody:
112 required: true
113 content:
114 application/json:
115 schema:
116 $ref: 'components.yml#/components/schemas/ModuleRequestParent'
117 responses:
118 '200':
119 $ref: 'components.yml#/components/responses/Ok'
120 '400':
121 $ref: 'components.yml#/components/responses/BadRequest'
122 '401':
123 $ref: 'components.yml#/components/responses/Unauthorized'
124 '403':
125 $ref: 'components.yml#/components/responses/Forbidden'