BwManagementApi.json 20.6 KB
Newer Older
1
{
Walter Featherstone's avatar
Walter Featherstone committed
2
3
4
5
6
7
8
9
  "openapi": "3.0.2",
  "info": {
    "description": "The ETSI MEC ISG MEC015 Bandwidth Management API described using OpenAPI",
    "version": "1.1.1",
    "title": "BWM API",
    "license": {
      "name": "ETSI Forge copyright notice",
      "url": "https://forge.etsi.org/etsi-forge-copyright-notice.txt"
10
    },
Walter Featherstone's avatar
Walter Featherstone committed
11
12
13
14
15
16
17
18
19
20
21
    "contact": {
      "email": "cti_support@etsi.org"
    }
  },
  "externalDocs": {
    "description": "ETSI MEC015 V1.1.1 Bandwidth Management API",
    "url": "http://www.etsi.org/deliver/etsi_gs/MEC/001_099/015/01.01.01_60/gs_MEC015v010101p.pdf"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8081/bwm/v1"
22
    },
Walter Featherstone's avatar
Walter Featherstone committed
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
    {
      "url": "https://127.0.0.1:8081/bwm/v1"
    }
  ],
  "security": [
    {
      "OauthSecurity": [
        "all"
      ]
    }
  ],
  "tags": [
    {
      "name": "BandwithAllocation"
    },
    {
      "name": "BandwithAllocations"
    }
  ],
  "paths": {
    "/bw_allocations": {
      "get": {
        "description": "This method retrieves information about a list of bandwidthAllocation resources. In queries, either \"app_instance_id\" or \"app_name\" or \"session_Id\"  or none of them shall be present.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Query.AppInstanceId"
          },
          {
            "$ref": "#/components/parameters/Query.AppName"
          },
          {
            "$ref": "#/components/parameters/Query.SessionId"
          }
        ],
        "operationId": "BandwithAllocations_GET",
        "tags": [
          "BandwithAllocations"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BandwithAllocations"
          },
          "400": {
            "$ref": "#/components/responses/Error.400"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          }
        }
      },
      "post": {
        "description": "This method is used to create a bandwidthAllocation resource.",
        "requestBody": {
          "$ref": "#/components/requestBodies/BwInfo"
        },
        "operationId": "BandwithAllocations_POST",
        "tags": [
          "BandwithAllocations"
        ],
        "responses": {
          "201": {
            "$ref": "#/components/responses/BandwithAllocation.201"
          },
          "400": {
            "$ref": "#/components/responses/Error.400"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          }
98
        }
99
      }
100
    },
Walter Featherstone's avatar
Walter Featherstone committed
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
    "/bw_allocations/{allocationId}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/Path.AllocationId"
        }
      ],
      "get": {
        "description": "This method retrieves information about a specific bandwidthAllocation resource.",
        "operationId": "BandwithAllocation_GET",
        "tags": [
          "BandwithAllocation"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BandwithAllocation"
          },
          "400": {
            "$ref": "#/components/responses/Error.400"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          }
126
127
        }
      },
Walter Featherstone's avatar
Walter Featherstone committed
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
      "put": {
        "description": "This method updates the information about a specific bandwidthAllocation resource.",
        "requestBody": {
          "$ref": "#/components/requestBodies/BwInfo"
        },
        "operationId": "BandwithAllocation_PUT",
        "tags": [
          "BandwithAllocation"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BandwithAllocation"
          },
          "400": {
            "$ref": "#/components/responses/Error.400"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          },
          "412": {
            "$ref": "#/components/responses/Error.412"
          }
        }
      },
      "patch": {
        "description": "This method updates the information about a specific bandwidthAllocation resource.",
        "requestBody": {
          "$ref": "#/components/requestBodies/BwInfoDeltas"
        },
        "operationId": "BandwithAllocation_PAT",
        "tags": [
          "BandwithAllocation"
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/BandwithAllocation"
          },
          "400": {
            "$ref": "#/components/responses/Error.400"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          },
          "412": {
            "$ref": "#/components/responses/Error.412"
          }
180
181
        }
      },
