Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:d-sdk:4_units:8_get_unit_msgs [2019/08/29 17:47]
cappopt@gmail.com
en:d-sdk:4_units:8_get_unit_msgs [2021/07/07 13:28]
Line 1: Line 1:
-====== Unit Messages ====== 
-The request is intended to receive unit messages. 
  
-=== Request Example === 
-<code php>&​svc=get_unit_msgs&​params=[ 
-    { 
-        "​id_unit":​ integer, 
-        "​from":​ timestamp, 
-        "​to":​ timestamp, 
-        "​fields":​ "​string,​ string, ..." 
-        "​is_online":​ bool 
-    }, 
-    .... 
-]</​code>​ 
- 
-=== Parameters === 
-^ Parameter ​  ^ Description ​  ^ 
-| id_unit | Unique Unit ID | 
-| from | Start time of unit messages | 
-| to | End time of unit messages | 
-| fields | List of required fields to recieve | 
-| is_online | Unit online | 
- 
-=== Additional Information === 
-Optional parameters: 
- 
-fields - specify the individual fields of '​time,​lat,​lon,​speed,​course,​height,​sats,​params,​unit_type,​unit_id,​time_speed'​. 
-Several units messages site.sdk/?​login=demo&​pass=demo&​svc=get_unit_msgs&​params=[{"​id_unit":​57,"​from":​1422599311,"​to":​1423466292},​{"​id_unit":​82,"​from":​1422599311}] 
- 
-Optional Parameter: 
-is_online - receive messages only from online 
- 
-=== Server Response === 
-== Result == 
-<code php>[ 
-    { 
-        "​id":​12615246,​ // Message ID 
-        "​time":​1516726445,​ // Time of message 
-        "​lat":"​53.909869",​ // Latitude 
-        "​lon":"​27.499587",​ // Longitude 
-        "​speed":​0,​ // Speed 
-        "​course":​0,​ // Movement direction 
-        "​height":​225,​ // Height above sea level 
-        "​sats":​0,​ // Number of satellites 
-        "​params":""​ // Parameters of message 
-    }, 
-    ... 
-</​code>​