blob: 24f9d451d7d6f86256a7dda74dcbd2a54d70881c [file] [log] [blame]
elinuxhenrik7f93fb62020-04-08 17:02:40 +02001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. http://creativecommons.org/licenses/by/4.0
3.. Copyright (C) 2020 Nordix
4
5.. _sdnc-a1-controller-api:
6
7.. |nbsp| unicode:: 0xA0
8 :trim:
9
10.. |nbh| unicode:: 0x2011
11 :trim:
12
elinuxhenrikd64e33d2020-04-22 18:05:07 +020013######################
14SDNC A1 Controller API
15######################
elinuxhenrik7f93fb62020-04-08 17:02:40 +020016
17The A1 of a Near |nbh| RT |nbsp| RIC can be used through the SDNC A1 Controller.
18
elinuxhenrik53e46042020-04-21 15:14:04 +020019The OSC A1 Controller supports using multiple versions of A1 API southbound. By passing the full URL for each southbound
20A1 operation the problem of version-specific URL formats is avoided.
21
22Since different versions of A1 operations may use different data formats for data payloads for similar REST requests and
23responses the data formatting requirements are flexible, so version-specific encoding/decoding is handled by the service
24that requests the A1 operation.
elinuxhenrik7f93fb62020-04-08 17:02:40 +020025
26Get Policy Type
27~~~~~~~~~~~~~~~
28
29POST
30++++
31
elinuxhenrikfea065a2020-04-20 16:46:26 +020032Gets a policy type.
elinuxhenrik7f93fb62020-04-08 17:02:40 +020033
elinuxhenrik53e46042020-04-21 15:14:04 +020034Definition
35""""""""""
36
elinuxhenrikfea065a2020-04-20 16:46:26 +020037**URL path:**
elinuxhenrik53e46042020-04-21 15:14:04 +020038
39/restconf/operations/A1-ADAPTER-API:getA1PolicyType
elinuxhenrik7f93fb62020-04-08 17:02:40 +020040
elinuxhenrikfea065a2020-04-20 16:46:26 +020041**Parameters:**
elinuxhenrik53e46042020-04-21 15:14:04 +020042
43None.
elinuxhenrik7f93fb62020-04-08 17:02:40 +020044
elinuxhenrikfea065a2020-04-20 16:46:26 +020045**Body:** (*Required*)
elinuxhenrik7f93fb62020-04-08 17:02:40 +020046
elinuxhenrik53e46042020-04-21 15:14:04 +020047A JSON object. ::
48
49 {
50 "input": {
51 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-type>"
52 }
53 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +020054
elinuxhenrikfea065a2020-04-20 16:46:26 +020055**Responses:**
elinuxhenrik7f93fb62020-04-08 17:02:40 +020056
elinuxhenrik53e46042020-04-21 15:14:04 +020057200:
elinuxhenrik7f93fb62020-04-08 17:02:40 +020058
elinuxhenrik53e46042020-04-21 15:14:04 +020059A JSON object where the body tag contains the JSON object of the policy type. ::
60
61 {
62 "output": {
63 "http-status": "integer",
64 "body": "{
65 <policy-type>
66 }"
67 }
68 }
69
70Examples
71""""""""
72
73Get a policy type from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. The STD 1.1.3 version does not
74support types, so this function is not available for that version.
75
76**Call**: ::
elinuxhenrik7f93fb62020-04-08 17:02:40 +020077
elinuxhenrikfea065a2020-04-20 16:46:26 +020078 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType"
79 -H "Content-Type: application/json" -d '{
80 "input": {
81 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11"
82 }
83 }'
elinuxhenrik7f93fb62020-04-08 17:02:40 +020084
elinuxhenrik53e46042020-04-21 15:14:04 +020085**Result**:
elinuxhenrik7f93fb62020-04-08 17:02:40 +020086
elinuxhenrik53e46042020-04-21 15:14:04 +020087200: ::
88
89 {
90 "output": {
91 "http-status": 200,
92 "body": "{
93 \"$schema\": \"http://json-schema.org/draft-07/schema#\",
94 \"title\": \"Example_QoETarget_1.0.0\",
95 \"description\": \"Example QoE Target policy type\",
96 \"type\": \"object\",
97 \"properties\": {
98 \"scope\": {
elinuxhenrikfea065a2020-04-20 16:46:26 +020099 \"type\": \"object\",
100 \"properties\": {
elinuxhenrik53e46042020-04-21 15:14:04 +0200101 \"ueId\": {
102 \"type\": \"string\"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200103 },
elinuxhenrik53e46042020-04-21 15:14:04 +0200104 \"sliceId\": {
105 \"type\": \"string\"
106 },
107 \"qosId\": {
108 \"type\": \"string\"
109 },
110 \"cellId\": {
111 \"type\": \"string\"
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200112 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200113 },
114 \"additionalProperties\": false,
115 \"required\": [
116 \"ueId\",
117 \"sliceId\"
118 ]
119 },
120 \"statement\": {
121 \"type\": \"object\",
122 \"properties\": {
123 \"qoeScore\": {
124 \"type\": \"number\"
125 },
126 \"initialBuffering\": {
127 \"type\": \"number\"
128 },
129 \"reBuffFreq\": {
130 \"type\": \"number\"
131 },
132 \"stallRatio\": {
133 \"type\": \"number\"
134 }
135 },
136 \"minProperties\": 1,
137 \"additionalProperties\": false
138 }
elinuxhenrikfea065a2020-04-20 16:46:26 +0200139 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200140 }"
141 }
142 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200143
144Put Policy
145~~~~~~~~~~
146
147POST
148++++
149
elinuxhenrikfea065a2020-04-20 16:46:26 +0200150Creates or updates a policy instance.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200151
elinuxhenrik53e46042020-04-21 15:14:04 +0200152Definition
153""""""""""
154
elinuxhenrikfea065a2020-04-20 16:46:26 +0200155**URL path:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200156
157/restconf/operations/A1-ADAPTER-API:putA1Policy
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200158
elinuxhenrikfea065a2020-04-20 16:46:26 +0200159**Parameters:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200160
161None.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200162
elinuxhenrikfea065a2020-04-20 16:46:26 +0200163**Body:** (*Required*)
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200164
elinuxhenrik53e46042020-04-21 15:14:04 +0200165A JSON object where the body tag contains the JSON object of the policy. ::
166
167 {
168 "input": {
169 "near-rt-ric-url": "<url-to-near-rt-ric-to-put-policy>",
170 "body": "<policy-as-json-string>"
171 }
172 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200173
elinuxhenrikfea065a2020-04-20 16:46:26 +0200174**Responses:**
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200175
elinuxhenrik53e46042020-04-21 15:14:04 +0200176200:
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200177
elinuxhenrik53e46042020-04-21 15:14:04 +0200178A JSON object with the response. ::
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200179
elinuxhenrik53e46042020-04-21 15:14:04 +0200180 {
181 "output": {
182 "http-status": "integer"
183 }
184 }
185
186Examples
187""""""""
188
189**Call**:
190
191Create a policy in a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
192
193 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200194 -H "Content-Type: application/json" -d '{
195 "input": {
elinuxhenrik53e46042020-04-21 15:14:04 +0200196 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000",
elinuxhenrikfea065a2020-04-20 16:46:26 +0200197 "body": "{
198 "blocking_rate":20,
199 "enforce":true,
200 "trigger_threshold":10,
201 "window_length":10
202 }"
203 }
204 }'
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200205
elinuxhenrik53e46042020-04-21 15:14:04 +0200206Create a policy in a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
elinuxhenrikfea065a2020-04-20 16:46:26 +0200207
elinuxhenrik53e46042020-04-21 15:14:04 +0200208 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy
209 -H Content-Type:application/json -d '{
210 "input": {
211 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000",
212 "body": "{
213 "scope": {
214 "ueId": "ue5000",
215 "qosId": "qos5000"
216 },
217 "qosObjective": {
218 "priorityLevel": 5000
219 }
220 }"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200221 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200222 }'
223
224**Result**:
225
226The result is the same irrespective of which API that is used.
227
228200: ::
229
230 {
231 "output": {
232 "http-status": 200
233 }
234 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200235
236Get Policy
237~~~~~~~~~~
238
239POST
240++++
241
elinuxhenrikfea065a2020-04-20 16:46:26 +0200242Gets a policy instance.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200243
elinuxhenrik53e46042020-04-21 15:14:04 +0200244Definition
245""""""""""
246
elinuxhenrikfea065a2020-04-20 16:46:26 +0200247**URL path:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200248
249/restconf/operations/A1-ADAPTER-API:getA1Policy
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200250
elinuxhenrikfea065a2020-04-20 16:46:26 +0200251**Parameters:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200252
253None.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200254
elinuxhenrikfea065a2020-04-20 16:46:26 +0200255**Body:** (*Required*)
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200256
elinuxhenrik53e46042020-04-21 15:14:04 +0200257A JSON object. ::
258
259 {
260 "input": {
261 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy>"
262 }
263 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200264
elinuxhenrikfea065a2020-04-20 16:46:26 +0200265**Responses:**
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200266
elinuxhenrik53e46042020-04-21 15:14:04 +0200267200:
268 A JSON object where the body tag contains the JSON object of the policy. ::
269
270 {
271 "output": {
272 "http-status": "integer",
273 "body": "{
274 <result>
275 }"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200276 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200277 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200278
elinuxhenrik53e46042020-04-21 15:14:04 +0200279Examples
280""""""""
281
282**Call**:
283
284Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
285
286 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
287 -H Content-Type:application/json -d '{
288 "input": {
289 "near-rt-ric-url":"http://ricsim_g1_1:8085/a1-p/policytypes/11/policies"
290 }
291 }'
292
293Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
294
295 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
296 -H Content-Type:application/json -d '{
297 "input": {
298 "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies"
299 }
300 }'
301
302**Result**:
303
304The result is the same irrespective of which API that is used.
305
306200: ::
307
308 {
309 "output": {
310 "http-status":200,
311 "body":"[
312 \"5000\",
313 .
314 .
315 .
316 \"6000\"
317 ]"
318 }
319 }
320
321**Call**:
322
323Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200324
elinuxhenrikfea065a2020-04-20 16:46:26 +0200325 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy"
326 -H "Content-Type: application/json" -d '{
327 "input": {
elinuxhenrik53e46042020-04-21 15:14:04 +0200328 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200329 }
330 }'
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200331
elinuxhenrik53e46042020-04-21 15:14:04 +0200332Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
elinuxhenrikfea065a2020-04-20 16:46:26 +0200333
elinuxhenrik53e46042020-04-21 15:14:04 +0200334 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType
335 -H Content-Type:application/json -d '{
336 "input": {
337 "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200338 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200339 }'
340
341**Result**:
342
343The result is the same irrespective of which API that is used.
344
345200: ::
346
347 {
348 "output": {
349 "http-status": 200,
350 "body": "{
351 \"blocking_rate\": 20,
352 \"enforce\": true,
353 \"trigger_threshold\": 10,
354 \"window_length\": 10
355 }"
356 }
357 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200358
359Delete Policy
360~~~~~~~~~~~~~
361
362POST
363++++
364
elinuxhenrikfea065a2020-04-20 16:46:26 +0200365Deletes a policy instance.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200366
elinuxhenrik53e46042020-04-21 15:14:04 +0200367Definition
368""""""""""
369
elinuxhenrikfea065a2020-04-20 16:46:26 +0200370**URL path:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200371
372/restconf/operations/A1-ADAPTER-API:deleteA1Policy
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200373
elinuxhenrikfea065a2020-04-20 16:46:26 +0200374**Parameters:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200375
376None.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200377
elinuxhenrikfea065a2020-04-20 16:46:26 +0200378**Body:** (*Required*)
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200379
elinuxhenrik53e46042020-04-21 15:14:04 +0200380A JSON object. ::
381
382 {
383 "input": {
384 "near-rt-ric-url": "<url-to-near-rt-ric-to-delete-policy>"
385 }
386 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200387
elinuxhenrikfea065a2020-04-20 16:46:26 +0200388**Responses:**
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200389
elinuxhenrik53e46042020-04-21 15:14:04 +0200390200:
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200391
elinuxhenrik53e46042020-04-21 15:14:04 +0200392A JSON object with the response. ::
393
394 {
395 "output": {
396 "http-status": "integer"
397 }
398 }
399
400Examples
401""""""""
402
403**Call**:
404
405Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200406
elinuxhenrikfea065a2020-04-20 16:46:26 +0200407 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
408 -H "Content-Type: application/json" -d '{
409 "input": {
elinuxhenrik53e46042020-04-21 15:14:04 +0200410 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200411 }
412 }'
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200413
elinuxhenrik53e46042020-04-21 15:14:04 +0200414Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
elinuxhenrikfea065a2020-04-20 16:46:26 +0200415
elinuxhenrik53e46042020-04-21 15:14:04 +0200416 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
417 -H "Content-Type: application/json" -d '{
418 "input": {
419 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200420 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200421 }'
422
423**Result**:
424
425The result is the same irrespective of which API that is used.
426
427200: ::
428
429 {
430 "output": {
431 "http-status": 202
432 }
433 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200434
435Get Policy Status
436~~~~~~~~~~~~~~~~~
437
438POST
439++++
440
elinuxhenrikfea065a2020-04-20 16:46:26 +0200441Get the status of a policy instance.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200442
elinuxhenrik53e46042020-04-21 15:14:04 +0200443Definition
444""""""""""
445
elinuxhenrikfea065a2020-04-20 16:46:26 +0200446**URL path:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200447
448/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200449
elinuxhenrikfea065a2020-04-20 16:46:26 +0200450**Parameters:**
elinuxhenrik53e46042020-04-21 15:14:04 +0200451
452None.
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200453
elinuxhenrikfea065a2020-04-20 16:46:26 +0200454**Body:** (*Required*)
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200455
elinuxhenrik53e46042020-04-21 15:14:04 +0200456A JSON object. ::
457
458 {
459 "input": {
460 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy-status>"
461 }
462 }
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200463
elinuxhenrikfea065a2020-04-20 16:46:26 +0200464**Responses:**
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200465
elinuxhenrik53e46042020-04-21 15:14:04 +0200466200:
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200467
elinuxhenrik53e46042020-04-21 15:14:04 +0200468A JSON object where the body tag contains the JSON object with the policy status according to the API version used. ::
469
470 {
471 "output": {
472 "http-status": "integer",
473 "body": "{
474 <policy-status-object>
475 }"
476 }
477 }
478
479Examples
480""""""""
481
482**Call**:
483
484Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200485
elinuxhenrikfea065a2020-04-20 16:46:26 +0200486 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
487 -H "Content-Type: application/json" -d '{
488 "input": {
elinuxhenrik53e46042020-04-21 15:14:04 +0200489 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000/status"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200490 }
491 }'
elinuxhenrik7f93fb62020-04-08 17:02:40 +0200492
elinuxhenrik53e46042020-04-21 15:14:04 +0200493**Result**:
elinuxhenrikfea065a2020-04-20 16:46:26 +0200494
elinuxhenrik53e46042020-04-21 15:14:04 +0200495200: ::
496
497 {
498 "output": {
499 "http-status": 200,
500 "body": "{
501 \"instance_status\": \"IN EFFECT\",
502 \"has_been_deleted\": \"true\",
503 \"created_at\": \"Wed, 01 Apr 2020 07:45:45 GMT\"
504 }"
505 }
506 }
507
508**Call**:
509
510Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
511
512 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
513 -H "Content-Type: application/json" -d '{
514 "input": {
515 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000/status"
elinuxhenrikfea065a2020-04-20 16:46:26 +0200516 }
elinuxhenrik53e46042020-04-21 15:14:04 +0200517 }'
518
519**Result**:
520
521200: ::
522
523 {
524 "output": {
525 "http-status": 200,
526 "body": "{
527 \"enforceStatus\": \"UNDEFINED\"
528 }"
529 }
530 }