Update a usage counter definition
This PUT operation updates the information for a specific usage counter definition by passing both planDefinitionId and usageCounterDefinitionId in the URL as well as a JSON payload to choosing what to update within the usage counter definition.
If successful, you receive an HTTP response code of 200 as well as a JSON response body showing the updated usage counter definition.
| See HTTP response codes for other response codes. | 
PUT /pcc/spcm/planDefinitions/<planDefinitionId>/usageCounterDefinitions/<usageCounterDefinitionId> + JSON payload
HEADER INFO
tenant: <tenantName>
authorisation: HTTP Basic Auth
accept: application/hal+JSON
permissions: SPCM_PLAN_DEFINITION_CREATE_PERMISSION
URL parameters
There are two mandatory parameters.
| Parameter | Type | Description | 
|---|---|---|
| 
 | integer | A unique identifier for a plan definition which was assigned by the server upon creating the plan definition. | 
| 
 | integer | A unique identifier for the usage counter. | 
 
JSON request payload
The following example is updating a usage counter (id of 33) with a new unitMeteringType setting (to VOLUME).
| See Plan definition descriptions for all possible data types that you might want to update. | 
{
    "id": 33,
    "name": "fairUsageCounter",
    "timeUnit": "NONE",
    "unitMeteringType": "VOLUME",
    "usageScope": "PLAN",
    "absoluteResetTime": "00:00:00",
    "_links": {
        "self": {
        "href": "http://localhost:8080/spcm-rest-ws/pcc/spcm/planDefinitions/
        167/usageCounterDefinitions/715"
        },
        "pccProfiles": {
        "href": "http://localhost:8080/spcm-rest-ws/pcc/spcm/planDefinitions/
        167/usageCounterDefinitions/715/pccProfiles"
        }
    }
}JSON response
The following response example confirms the update usage counter (id of 33) with a new unitMeteringType setting (to VOLUME).
| See Plan definition descriptions for all possible data types that you might want to update. | 
{
    "id": 33,
    "name": "fairUsageCounter",
    "timeUnit": "NONE",
    "unitMeteringType": "VOLUME",
    "usageScope": "PLAN",
    "absoluteResetTime": "00:00:00",
    "_links": {
        "self": {
        "href": "http://localhost:8080/spcm-rest-ws/pcc/spcm/planDefinitions/
        167/usageCounterDefinitions/715"
        },
        "pccProfiles": {
        "href": "http://localhost:8080/spcm-rest-ws/pcc/spcm/planDefinitions/
        167/usageCounterDefinitions/715/pccProfiles"
        }
    }
} 
Usage counter definition type descriptions
| Field | Type | Description | ||
|---|---|---|---|---|
| 
 | integer | The unique identifier for the usage counter. This is assigned by the server upon creation. 
 | ||
| 
 | string | The name of the usage counter. 
 | ||
| 
 | string | The timer unit being measured such as  
 | ||
| 
 | string | The type of usage being counted. This can be time (seconds), volume (bytes), or credit (lowest denomination of local currency, e.g, $1 = 100 units). 
 | ||
| 
 | string | The scope of this particular usage rule. options 
 
 | ||
| 
 | string | Specifies a specific time at which the counter should be reset. Format =  
 | 
HTTP response codes
| Code | Description | ||||
|---|---|---|---|---|---|
| 
 | success! 
 | ||||
| 
 | Multistatus response 
 
 | ||||
| 
 | malformed request | ||||
| 
 | unauthorised; bad username or password | ||||
| 
 | forbidden; user does not have appropriate privileges | ||||
| 
 | usage counter definition not found | ||||
| 
 | conflict with target resource 
 
 | ||||
| 
 | failed validation; this typically means that a property was not set or a value is out of range. example  | ||||
| 
 | failed processing (after passing validation). example  | ||||
| 
 | internal error | ||||
| 
 | request rejected due to overload |