Walter Featherstone's avatar
Walter Featherstone committed
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
      "delete": {
        "description": "Remove a specific bandwidthAllocation resource. DELETE method is typically used in \"Unregister from Bandwidth Management Service\" procedure",
        "operationId": "BandwithAllocation_DEL",
        "tags": [
          "BandwithAllocation"
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "$ref": "#/components/responses/Error.403"
          },
          "404": {
            "$ref": "#/components/responses/Error.404"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
204
205
206
207
208
      "Path.AllocationId": {
        "name": "allocationId",
        "in": "path",
        "description": "Represents a bandwidth allocation instance",
        "required": true,
Walter Featherstone's avatar
Walter Featherstone committed
209
210
211
        "schema": {
          "type": "string"
        }
212
213
214
215
      },
      "Query.AppInstanceId": {
        "name": "app_instance_id",
        "in": "query",
Walter Featherstone's avatar
Walter Featherstone committed
216
        "description": "A MEC application instance may use multiple app_instance_ids as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.",
217
        "required": false,
Walter Featherstone's avatar
Walter Featherstone committed
218
219
220
221
222
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
223
        }
224
225
226
227
      },
      "Query.AppName": {
        "name": "app_name",
        "in": "query",
Walter Featherstone's avatar
Walter Featherstone committed
228
        "description": "A MEC application instance may use multiple ser_names as an input parameter to query the bandwidth allocation of a list of mobile edge application instances.",
229
        "required": false,
Walter Featherstone's avatar
Walter Featherstone committed
230
231
232
233
234
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
235
236
237
238
239
        }
      },
      "Query.SessionId": {
        "name": "session_id",
        "in": "query",
Walter Featherstone's avatar
Walter Featherstone committed
240
        "description": "A MEC application instance may use session_id as an input parameter to query the bandwidth allocation of a list of sessions.",
241
        "required": false,
Walter Featherstone's avatar
Walter Featherstone committed
242
243
244
245
246
        "schema": {
          "type": "array",
          "items": {
            "type": "string"
          }
247
248
        }
      }
249
    },
Walter Featherstone's avatar
Walter Featherstone committed
250
251
252
253
254
255
256
257
    "requestBodies": {
      "BwInfo": {
        "description": "Bandwidth Allocation information",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BwInfo"
258
            }
Walter Featherstone's avatar
Walter Featherstone committed
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
          }
        }
      },
      "BwInfoDeltas": {
        "description": "Description of the changes to instruct the server how to modify the Bandwidth Allocation information.",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BwInfoDeltas"
            }
          }
        }
      }
    },
    "links": {
      "GetBandwithAllocation": {
        "operationId": "BandwithAllocation_GET",
        "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'GET .../bw_allocations/{allocationId}''",
        "parameters": {
          "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST  ",
          "allocationId": "TBC"
        }
      },
      "PatBandwithAllocation": {
        "operationId": "BandwithAllocation_PAT",
        "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PATCH .../bw_allocations/{allocationId}''",
        "parameters": {
          "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST  ",
          "allocationId": "TBC"
        }
      },
      "PutBandwithAllocation": {
        "operationId": "BandwithAllocation_PUT",
        "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'PUT .../bw_allocations/{allocationId}''",
        "parameters": {
          "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST  ",
          "allocationId": "TBC"
        }
      },
      "DelBandwithAllocation": {
        "operationId": "BandwithAllocation_DEL",
        "description": "The `allocationId` value returned in the response can be used as the `allocationId` parameter in 'DELETE .../bw_allocations/{allocationId}''",
        "parameters": {
          "description": "regex = \\/bwm\\/v1\\/bw_allocations\\/(.*); allocationId = location.match(regex)[1]; where \"location\" is the location header uri returned from operationId BandwithAllocations_POST  ",
          "allocationId": "TBC"
        }
      }
    },
    "responses": {
      "BandwithAllocation": {
        "description": "Bandwidth Allocation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BwInfo"
            }
          }
        }
      },
      "BandwithAllocation.201": {
        "description": "Bandwidth Allocation.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BwInfo"
325
            }
