Set usage counter for a usage rule definition

This PUT operation sets a usage counter for a usage rule definition by passing the usageRuleDefinitionId in the URL and a JSON payload containing the usage counter definition id in an array. Setting the usage counter means that this is the usage counter on which the usage rule is based. If successful, you receive an HTTP response code of 201.

See HTTP response codes for other response codes.

PUT /pcc/spcm/planDefinitions/<planDefinitionId>/usageRuleDefinitions/<usageRuleDefinitionId>/usageCounterDefinition + JSON payload


HEADER INFO

tenant: <tenantName>

authorisation: HTTP Basic Auth

content-type: application/JSON

permissions: SPCM_PLAN_DEFINITION_CREATE_PERMISSION

URL parameters

There are two mandatory parameters.

Parameter Type Description

planDefinitionId

integer

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

usageRuleDefinitionId

integer

The id of the usage rule definition.

JSON payload

You need to specify the usage counter definition id (as an array in the JSON payload) that you are setting for the usage rule definition.

{
    [420]
}


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

usage rule definition 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