generated from camaraproject/Template_API_Repository
-
Notifications
You must be signed in to change notification settings - Fork 7
/
application-profiles.yaml
496 lines (468 loc) · 16.4 KB
/
application-profiles.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
openapi: 3.0.3
info:
title: Connectivity Insights - Application Profiles
version: 0.3.0
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
description: |
Application profiles allows application developers to share all the
information about their application which would be relevant for network/
CAMARA APIs related decision making.
To start with the API will provide operations to define, read and manage
an application's thresholds for network quality (latency, jitter, loss,
throughput). This scope will be expanded further based on addtional
requirements from other applicable CAMARA APIs
### Authorization and authentication
The "Camara Security and Interoperability Profile" provides details on how a client requests an access token. Please refer to Identify and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the Profile.
Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the Telco Operator exposing the API, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.
It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.
x-camara-commonalities: 0.4.0
servers:
- url: "{apiRoot}/application-profiles/v0.3"
variables:
apiRoot:
default: http://localhost:9091
description: |
API root, defined by service provider, e.g.
`api.example.com` or `api.example.com/somepath`
tags:
- name: Application Profiles
description: |
Operations to define, read and manage an application's thresholds
for network quality (latency, jitter, loss, throughput)
paths:
/application-profiles:
post:
security:
- openId:
- application-profiles:create
tags:
- Application Profiles
summary: |
create a profile which represents an application's networking demands.
description: |
Define network monitoring intents for optimal end user application
experience.
operationId: createApplicationProfile
requestBody:
description: List of user-defined network quality thresholds
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationProfileRequest"
required: true
responses:
"201":
description: Created
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationProfile"
"400":
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"500":
$ref: "#/components/responses/Generic500"
"503":
$ref: "#/components/responses/Generic503"
/application-profiles/{applicationProfileId}:
patch:
security:
- openId:
- application-profiles:update
tags:
- Application Profiles
description: |
Update the complete set of network quality thresholds for an
application with the new set of thresholds to ensure good
end user experience
operationId: updateApplicationProfile
parameters:
- name: applicationProfileId
in: path
description: Identifier for the Application Profile
required: true
style: simple
explode: false
schema:
type: string
format: uuid
requestBody:
description: |
network monitoring intents for optimal end user application
experience.
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationProfile"
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationProfile"
"400":
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"404":
$ref: "#/components/responses/Generic404"
"500":
$ref: "#/components/responses/Generic500"
"503":
$ref: "#/components/responses/Generic503"
get:
security:
- openId:
- application-profiles:read
tags:
- Application Profiles
description: Read an Application Profile
operationId: readApplicationProfile
parameters:
- name: applicationProfileId
in: path
description: Identifier for the Application Profile
required: true
style: simple
explode: false
schema:
type: string
format: uuid
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/ApplicationProfile"
"400":
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"404":
$ref: "#/components/responses/Generic404"
"500":
$ref: "#/components/responses/Generic500"
"503":
$ref: "#/components/responses/Generic503"
delete:
security:
- openId:
- application-profile:delete
tags:
- Application Profiles
description: delete
operationId: deleteApplicationProfile
parameters:
- name: applicationProfileId
in: path
description: subscription Id
required: true
style: simple
explode: false
schema:
type: string
format: uuid
responses:
"200":
description: application profile has been deleted
"400":
$ref: "#/components/responses/Generic400"
"401":
$ref: "#/components/responses/Generic401"
"403":
$ref: "#/components/responses/Generic403"
"404":
$ref: "#/components/responses/Generic404"
"500":
$ref: "#/components/responses/Generic500"
"503":
$ref: "#/components/responses/Generic503"
components:
securitySchemes:
openId:
description: OpenID Provider Configuration Information
type: openIdConnect
openIdConnectUrl: https://example.com/.well-known/openid-configuration
headers:
x-correlator:
description: Correlation id for the different services
schema:
type: string
schemas:
Duration:
type: object
properties:
value:
type: integer
example: 12
format: int32
minimum: 1
unit:
allOf:
- $ref: "#/components/schemas/TimeUnitEnum"
- example: Minutes
TimeUnitEnum:
type: string
enum:
- Days
- Hours
- Minutes
- Seconds
- Milliseconds
- Microseconds
- Nanoseconds
Rate:
type: object
properties:
value:
type: integer
example: 10
format: int32
minimum: 0
maximum: 1024
unit:
$ref: "#/components/schemas/RateUnitEnum"
RateUnitEnum:
type: string
enum:
- bps
- kbps
- Mbps
- Gbps
- Tbps
packetDelayBudget:
description: |
The packet delay budget is the maximum allowable one-way latency
between the customer's device and the gateway from the operator's
network to other networks. By limiting the delay, the network
can provide an acceptable level of performance for various services,
such as voice calls, video streaming, and data. The end-to-end or
round trip latency will be about two times this value plus the latency
not controlled by the operator
allOf:
- $ref: "#/components/schemas/Duration"
packetErrorLossRate:
type: integer
description: |
The exponential power of the allowable error loss rate 10^(-N).
For instance 3 would be an error loss rate of 10 to the power of -3
(0.001)
For 5G network the 3GPP specification TS 23.203 defines the packet
error loss rate QCI attribute. It describes the Quality of Service
(QoS) Class Identifier (QCI) parameters used to differentiate traffic
classes in mobile networks, ensuring appropriate resource
allocation and performance for various services.
The packet error loss rate is one of the QCI attributes, providing
information on the acceptable packet loss rate for a specific traffic
class. This attribute helps maintain the desired performance level for
services like voice calls, video streaming, or data transfers within
the 3GPP mobile network.
format: int32
minimum: 1
maximum: 10
example: 3
jitter:
description: |
The jitter requirement aims to limit the maximum variation in
round-trip packet delay for the 99th percentile of traffic, following
ITU Y.1540 standards. It considers only acknowledged packets in a
session, which are packets that receive a confirmation of receipt from
the recipient (e.g., using TCP). This requirement helps maintain
consistent latency, essential for real-time applications such as VoIP,
video calls, and gaming.
allOf:
- $ref: "#/components/schemas/Duration"
targetMinDownstreamRate:
description: |
This is the target minimum downstream rate.
allOf:
- $ref: "#/components/schemas/Rate"
targetMinUpstreamRate:
description: |
This is the target minimum upstream rate.
allOf:
- $ref: "#/components/schemas/Rate"
ApplicationProfile:
type: object
required:
- applicationProfileId
- networkQualityThresholds
properties:
applicationProfileId:
type: string
format: uuid
networkQualityThresholds:
$ref: "#/components/schemas/NetworkQualityThresholds"
ApplicationProfileRequest:
type: object
required:
- networkQualityThresholds
properties:
networkQualityThresholds:
$ref: "#/components/schemas/NetworkQualityThresholds"
NetworkQualityThresholds:
type: object
properties:
packetDelayBudget:
$ref: "#/components/schemas/packetDelayBudget"
targetMinDownstreamRate:
$ref: "#/components/schemas/targetMinDownstreamRate"
targetMinUpstreamRate:
$ref: "#/components/schemas/targetMinUpstreamRate"
packetlossErrorRate:
$ref: "#/components/schemas/packetErrorLossRate"
jitter:
$ref: "#/components/schemas/jitter"
ErrorInfo:
type: object
description: Error information
required:
- status
- code
- message
properties:
status:
type: integer
description: HTTP status code returned along with this error response
code:
type: string
description: Code given to this error
message:
type: string
description: Detailed error description
responses:
Generic400:
description: Bad Request
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_400_INVALID_ARGUMENT:
description: Invalid Argument. Generic Syntax Exception
value:
status: 400
code: INVALID_ARGUMENT
message: Client specified an invalid argument, request body or query param.
GENERIC_400_OUT_OF_RANGE:
description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested
value:
status: 400
code: OUT_OF_RANGE
message: Client specified an invalid range.
Generic401:
description: Unauthorized
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_401_UNAUTHENTICATED:
description: Request cannot be authenticated
value:
status: 401
code: UNAUTHENTICATED
message: Request not authenticated due to missing, invalid, or expired credentials.
GENERIC_401_AUTHENTICATION_REQUIRED:
description: New authentication is needed, authentication is no longer valid
value:
status: 401
code: AUTHENTICATION_REQUIRED
message: New authentication is required.
Generic403:
description: Forbidden
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_403_PERMISSION_DENIED:
description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security
value:
status: 403
code: PERMISSION_DENIED
message: Client does not have sufficient permissions to perform this action.
GENERIC_403_INVALID_TOKEN_CONTEXT:
description: Reflect some inconsistency between information in some field of the API and the related OAuth2 Token
value:
status: 403
code: INVALID_TOKEN_CONTEXT
message: "{{field}} is not consistent with access token."
Generic404:
description: Not found
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_404_NOT_FOUND:
description: Resource is not found
value:
status: 404
code: NOT_FOUND
message: The specified resource is not found.
GENERIC_404_DEVICE_NOT_FOUND:
description: Device identifier not found
value:
status: 404
code: DEVICE_NOT_FOUND
message: Device identifier not found.
Generic500:
description: Internal Server Error
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_500_INTERNAL:
description: Problem in Server side. Regular Server Exception
value:
status: 500
code: INTERNAL
message: Unknown server error. Typically a server bug.
Generic503:
description: Service Unavailable
headers:
x-correlator:
$ref: "#/components/headers/x-correlator"
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorInfo"
examples:
GENERIC_503_UNAVAILABLE:
description: Service is not available. Temporary situation usually related to maintenance process in the server side
value:
status: 503
code: UNAVAILABLE
message: Service Unavailable.