326
          }
327
        },
Walter Featherstone's avatar
Walter Featherstone committed
328
329
330
331
332
333
        "headers": {
          "location": {
            "description": "The resource URI of the created resource",
            "schema": {
              "type": "string",
              "format": "uri"
334
            }
Walter Featherstone's avatar
Walter Featherstone committed
335
336
337
338
339
340
341
342
343
344
345
346
          }
        }
      },
      "BandwithAllocations": {
        "description": "Bandwidth Allocations.",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "minItems": 0,
              "items": {
                "$ref": "#/components/schemas/BwInfo"
347
              }
348
            }
349
          }
Walter Featherstone's avatar
Walter Featherstone committed
350
351
352
353
354
355
356
357
358
359
360
361
362
363
        },
        "links": {
          "getBandwithAllocation": {
            "$ref": "#/components/links/GetBandwithAllocation"
          },
          "patBandwithAllocation": {
            "$ref": "#/components/links/PatBandwithAllocation"
          },
          "putBandwithAllocation": {
            "$ref": "#/components/links/PutBandwithAllocation"
          },
          "delBandwithAllocation": {
            "$ref": "#/components/links/DelBandwithAllocation"
          }
364
        }
365
      },
Walter Featherstone's avatar
Walter Featherstone committed
366
367
368
369
370
371
      "Error.400": {
        "description": "Bad Request. It is used to indicate that incorrect parameters were passed to the request.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
372
            }
Walter Featherstone's avatar
Walter Featherstone committed
373
374
375
376
          },
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/Empty"
377
            }
378
          }
Walter Featherstone's avatar
Walter Featherstone committed
379
380
381
382
383
384
385
386
        }
      },
      "Error.401": {
        "description": "Unauthorized. It is used when the client did not submit the appropriate credentials.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
387
            }
Walter Featherstone's avatar
Walter Featherstone committed
388
389
390
391
          },
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/Empty"
392
            }
393
          }
Walter Featherstone's avatar
Walter Featherstone committed
394
395
396
397
398
399
400
401
        }
      },
      "Error.403": {
        "description": "Forbidden. The operation is not allowed given the current status of the resource. ",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
402
            }
Walter Featherstone's avatar
Walter Featherstone committed
403
404
405
406
407
408
409
410
411
412
413
414
415
416
          }
        }
      },
      "Error.404": {
        "description": "Not Found. It is used when a client provided a URI that cannot be mapped  to a valid resource URI.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
            }
          },
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/Empty"
417
            }
418
          }
Walter Featherstone's avatar
Walter Featherstone committed
419
420
421
422
423
424
425
426
        }
      },
      "Error.412": {
        "description": "Precondition Failed. It is used when a condition has failed during conditional requests,  e.g. when using ETags to avoid write conflicts.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/ProblemDetails"
427
            }
Walter Featherstone's avatar
Walter Featherstone committed
428
429
430
431
          },
          "text/plain": {
            "schema": {
              "$ref": "#/components/schemas/Empty"
432
            }
433
434
435
436
          }
        }
      }
    },
