update link to upper-constraints.txt
[dcaegen2.git] / docs / sections / apis / swagger_slice_analysis.yaml
1 # ============LICENSE_START=======================================================
2 #  Copyright (C) 2022 Wipro Limited.
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 #
10 # 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 # ============LICENSE_END=========================================================
17
18 swagger: "2.0"
19 info:
20   description: "Slice Analysis MS is introduced in ONAP for: (a) Analyzing the FM/PM data (reported from the xNFs) and KPI data (computed from PM data) related to various slice instances (NSIs), slice sub-net instances (NSSIs) and services catered to by the slices (S-NSSAIs). (b) Determining and triggering appropriate Control Loop actions based on the analysis above (c) Receiving recommendations for closed loop actions from ML or Analytics engines, performing validity checks, etc. to determine if the actions can be carried out, and then triggering the appropriate Control Loop (d) Providing utilization details of slices"
21   version: "1.0.7"
22   title: "Slice-analysis MS APIs"
23   license:
24     name: "Apache 2.0"
25     url: "http://www.apache.org/licenses/LICENSE-2.0.html"
26 host: "localhost:8080"
27 basePath: "/"
28 tags:
29 - name: "slice-config"
30   description: "API for getting utilization of slices"
31 schemes:
32 - "http"
33 paths:
34   /api/v1/slices-config:
35     post:
36       tags:
37       - "slice-config"
38       summary: "Get utilization of slices"
39       operationId: "sliceConfig"
40       consumes:
41       - "application/json"
42       produces:
43       - "application/json"
44       parameters:
45       - in: "body"
46         name: "body"
47         description: "Slice config request"
48         required: true
49         schema:
50           $ref: "#/definitions/SliceConfigRequest"
51       responses:
52         "200":
53           description: "SliceConfig details returned successfully"
54           schema:
55               $ref: "#/definitions/SliceConfigResponse"
56         "400":
57           description: "Invalid input"
58         "500":
59           description: "Internal server error"
60
61   /healthcheck:
62     get:
63       tags:
64       - "healthcheck"
65       summary: "healthcheck api"
66       description: "api to check if slice-analysis ms is healthy"
67       operationId: "healthcheck"
68       consumes:
69       - "application/json"
70       produces:
71       - "application/json"
72       responses:
73         "200":
74           description: "slice-analysis ms is healthy"
75         "500":
76           description: "Internal server error"
77
78 definitions:
79   SliceConfigRequest:
80     type: "object"
81     required:
82     - "sliceIdentifiers"
83     - "configParams"
84     properties:
85       sliceIdentifiers:
86         type: "array"
87         items:
88           type: string
89           example:
90            - 7e000ddc-7ba1-4fdb-a7ce-8f0a65ab3282
91       configParams:
92         type: "array"
93         items:
94           type: string
95           example:
96            - dLThptPerSlice
97            - uLThptPerSlice
98            - maxNumberOfConns
99
100   SliceConfigResponse:
101     type: "object"
102     required:
103     - "sliceConfigDetails"
104     properties:
105       sliceConfigDetails:
106         type: "array"
107         items:
108            $ref: '#/definitions/sliceConfigDetails'
109
110   sliceConfigDetails:
111     type: "object"
112     properties:
113       sliceIdentifier:
114         type: "string"
115         example: 7e000ddc-7ba1-4fdb-a7ce-8f0a65ab3282
116       aggregatedConfig:
117         type: "object"
118         properties:
119           dLThptPerSlice:
120             type: integer
121             format: int64
122             example: 40
123           uLThptPerSlice:
124             type: integer
125             format: int64
126             example: 25
127           maxNumberOfConns:
128             type: integer
129             format: int64
130             example: 400