update_traffic_counter

To set a new value for the GPRS traffic counter, use the unit/update_traffic_counter method:

Copied!
svc=unit/update_traffic_counter&params={
    "itemId": <long>,    
    "newValue": <uint>,   
    "regReset": <uint>     
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId Unit ID.
newValue New value of the GPRS traffic counter (KB).
regReset Register a GPRS traffic counter reset event: 1 (yes), 0 (no). The event is registered only if you have the Manage events access right to the unit. Otherwise, the counter is updated without the event, and no error is returned.

Response

If the request is completed successfully, a response in the following format is returned:

Copied!

{
    "cnkb": <uint> /* Value of the GPRS traffic counter. */
}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters, or the value of newValue multiplied by 1024 exceeds 4294967295.
6 Failed to update the GPRS traffic counter or to register the reset event.
7 No Edit counters access right to the unit.

If you find a mistake in the text, please select it and press Ctrl+Enter.