e7fb2f30873521402b70a21680b9620939e7319c
[scp/oam/modeling.git] / data-model / oas3 / experimental / o-ran-sc-du-hello-world-pm-streaming-oas3.yaml
1 openapi: 3.0.3
2 info:
3   version: 0.0.0
4   title: O-RAN-SC-DU PM Streaming
5   description: >-
6     The O-RAN-SC E-Release provides a mechanism for Performance Measurement
7     streaming.
8
9
10     The streaming interfaces depends on the o-ran-sc-du-hello-world.yang and
11     the schemas could be used as extension sot the VES domain 'stndDefind'.
12     The event message is send from a network-function to a SMO.
13
14
15     Copyright 2021 highstreet technologies GmbH
16
17
18     Licensed under the Apache License, Version 2.0 (the "License");
19     you may not use this file except in compliance with the License.
20     You may obtain a copy of the License at
21
22       http://www.apache.org/licenses/LICENSE-2.0
23
24     Unless required by applicable law or agreed to in writing, software
25     distributed under the License is distributed on an "AS IS" BASIS,
26     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27     See the License for the specific language governing permissions and
28     limitations under the License.
29
30
31     reference: https://jira.o-ran-sc.org/browse/OAM-234.
32
33 servers:
34   - url: https://management-service-consumer:8443/v1
35     description: The url of an event stream consumer.
36 paths:
37   /performance-measurement-stream:
38     post:
39       description: Posts a collection of measurements.
40       summary: POST performance-measurement-stream
41       requestBody:
42         content:
43           application/json:
44             schema:
45               $ref: '#/components/schemas/performance-measurement-job'
46         description: Collection of measurements.
47       responses:
48         '201':
49           description: Posted
50         '400':
51           description: Bad Request
52           content:
53             application/json:
54               schema:
55                 $ref: '#/components/schemas/error-response'
56         '401':
57           description: Unauthorized
58           content:
59             application/json:
60               schema:
61                 $ref: '#/components/schemas/error-response'
62         '403':
63           description: Forbidden
64           content:
65             application/json:
66               schema:
67                 $ref: '#/components/schemas/error-response'
68         '404':
69           description: Not Found
70           content:
71             application/json:
72               schema:
73                 $ref: '#/components/schemas/error-response'
74         '405':
75           description: Method Not allowed
76           content:
77             application/json:
78               schema:
79                 $ref: '#/components/schemas/error-response'
80         '409':
81           description: Conflict
82           content:
83             application/json:
84               schema:
85                 $ref: '#/components/schemas/error-response'
86         '500':
87           description: Internal Server Error
88           content:
89             application/json:
90               schema:
91                 $ref: '#/components/schemas/error-response'
92         default:
93           description: Error case.
94           content:
95             application/json:
96               schema:
97                 $ref: '#/components/schemas/error-response'
98 components:
99   schemas:
100     error-response:
101       description: >-
102         Used when an API throws an error with a HTTP error response-code (3xx,
103         4xx, 5xx)
104       type: object
105       required:
106         - reason
107       properties:
108         reason:
109           type: string
110           description: >-
111             Explanation of the reason for the error which can be shown to a
112             human user.
113         message:
114           type: string
115           description: >-
116             More details and corrective actions related to the error which can
117             be shown to a human user.
118         documentation-reference:
119           type: string
120           format: uri
121           description: URI of describing the error.
122     measurement:
123       description: An abstract object class of a measurement.
124       type: object
125       required:
126         - measurement-type-instance-reference
127         - value
128       properties:
129         measurement-type-instance-reference:
130           type: string
131           description: >-
132             A YANG instance identifier for a supported measurement type
133             according to the definitions in o-ran-sc-du-hello-world.yang.
134
135             Example for average downlink user equipment throughput per cell
136             /network-function/distributed-unit-functions[id='<id-value>']/cell[id='<id-value']/supported-measurements/performance-measurement-type[.='user-equipment-average-throughput-downlink']
137
138             Example for a specific slice-differentiator (here sd=12345) subcounter of average downlink user equipment throughput
139             /network-function/distributed-unit-functions[id='<id-value>']/cell[id='<id-value']/supported-measurements/performance-measurement-type[.='user-equipment-average-throughput-downlink']/supported-snssai-subcounter-instances/slice-differentiator[.=12345]";
140         value:
141           anyOf: 
142             - type: boolean
143               description: A boolean value for the measurement.
144             - type: integer 
145               description: A integer value for the measurement.
146             - type: number
147               description: A number value for the measurement.
148             - type: string
149               description: A string value for the measurement.
150           description: 'The value of the measurement type for its period. '
151         unit:
152           type: string
153           maxLength: 255
154           description: >-
155             The unit for the measurement. If there is a unit associated to the
156             measurement the network-function MUST provide this field. It is
157             recommended to follow International System of Units (SI).
158     measurements:
159       description: A collection of measurements.
160       type: array
161       items:
162         $ref: '#/components/schemas/measurement'
163     performance-measurement-job:
164       description: The performance measurement job header and a collection of measurements.
165       type: object
166       required:
167         - id
168         - start-time
169         - granularity-period
170         - measurements
171       properties:
172         id:
173           type: string
174           description: >-
175             The identifier configured by the event stream consumer within a
176             event stream provider for a performance-measurement-job.
177         start-time:
178           type: string
179           format: date-time
180           description: 'The timestamp when the measurement was started. '
181         administrative-state:
182           description: >-
183             Administrative state of an object. Indicates the permission to use
184             or prohibition against the object, imposed through the OAM services.
185           type: string
186           default: locked
187           enum:
188             - locked
189             - unlocked
190             - shutting-down
191         operational-state:
192           type: string
193           default: disabled
194           enum:
195             - enabled
196             - disabled
197           description: >-
198             Operational state of the object. Indicates whether the associated
199             resource is installed and partially or fully operable (enabled) or
200             the associated resource is not installed or not operable (disabled).
201         user-label:
202           type: string
203           maxLength: 255
204           description: >-
205             A user defined label of the object. There is no function associated
206             to the user label. However, the network function stores the value
207             persistently.
208         job-tag:
209           type: string
210           maxLength: 255
211           description: >-
212             A job group identifier to combine several
213             performance-measurement-jobs to one logical job.
214         granularity-period:
215           type: number
216           format: int32
217           description: >-
218             The interval time in seconds between the start of a measurement and
219             the end of a measurement
220         measurements:
221           $ref: '#/components/schemas/measurements'
222           description: The collection of measurements.