Walter Featherstone's avatar
Walter Featherstone committed
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
    "securitySchemes": {
      "OauthSecurity": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://oauth.exampleAPI/token",
            "scopes": {
              "all": "Single oauth2 scope for API"
            }
          }
        }
      }
    },
    "schemas": {
      "Empty": {
        "description": "Empty schema"
      },
454
455
456
457
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
Walter Featherstone's avatar
Walter Featherstone committed
458
            "$ref": "#/components/schemas/Problem.type"
459
460
          },
          "title": {
Walter Featherstone's avatar
Walter Featherstone committed
461
            "$ref": "#/components/schemas/Problem.title"
462
463
          },
          "status": {
Walter Featherstone's avatar
Walter Featherstone committed
464
            "$ref": "#/components/schemas/Problem.status"
465
466
          },
          "detail": {
Walter Featherstone's avatar
Walter Featherstone committed
467
            "$ref": "#/components/schemas/Problem.detail"
468
469
          },
          "instance": {
Walter Featherstone's avatar
Walter Featherstone committed
470
            "$ref": "#/components/schemas/Problem.instance"
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
497
498
499
500
501
502
503
504
505
506
507
          }
        }
      },
      "Problem.type": {
        "type": "string",
        "format": "uri",
        "description": "A URI reference according to IETF RFC 3986 that identifies the problem type"
      },
      "Problem.title": {
        "type": "string",
        "description": "A short, human-readable summary of the problem type"
      },
      "Problem.status": {
        "type": "integer",
        "format": "uint32",
        "description": "The HTTP status code for this occurrence of the problem"
      },
      "Problem.detail": {
        "type": "string",
        "description": "A human-readable explanation specific to this occurrence of the problem"
      },
      "Problem.instance": {
        "type": "string",
        "format": "uri",
        "description": "A URI reference that identifies the specific occurrence of the problem"
      },
      "BwInfo": {
        "description": "information of bandwidth resource",
        "type": "object",
        "required": [
          "appInsId",
          "requestType",
          "fixedAllocation",
          "allocationDirection"
        ],
        "properties": {
          "timeStamp": {
Walter Featherstone's avatar
Walter Featherstone committed
508
            "$ref": "#/components/schemas/TimeStamp"
509
510
          },
          "appInsId": {
Walter Featherstone's avatar
Walter Featherstone committed
511
            "$ref": "#/components/schemas/AppInsId"
512
513
          },
          "requestType": {
Walter Featherstone's avatar
Walter Featherstone committed
514
            "$ref": "#/components/schemas/RequestType"
515
516
          },
          "sessionFilter": {
Walter Featherstone's avatar
Walter Featherstone committed
517
            "$ref": "#/components/schemas/SessionFilter"
518
519
          },
          "fixedBWPriority": {
Walter Featherstone's avatar
Walter Featherstone committed
520
            "$ref": "#/components/schemas/FixedBWPriority"
521
522
          },
          "fixedAllocation": {
Walter Featherstone's avatar
Walter Featherstone committed
523
            "$ref": "#/components/schemas/FixedAllocation"
524
525
          },
          "allocationDirection": {
Walter Featherstone's avatar
Walter Featherstone committed
526
            "$ref": "#/components/schemas/AllocationDirection"
527
528
529
530
          }
        }
      },
      "BwInfoDeltas": {
Walter Featherstone's avatar
Walter Featherstone committed
531
        "description": "Conform to JSON merge patch format and processing rules specified IETF RFC 7396, this type represents the attributes whose value are allowed to be updated with HTTP PATCH method in content format JSON",
532
533
534
        "type": "object",
        "properties": {
          "appInsId": {
Walter Featherstone's avatar
Walter Featherstone committed
535
            "$ref": "#/components/schemas/AppInsId"
536
537
          },
          "requestType": {
Walter Featherstone's avatar
Walter Featherstone committed
538
            "$ref": "#/components/schemas/RequestType"
539
540
          },
          "sessionFilter": {
Walter Featherstone's avatar
Walter Featherstone committed
541
            "$ref": "#/components/schemas/SessionFilter"
542
543
          },
          "fixedBWPriority": {
Walter Featherstone's avatar
Walter Featherstone committed
544
            "$ref": "#/components/schemas/FixedBWPriority"
545
546
          },
          "fixedAllocation": {
Walter Featherstone's avatar
Walter Featherstone committed
547
            "$ref": "#/components/schemas/FixedAllocation"
548
549
          },
          "allocationDirection": {
Walter Featherstone's avatar
Walter Featherstone committed
550
            "$ref": "#/components/schemas/AllocationDirection"
551
552
553
554
555
556
557
558
559
560
561
          }
        }
      },
      "TimeStamp": {
        "type": "object",
        "required": [
          "seconds",
          "nanoSeconds"
        ],
        "properties": {
          "seconds": {
Walter Featherstone's avatar
Walter Featherstone committed
562
            "$ref": "#/components/schemas/Seconds"
563
564
          },
          "nanoSeconds": {
Walter Featherstone's avatar
Walter Featherstone committed
565
            "$ref": "#/components/schemas/NanoSeconds"
566
567
568
569
570
571
572
573
574
575
576
577
578
          }
        }
      },
      "AppInsId": {
        "description": "Application instance identifier",
        "type": "string"
      },
      "RequestType": {
        "description": "Numeric value (0 - 255) corresponding to specific type of consumer",
        "type": "string",
        "enum": [
          "APPLICATION_SPECIFIC_BW_ALLOCATION",
          "SESSION_SPECIFIC_BW_ALLOCATION"
Walter Featherstone's avatar
Walter Featherstone committed
579
580
        ],
        "example": "APPLICATION_SPECIFIC_BW_ALLOCATION"
581
582
583
584
585
586
587
588
      },
      "SessionFilter": {
        "description": "Session filtering criteria, applicable when requestType is set as SESSION_SPECIFIC_BW_ALLOCATION. Any filtering criteria shall define a single session only. In case multiple sessions match sessionFilter the request shall be rejected",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "sourceIp": {
Walter Featherstone's avatar
Walter Featherstone committed
589
              "$ref": "#/components/schemas/SourceIp"
590
591
            },
            "sourcePort": {
Walter Featherstone's avatar
Walter Featherstone committed
592
              "$ref": "#/components/schemas/SourcePort"
593
594
            },
            "dstAddress": {
Walter Featherstone's avatar
Walter Featherstone committed
595
              "$ref": "#/components/schemas/DstAddress"
596
597
            },
            "dstPort": {
Walter Featherstone's avatar
Walter Featherstone committed
598
              "$ref": "#/components/schemas/DstPort"
599
600
            },
            "protocol": {
Walter Featherstone's avatar
Walter Featherstone committed
601
              "$ref": "#/components/schemas/Protocol"
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
            }
          }
        }
      },
      "FixedBWPriority": {
        "description": "Indicates the allocation priority when dealing with several applications or sessions in parallel. Values are not defined in the present document",
        "type": "string",
        "enum": [
          "not defined in the present document"
        ]
      },
      "FixedAllocation": {
        "description": "Size of requested fixed BW allocation in [bps]",
        "type": "string"
      },
      "AllocationDirection": {
        "description": "The direction of the requested BW allocation",
        "type": "string",
        "enum": [
          "00 = Downlink (towards the UE)",
          "01 = Uplink (towards the application/session)",
          "10 = Symmetrical"
Walter Featherstone's avatar
Walter Featherstone committed
624
625
        ],
        "example": "00"
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
      },
      "Seconds": {
        "description": "The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC",
        "type": "integer",
        "format": "uint32"
      },
      "NanoSeconds": {
        "description": "The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC",
        "type": "integer",
        "format": "uint32"
      },
      "SourceIp": {
        "description": "Source address identity of session (including range)",
        "type": "string"
      },
      "SourcePort": {
Walter Featherstone's avatar
Walter Featherstone committed
642
        "description": "Source port identity of session",
643
644
645
646
647
648
649
650
651
652
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "DstAddress": {
        "description": "Destination address identity of session (including range)",
        "type": "string"
      },
      "DstPort": {
Walter Featherstone's avatar
Walter Featherstone committed
653
        "description": "Destination port identity of session",
654
655
656
        "type": "array",
        "items": {
          "type": "string"
657
        }
658
659
660
661
662
      },
      "Protocol": {
        "description": "Protocol number",
        "type": "string"
      }
663
    }
Walter Featherstone's avatar
Walter Featherstone committed
664
665
  }
}