Add PCC profile to plan definition

This POST operation adds a PCC profile to an existing plan definition by using the planDefinitionID URL parameter. If successful, you receive an HTTP response code of 201 and a JSON response containing the updated plan definition with the pcc profile information.

See HTTP response codes for other response codes.

POST /pcc/spcm/planDefinitions/<planDefinitionId>/pccProfiles + JSON request payload


HEADER INFO

tenant: <tenantName>

authorisation: HTTP Basic Auth

content-type: application/hal+JSON

accept: application/hal+JSON

permissions: SPCM_PLAN_DEFINITION_CREATE_PERMISSION

URL parameters

There is one mandatory parameter.

Parameter Type Description

planDefinitionId

integer

A unique identifier for a plan definition which was assigned by the server upon creating the plan definition.

JSON request payload

The following example shows only the mandatory attributes for adding a pcc profile to a plan definition. See PCC profile descriptions for all possible data types.

{
    "alias": "DefaultProfile",
    "qosProfileName": "QoS Default",
    "serviceProfileName": "Service Default",
    "networkProfileName": "NetworkProfile1",
    "timeProfileName": "TimeProfile1",
    "threshold": false,
    "precedence": 1
}


JSON response

The following example shows the JSON response for a request to add a pcc profile to a plan with a planDefinitionId of 167 (shown as _links URL in the response). An id of 756 is auto-assigned to the pcc profile. This particular sample returns only some of the data types possible. You may see different key:value pairs if your request is slightly different.

See PCC profile descriptions for all possible data types.
{
    "id": 756,
    "alias": "DefaultProfile",
    "qosProfileName": "QoS Default",
    "serviceProfileName": "Service Default",
    "networkProfileName": "NetworkProfile1",
    "deviceProfileName": null,
    "timeProfileName": "TimeProfile1",
    "locationProfileName": null,
    "chargingProfileName": null,
    "subscriptionProfileName": null,
    "threshold": false,
    "meteringPercentage": null,
    "precedence": 1,
    "_links": {
        "self": {
            "href": "http://localhost:8080/spcm-rest-ws/pcc/spcm/planDefinitions/
        167/pccProfiles/756"
        }
    }
}

PCC profile type descriptions

Field Type Description

id

integer

The unique identifier for the PCC profile.

mandatory parameter

alias

string (255)

The name of the PCC profile.

mandatory parameter

threshold

boolean

Indicates if a threshold applies to the pcc profile. If true then the profile can only be activated once a usage rule definition is violated. If false, then the profile is active by default.

mandatory parameter

precedence

integer

Sets the precedence of this prfile to other pcc profiles.

Values are between 1 and 5 with 1 being the highest precedent.
mandatory parameter

qosProfileName

string (255)

The name of the Quality of Service (QoS) profile.

serviceProfileName

string (255)

The name of the service profile.

networkProfileName

string (255)

The name of the network profile.

deviceProfileName

string (255)

The name of the device profile.

timeProfileName

string (255)

The name of the time profile.

locationProfileName

string (255)

The name of the location profile.

chargingProfileName

string (255)

The name of the charging profile.

subscriptionProfileName

string (255)

The name of the subscription profile.

meteringPercentage

integer

Specifies what percentage of the data reported for this profile is accounted for. For example, if it is 80 then only 80% of the usage reported against this profile will be logged against the plan.

Valid values are 0 to 100. Defaults to 100.


HTTP response codes

Code Description

201/204

success!

If you receive a 204 code, you will not see a JSON response.

207

Multistatus response

Check out HTTP statuses for more details.
This is not applicable to all operations.

400

malformed request

401

unauthorised; bad username or password

403

forbidden; user does not have appropriate privileges

404

pcc profile not found

409

conflict with target resource

This often occurs if the item already exists, such as a plan, group, or name.
This is not applicable to all operations.

412

failed validation; this typically means that a property was not set or a value is out of range.

example
HTTP 412
{
  "errors" : [
        {
          "field" : "name",
          "description" : "name is mandatory"
        }
    ]
}

422

failed processing (after passing validation).

example
HTTP 422
{
    "message": "Subscriber max plan count exceeded",
    "errorCode": 1
}

500

internal error

example
HTTP/1.1 500
{
    "message": "Internal server error - [Failed to get session information]",
    "status": "error"
}

503

request rejected due to overload