API

To obtain an access key, you need to login

Request Syntax

To access the Waviot API method, you must perform a POST or GET request of this type:

https://mdm.waviot.com/api.TYPE/METHOD_NAME?PARAMETERS&key=API_KEY
The request consists of several parts:
TYPE — API type
METHOD_NAME — the name of the API method you want to access
PARAMETERS — input parameters of the corresponding API method, a sequence of name = value pairs separated by & The list of parameters is listed in the detailed description of the method. If the request specifies GET and POST parameters with the same name, priority is the POST parameter
API_KEY — personal access key. If the access key is not specified, then the cookie authorization is checked

API Methods

* In all methods, you can access only those modems / counters that are tied to the elements of the tree that are accessible to you

Get main modem data

https://mdm.waviot.com/api.modem/info/?id=70B3B9
Parameter Description
id Modem HEX id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • modem (array)
    Information about the modem

    • battery (float)
      Battery voltage in V
    • battery_type (int)
      Id of the battery type
    • dl_change_timestamp (int)
      The runtime timestamp of the last downlink command
    • hw_version (string)
      Hardware version
    • sw_version (string)
      Software version
    • last_config_time (int)
      Timestamp of time
    • last_info_message (int)
      Timestamp of the last message with modem information
    • last_station_time (int)
      Timestamp of the last activity of the base station
    • modem_type (int)
      Id of the modem type
    • protocol_id (int)
      Protocol Id
    • temperature (int)
      Modem temperature in °C




History of temperature/voltage changes in the battery of the modem

https://mdm.waviot.com/api.modem/history/?id=70B3B9
Parameter Description
id Modem HEX id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • history (array)
    History of temperature/voltage changes in the battery of the modem

    • timestamp (int)
      Timestamp
    • temperature (int)
      Modem temperature in °C
    • voltage (float)
      Battery voltage in V




Getting the last modem message date

https://mdm.waviot.com/api.modem/get_last_message/?id=70B3B9
Parameter Description
id Modem HEX id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • packet (array)
    Packet data

    • id (int)
      Packet id
    • modem_id (int)
      Modem HEX id
    • received_time (string)
      Packet received timestamp
    • event_time (int)
      Packet timestamp
    • processed (char)
      Package processing flag
    • protocol_id (int)
      Protocol Id
    • iterator (int)
      Iterator




Get registrator readings by modem

https://mdm.waviot.com/api.data/get_values/?modem_id=70B3B9
Parameter Description
modem_id Modem HEX id
from Unix timestamp of the moment, starting from which the sample is sampled
to Unix timestamp of the time to be sampled
round_ts Round timestamp up to an hour

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • registrators (array)
    Registrators collection

    • [registrator_id]
      Available values: Registrator values | array




The meter reading by modem id & channel

https://mdm.waviot.com/api.data/get_modem_channel_values/?modem_id=70B3B9&channel=160
Parameter Description
modem_id Modem HEX id
channel Channel id
from Unix timestamp of the moment, starting from which the sample is sampled
to Unix timestamp of the time to be sampled

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • channel (string)
    Channel id
  • values (array)
    Values in the format: timestamp (key) -> value of the meter




Get full tree element info

https://mdm.waviot.com/api.data/get_full_element_info/?id=16550
Parameter Description
id Tree element id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • devices (array)

    • id (int)
      Device id
    • name (int)
      Device name
    • class_name (string)
      Device class name
    • config_time (int)
      Timestamp
    • device_sn (string)
      Serial number
    • modem_id (int)
      Modem HEX id
    • device_time (int)
      Device timestamp
    • timezone (string)
      Timezone
    • registrators (array)
      Registrators collection




Get available tree elements

https://mdm.waviot.com/api.tree/get_tree/




Get child tree elements info

https://mdm.waviot.com/api.tree/get_tree/?id=5921
Parameter Description
id Tree element id
account Client account number
fields A list of the resulting properties of a tree separated by a comma (lastname, firstname, middlename, appartment, city, district, street, locality, building, entrance, account, vm_code, ovm_code)

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • tree (array)
    Tree elements list

    • [tree_id] (array)
      Tree element

      • id (int)
        Tree element id
      • name (int)
        Tree element name
      • type (int)
        Tree element type id
      • [tree_id] (array)
        Tree element




Get child tree elements list

https://mdm.waviot.com/api.tree/get_elements/?id=14218
Parameter Description
id Tree element id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • tree (array)
    Tree elements list

    • [tree_id] (array)
      Tree element

      • id (int)
        Tree element id
      • name (int)
        Tree element name
      • type (int)
        Tree element type id
      • [tree_id] (array)
        Tree element




Get tree element binded modems

https://mdm.waviot.com/api.tree/get_modems/?id=5921
Parameter Description
id Tree element id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • modems




Get device events

https://mdm.waviot.com/api.data/get_events/?modem_id=70D5BC
Parameter Description
modem_id Modem HEX id
from From timestamp
to To timestamp

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • events (array)
    Events list

    • code (array)
      Event code

      • decimal (int)
        Event decimal code
      • hex (string)
        Event hexadecimal code
    • description (string)
      Event description
    • param (int)
      Event param




Get tariffs for tree element

https://mdm.waviot.com/api.tree/get_tariffs/?id=5921
Parameter Description
id Tree element id
timestamp Timestamp of the moment for which we want to receive tariffs

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • tariffs (array)
    Tariff channels list

    • currency (string)
      Currency code (ISO 4217)
    • cost (float)
      Tariff cost
    • timestamp_from (int)
      Tariff start timestamp
    • timestamp_to (int)
      Tariff end timestamp




Get tree element balance info

https://mdm.waviot.com/api.data/get_balance_info/?from=1510866000&to=1513458000&elementId=19063
Parameter Description
from From timestamp
to To timestamp
elementId Tree element id

Result

Returns an object that contains fields:
  • status (string)
    Available values: ok | error
    Request status
  • balance
    Set of channels with balance data

    • [channel_id] (array)
      Channel code

      • balance (float)
        Balance
      • computed_summ (float)
        Sum on child meters
      • e (float)
        Unbalance in %
      • summator_summ (float)
        Summing register data, for example, the counter of the KTP
      • data (array)
        Data from which the balance is considered

        • [modem_id] (array)
          Modem HEX id

          • device_sn (string)
            Serial number
          • element_name (string)
            Tree element name
          • element_vm_code (string)
            VM code
          • element_ovm_code (string)
            OVM code
          • start (int)
            Readings at the beginning of the requested period
          • diff (int)
            Consumption for the requested period
          • end (int)
            Readings at the end of the requested period
          • last_message_timestamp (int)
            Last message timestamp
          • modem_id (string)
            Modem id
          • unit_id (string)
            Unit of measurement




Channels list