1 .. 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
5 .. |nbsp| unicode:: 0xA0
8 .. |nbh| unicode:: 0x2011
11 .. _sdnc-a1-controller-api:
14 ######################
15 SDNC A1 Controller API
16 ######################
18 The A1 of a Near |nbh| RT |nbsp| RIC can be used through the SDNC A1 Controller.
20 The OSC A1 Controller supports using multiple versions of A1 API southbound. By passing the full URL for each southbound
21 A1 operation the problem of version-specific URL formats is avoided.
23 Since different versions of A1 operations may use different data formats for data payloads for similar REST requests and
24 responses the data formatting requirements are flexible, so version-specific encoding/decoding is handled by the service
25 that requests the A1 operation.
40 /restconf/operations/A1-ADAPTER-API:getA1PolicyType
46 **Body:** (*Required*)
52 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-type>"
60 A JSON object where the body tag contains the JSON object of the policy type. ::
64 "http-status": "integer",
74 Get 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
75 support types, so this function is not available for that version.
79 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyType"
80 -H "Content-Type: application/json" -d '{
82 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11"
94 \"$schema\": \"http://json-schema.org/draft-07/schema#\",
95 \"title\": \"Example_QoETarget_1.0.0\",
96 \"description\": \"Example QoE Target policy type\",
100 \"type\": \"object\",
115 \"additionalProperties\": false,
122 \"type\": \"object\",
127 \"initialBuffering\": {
137 \"minProperties\": 1,
138 \"additionalProperties\": false
151 Creates or updates a policy instance.
158 /restconf/operations/A1-ADAPTER-API:putA1Policy
164 **Body:** (*Required*)
166 A JSON object where the body tag contains the JSON object of the policy. ::
170 "near-rt-ric-url": "<url-to-near-rt-ric-to-put-policy>",
171 "body": "<policy-as-json-string>"
179 A JSON object with the response. ::
183 "http-status": "integer"
192 Create a policy in a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
194 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy"
195 -H "Content-Type: application/json" -d '{
197 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000",
201 "trigger_threshold":10,
207 Create a policy in a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
209 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:putA1Policy
210 -H Content-Type:application/json -d '{
212 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000",
219 "priorityLevel": 5000
227 The result is the same irrespective of which API that is used.
243 Gets a policy instance.
250 /restconf/operations/A1-ADAPTER-API:getA1Policy
256 **Body:** (*Required*)
262 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy>"
269 A JSON object where the body tag contains the JSON object of the policy. ::
273 "http-status": "integer",
285 Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
287 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
288 -H Content-Type:application/json -d '{
290 "near-rt-ric-url":"http://ricsim_g1_1:8085/a1-p/policytypes/11/policies"
294 Get **all** policy IDs from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
296 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
297 -H Content-Type:application/json -d '{
299 "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies"
305 The result is the same irrespective of which API that is used.
324 Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
326 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy"
327 -H "Content-Type: application/json" -d '{
329 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
333 Get **a specific** policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
335 curl -X POST http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1Policy
336 -H Content-Type:application/json -d '{
338 "near-rt-ric-url":"http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
344 The result is the same irrespective of which API that is used.
352 \"blocking_rate\": 20,
354 \"trigger_threshold\": 10,
355 \"window_length\": 10
366 Deletes a policy instance.
373 /restconf/operations/A1-ADAPTER-API:deleteA1Policy
379 **Body:** (*Required*)
385 "near-rt-ric-url": "<url-to-near-rt-ric-to-delete-policy>"
393 A JSON object with the response. ::
397 "http-status": "integer"
406 Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
408 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
409 -H "Content-Type: application/json" -d '{
411 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000"
415 Delete a policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
417 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:deleteA1Policy"
418 -H "Content-Type: application/json" -d '{
420 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000"
426 The result is the same irrespective of which API that is used.
442 Get the status of a policy instance.
449 /restconf/operations/A1-ADAPTER-API:getA1PolicyStatus
455 **Body:** (*Required*)
461 "near-rt-ric-url": "<url-to-near-rt-ric-to-get-policy-status>"
469 A JSON object where the body tag contains the JSON object with the policy status according to the API version used. ::
473 "http-status": "integer",
475 <policy-status-object>
485 Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the OSC 2.1.0 version. ::
487 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
488 -H "Content-Type: application/json" -d '{
490 "near-rt-ric-url": "http://nearRtRic-sim1:8085/a1-p/policytypes/11/policies/5000/status"
502 \"instance_status\": \"IN EFFECT\",
503 \"has_been_deleted\": \"true\",
504 \"created_at\": \"Wed, 01 Apr 2020 07:45:45 GMT\"
511 Get the policy status for a specific policy from a Near |nbh| RT |nbsp| RIC that is using the STD 1.1.3 version. ::
513 curl -X POST "http://localhost:8282/restconf/operations/A1-ADAPTER-API:getA1PolicyStatus"
514 -H "Content-Type: application/json" -d '{
516 "near-rt-ric-url": "http://ricsim_g2_1:8085/A1-P/v1/policies/5000/status"
528 \"enforceStatus\": \"UNDEFINED\"