Add or activate policy rule

Adds and activates policy rules.

GET /sponsordata/sds/campaigns/addoractivate?{requestParametersGoHere}

accept: application/JSON/XML

The SDGW, upon the OCSG accepting the activation request, schedules a trigger for the deactivation (Tango to OCSG) on the endDateTime specified. In certain error case scenarios, it is possible that the deactivation trigger scheduled or request for deactivation related to the trigger does not reach the OCSG. The SDGW does not retry the deactivation trigger.

The Oracle OCSG considers the endDateTime as the termination end date of the campaign and, on this exact date and time, removes associated policies and/or functions on the PCRF beyond this exact point in time for the given campaign, regardless of the status of the campaign or whether the OCSG receives the deactivation request from the Tango Telecom solution.

Request parameters table

All parameters are mandatory.
Table 1. Activate Policy Parameters Table
Parameter Description

methodId

Integer that identifies the method to be executed. So, when you need to add or activate a policy rule, this is the request parameter for that.

values
  • 1 = add

  • 2 = activate

/sponsordata/sds/campaigns/addoractivate?methodId=1

sponsorName

A string that denotes the name of the sponsor. Who is this bodacious benefactor?

/sponsordata/sds/campaigns/addoractivate?methodId=1&sponsorName=sponsor

campaignId

Integer that uniquely identifies the campaign. Important stuff here!

/sponsordata/sds/campaigns/addoractivate?methodId=1&sponsorName=sponsor2&campaignId=1

campaignName

A string that names the campaign.

campaignMetadata

A string that contains details (meta-data) about the campaign.

startDateTime

Specifies when the campaign start date should occur. The format is yyyy-MM-dd’T’HH:mm:ss.SSSXXX. Check out Java Date Formatting for more information on Java date formats.

Valid only for the add methodId. Ignored if used in the activate methodId.

/sponsordata/sds/campaigns/addoractivate?methodId=1&sponsorName=sponsor2&campaignId=1&startDateTime=2019-02-14T15:15:15.235-00:00

endDateTime

Specifies when the campaign end date should occur. The format is yyyy-MM-dd’T’HH:mm:ss.SSSXXX. Check out Java Date Formatting for more information on Java date formats.

Valid only for the add methodId. Ignored if used in the activate methodId.

/sponsordata/sds/campaigns/addoractivate?methodId=1&sponsorName=sponsor2&campaignId=1&startDateTime=2019-02-14T15:15:15.235-00:00&endDateTime=2019-02-22T15:15:15.235-00:00

sponsoredIPAddressList

List of server-side IP addresses for which access is sponsored. This is comma-separated.

These are configured in the Oracle PCC subsystem. Also, all traffic sent to these IP addresses are zero-rated by the Oracle PCRF.

/sponsordata/sds/campaigns/addoractivate?methodId=1&sponsorName=sponsor2&campaignId=1&startDateTime=2019-02-14T15:15:15.235-00:00&endDateTime=2019-02-22T15:15:15.235-00:00&sponsoredIPAddressList=127.0.0.1, 127.0.0.2

Response parameters table

Once you have added or activated a new policy rule, the response will contain the parameters as outlined in the table and sample below.

Table 2. Activate Policy Response Table
Parameter Description

responseCode

Integer showing the result of the operation.

  • 0 = Success.

  • -1 = Failure.

  • -2 = The campaign already exists.

  • -3 = An OCSG connection failure occurred

  • -4 = Campaign expiration failure.

  • -5 = The campaign contains invalid dates.

  • -6 = The campaign does not exist.

responseDescription

A text string that describes the result of the operation.

This should be used at the discretion of the external system.

commandId

An auto-generated ID that uniquely identifies the command in the system log.

This commandId is critical when wanting to [Deactivate a Policy Rule] as you must specify in the request parameters to identify the policy.

Add/Activate response

{
   "responseCode": "0",
   "responseDescription": "SUCCESS",
   "commandId": "18"
}