Policy counter operations

Endpoint

/pcc/pcrf/policy-counter

API endpoints related to obtaining information about policy counters. This includes creating, retrieving, updating, and deleting counter.

Create policy counter

Creates a new policy counter.


post /pcc/pcrf/policy-counter


Header
Content-type

JSON

Accept

JSON

Permissions

PCRF_POLICY_COUNTERS_CREATE_PERMISSION

Request

Below is a request example. See the descriptions below for more details on the fields.

{
  "id" : 4711,
  "name" : "BaseProfileCounter",
  "description" : "Counter for the base profile",
  "status" : "active",
  "deviceProfileId" : 111,
  "locationProfileId" : 222,
  "timeProfileId" : 333,
  "networkProfileId" : 444,
  "created" : "2020-06-07T13:10:00Z",
  "updated" : "2020-06-08T14:20:00Z"
}

Response

If successful, returns a 201 HTTP code and the newly-created resource body. Otherwise, check the response codes below.

Get policy counter

Retrieves a policy counter. Specify an ID to retrieve a specific counter or retrieve all with no ID specified. Use query parameters to paginate the response when retrieving all. For example, /pcc/pcrf/policy-counter?page=0&size=100.


get /pcc/pcrf/policy-counter/id


Header
Content-type

JSON

Accept

JSON

Permissions

PCRF_POLICY_COUNTERS_READ_PERMISSION

Response

If successful, returns a 200 HTTP code and the resource body. Otherwise, check the response codes below.

Update policy counter

Updates an existing policy counter.


put /pcc/pcrf/policy-counter/id


Header
Content-type

JSON

Accept

JSON

Permissions

PCRF_POLICY_COUNTERS_UPDATE_PERMISSION

Request

Below is a request example. See the descriptions below for more details on the fields.

{
  "id" : 4711,
  "name" : "BaseProfileCounter",
  "description" : "Counter for the base profile",
  "status" : "active",
  "deviceProfileId" : 111,
  "locationProfileId" : 222,
  "timeProfileId" : 333,
  "networkProfileId" : 444,
  "created" : "2020-06-07T13:10:00Z",
  "updated" : "2020-06-08T14:20:00Z"
}

Response

If successful, returns a 200 HTTP code and the updated resource body. Otherwise, check the response codes below.

Delete policy counter

Deletes a policy counter.


delete /pcc/pcrf/policy-counter/id


Header
Content-type

JSON

Accept

JSON

Permissions

PCRF_POLICY_COUNTERS_DELETE_PERMISSION

Response

If successful, returns a 204 HTTP code. Otherwise, check the response codes below.

PCRF API JSON descriptions

Field Description

id

The ID of the Policy counter.

Found in the response only.

name

The name of the Policy counter.

Required in request payload.

description

A description of the Policy counter.

status

The Policy counter’s status.

Required in request payload.

serviceProfileId

The service profile ID.

qosProfileId

The QoS profile ID.

chargingProfileId

The charging profile profile ID.

deviceProfileId

The device profile ID.

locationProfileId

The location profile ID.

timeProfileId

The time profile ID.

networkProfileId

The network profile ID.

created

The time the Policy counter was created in ISO format.

updated

The time the Policy counter was updated in ISO format.

PCRF API response codes

If you receive an HTTP status code of 400, your request does not confirm to the API specification. Check the endpoint is correct and your header information is set to use JSON.

If you receive an HTTP status code of 422, there is a processing error. More information is provided in the codes below.

Code Description

1

The name is not unique.

example

You try to create a Policy counter with the name Base and there is already a Policy counter with this name.

2

Unknown service profile.

example

You try to create a Policy counter with a service profile ID that doesn’t exist.

3

Unknown QoS profile.

example

You try to create a Policy counter with a QoS profile ID that doesn’t exist.

4

Unknown charging profile.

example

You try to create a Policy counter with a charging profile ID that doesn’t exist.

5

Unknown status.

example

You try to create a Policy counter with a status that does not exist.

6

Unknown device profile.

7

Unknown location profile.

8

Unknown time profile.

9

Unknown network profile.