Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titleNote!

In the examples in this chapter, HTTP/1.0 have been used, but REST supports HTTP/1.1 as well.

Creating a UDR

A UDR can be created by sending data to the HTTP Interface using POST to the base URL for the UDR. The response will be the created UDR. Default format for the response is XML if nothing is specified. The format for the response is decided by the  Accept  HTTP header.

...

Info
titleExample Creating a QoS Information_UDR in area PROD using JSON


Code Block
POST 
http://localhost:9090/PCRF/Rules/PROD/QoS_Information HTTP/1.0 
Content-Type: application/json 
Content-Length: 196

 The json-data should be structured as follows:

 {             
     "QoS_Information":{ 
         "APN_Agg_MBR_DL":0, 
         "APN_Agg_MBR_UL":0, 
         "Allocation_Retention_Priority":0, 
         "Bearer_Identifier":1, 
         "GBR_DL":100, 
         "GBR_UL":100, 
         "ID":100, 
         "MBR_DL":1000, 
         "MBR_UL":1000, 
         "QCI":1 
     }       
 }


Retrieving a UDR

The format for the response is determined by the  Accept  HTTP header.

...

Info
titleRetrieving all Static_Rule UDRs in area PROD as JSON


Code Block
GET 
http://localhost:9090/PCRF/Rules/PROD/Static_Rule HTTP/1.0 
Accept: application/json

Example output:

Code Block
{
    "Static_Rules": [
        {
            "ID": 1001,
            "Rule_Name": "Static Rule 1",
            "Rule_Base_Name": "rb-default"
        },
        {
            "ID": 1002,
            "Rule_Name": "Static Rule 2",
            "Rule_Base_Name": "rb-redirect"
        }
    ]
}


Updating a UDR

Updates are made using  PUT.

Info
titleExample Updating QoS Information UDRs in area PROD using XML


Code Block
PUT http://localhost:9090/PCRF/Rules//PROD/QoS_Information/<id> HTTP/1.0
Content-Type: application/xml
Content-Length: 251

The format of the xml-data should be structured as follows:

Code Block
<QoS_Information>
    <APN_Agg_MBR_DL>0</APN_Agg_MBR_DL>
    <APN_Agg_MBR_UL>0</APN_Agg_MBR_UL>
    <Allocation_Retention_Priority>0
    </Allocation_Retention_Priority>
    <Bearer_Identifier>1</Bearer_Identifier>
    <GBR_DL>100</GBR_DL>
    <GBR_UL>100</GBR_UL>
    <ID>100</ID>
    <MBR_DL>1000</MBR_DL>
    <MBR_UL>1000</MBR_UL>
    <QCI>1</QCI>
</QoS_Information>


Deleting a UDR

Deleting a resource is done by using the  DELETE method.

Info
titleExample Deleting Rules UDR 2101 in area PROD


Code Block
DELETE http://localhost:9090/PCRF/Rules/PROD/PCC_Rule/2101 HTTP/1.0


Clearing an area

Clearing an area is done with a HTTP DELETE call to <host>:<port>/PCRF/Rules/<source area>/admin/clear.

Info
titleExample Clearing area TEST


Code Block
DELETE http://localhost:9090/PCRF/Rules/TEST/admin/clear HTTP/1.0


Copy one area to another

Copying one area to another is done with a HTTP PUT call to <host>:<port>/PCRF/Rules/<source area>/admin/copyArea?dest=<destination area>. 

Info
titleExample Copying data from TEST to PROD


Code Block
PUT http://localhost:9090/PCRF/Rules/TEST/admin/copyArea?dest=PROD HTTP/1.0
Content-Length: 0


Error codes

There are several different codes that can be returned for the different operations.

...