OAM NF Adopter Application
[oam/nf-oam-adopter.git] / ves-nf-oam-adopter / ves-nf-oam-adopter-app / docs / api / swagger / openapi.yaml
1 #  ============LICENSE_START=======================================================
2 #  Copyright © 2021 AT&T Intellectual Property. All rights reserved.
3 #  ================================================================================
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
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.
14 #
15 #  SPDX-License-Identifier: Apache-2.0
16 #  ============LICENSE_END=========================================================
17 openapi: 3.0.3
18 info:
19   title: O-RAN OAM Adopter PM Manager
20   description: API for O-RAN OAM Adopter PM Manager service.
21   version: "1.0.0"
22   license:
23     name: "Apache 2.0"
24     url: "http://www.apache.org/licenses/LICENSE-2.0"
25
26 servers:
27   - url: https://example.io/v1
28
29 security:
30   - BasicAuth: []
31
32 paths:
33   /:
34     get:
35       tags:
36         - controller
37       summary: Read all adapters host address
38       description: Returns a list of adapters host address
39       operationId: getAllAdapters
40       responses:
41         '200':
42           description: Successfully returned a list of adapters host address
43           content:
44             application/json:
45               schema:
46                 type: array
47                 items:
48                   type: string
49         '400':
50           $ref: '#/components/responses/400Error'
51
52
53   /adapter/{host}:
54     delete:
55       tags:
56         - controller
57       description: Delete an adapter by host address
58       operationId: removeAdapter
59       parameters:
60         - name: host
61           in: path
62           required: true
63           schema:
64             type: string
65
66       responses:
67         '200':
68           description: Successfully deleted an adapter
69         '400':
70           description: Invalid request
71         '401':
72           description: Unauthorized
73         '404':
74           description: adapter not found
75
76   /adapter:
77     post:
78       tags:
79         - controller
80       description: create an adapter instance
81       operationId: addAdapter
82       requestBody:
83         required: true
84         content:
85           application/json:
86             schema:
87               $ref: '#/components/schemas/Adapter'
88       responses:
89         '200':
90           description: Successfully returned a list of adapters
91         '400':
92           $ref: '#/components/responses/400Error'
93
94 components:
95   schemas:
96     Adapter:
97       type: object
98       properties:
99         host:
100           type: string
101         mechId:
102           type: object
103           properties:
104             username:
105               type: string
106             password:
107               type: string
108           required:
109             - username
110             - password
111       required:
112         - host
113         - mechId
114
115   responses:
116     400Error:
117       description: Invalid request
118       content:
119         application/json:
120           schema:
121             type: object
122             properties:
123               message:
124                 type: string