API IOT Vega-Server API VEGA-LoRa Rev23 (18-January-2019)

Transcription

API IOT Vega-ServerAPI VEGA-LoRa Rev23 (18-January-2019)Total list of used commandsPossible server responses for invalid input packets .2User authorization (auth req, auth resp) .3Close online session (close auth req, close auth resp) .5Recover online session via token (token auth req, token auth resp) .6Get list of registered users (get users req, get users resp) .7Add new user or modify settings of existed ones (manage users req, manage users resp) .9Notification that some parameters has been modified (alter user resp) .11Delete registered users (delete users req, delete users resp) .12Verify server connection (ping req, ping resp) .13Get list of devices with attribute set (get device appdata req, get device appdata resp) .14Return saved data from device (get data req, get data resp) .16Send data to device (or add data to downlink queue) (send data req, send data resp) .19Manage attributes of corresponding devices (manage device appdata req, manage device appdata resp).21Delete attributes of devices (delete device appdata req, delete device appdata resp) .23Get list of registered gateways (get gateways req, get gateways resp) .25Add new gateways or modify settings of existed ones (manage gateways req, manage gateways resp) .27Delete registered gateway (delete gateways req, delete gateway resp) .29Get list of devices with registration info (get devices req, get devices resp) .30Add new devices or modify settings of existed ones (manage devices req, manage devices resp) .34Delete registered device (delete devices req, delete devices resp) .39Information about coverage area (get coverage map req, get coverage map resp) .40Information about queue of downlink packets (get device downlink queue req,get device downlink queue resp) .44Modification queue of downlink packets (manage device downlink queue req,manage device downlink queue resp) .47Server information (server info req, server info resp) .50Send e-mail message (send email req, send email resp, send email result resp) .51Online response with packet info (uplink / downlink) for corresponding device (rx) .54Send single-frame data to device (tx) .55Online response with server debug information (console) .56Revision history .57Revision 23 – 18.01.20191

API IOT Vega-ServerPossible server responses for invalid input packetsIf received packet is not JSON:{"err string":"invalid json msg"}If received packet is JSON, but not contain “cmd” value:{"err string":"cmd not found",string//received message}If received packet is JSON, contains “cmd” value, but it’s value is unknown:{"cmd":string,// “cmd” value from received packet"err string":"unknown cmd"}Revision 23 – 18.01.20192

API IOT Vega-ServerUser authorization (auth req, auth resp)Request message:{“cmd”: “auth req”,“login”: string,“password”: string}Response message:{“cmd”: “auth resp”,“status”: boolean,“err string”?: string“token”?: string,“device access”?: string,“consoleEnable”: bool,“command list”?:[// case insensitive string// original password string without any encoding//[optional exist if “status” is false] – string code of error//[optional exist if “status” is true] – session string token (32 HEX symbols)//[optional exist if “status” is true] – access level to devices (see below possiblevalues)//[optional exist if “status” is true] – enable to connect to console subchart withdebug information//[optional exist if “status” is true] – accessible commands1 (see below possiblevalues)“command 1”, ,“command n”],“rx settings”?://[ optional exist if “status” is true] – setting of online receiving messages{“unsolicited”: boolean,//online message is sending [true] or not sending [false - default]“direction”: string,//[optional absent if “unsolicited” is false] – direction of possible online messages(see below)“withMacCommands”:boolean//[optional] – online message contains MAC commands}}Possible values for “token”: “FULL” – user have access to all devices; “SELECTED” – user have access to device that was selected by administrator.Possible values for “err string”: “invalid login or password” – returns if login isn’t found or password isn’t validatedPossible string values of “direction”: “UPLINK” – data from device to server; “DOWNLINK” – data from server to device; “ALL” – all data from and to device.1This mean that, for example, commands “auth req” and “auth resp” are grouped into “auth” command group;Revision 23 – 18.01.20193

API IOT Vega-ServerPossible values for “command list”2: “get users” “manage users” “delete users” “get device appdata” “get data” “send data” “manage device appdata” “delete device appdata” “get gateways” “manage gateways” “delete gateways” “get devices” “manage devices” “delete devices” “get coverage map” “get device downlink queue” “manage device downlink queue” “server info” “send email” “tx”Example request message:{“cmd”: “auth req”,“login”: “user”,“password”: “123456”}Example response message:{“cmd”: “auth resp”,“status”: true,“token”: “ABCDEF0012346578ABCDEF0012346578”,“device access”: “SELECTED”,“command list”:[“get userlist”,“update userlist”,“delete userlist”]}2Command group “auth”, “close auth” and “token auth” are accessible for all users.Revision 23 – 18.01.20194

API IOT Vega-ServerClose online session (close auth req,close auth resp)Request message:{“cmd”: “close auth req”,“token”: string// Session string token (32 HEX symbols)}Response message:{“cmd”: “close auth resp”,“status”: boolean,“err string”?: string//[optional exist if “status” is false] – string code of error}Possible values for “err string”: “invalid token” – returns if “token” is not exist or belong to another connectionExample request message:{“cmd”: “close auth req”,“token”: “ABCDEF0012346578ABCDEF0012346578”}Example response message:{“cmd”: “close auth resp”,“status”: true}Revision 23 – 18.01.20195

API IOT Vega-ServerRecover online session via token3 (token auth req,token auth resp)Request message:{“cmd”: “token auth req”,“token”: string// Session string token (32 HEX symbols)}Response message:{“cmd”: “token auth resp”,“status”: boolean,“err string”?: string,//[optional exist if “status” is false] – string code of error“token”: string//[optional exist if “status” is true] – new session string token (32 HEX symbols)}Possible values for “err string”: “invalid token” – returns if token is not existExample request message:{“cmd”: “token auth req”,“token”: “ABCDEF0012346578ABCDEF0012346578”}Example response message:{“cmd”: “token auth resp”,“status”: true,“token”: “ABCDEF0012346579”}3Token lifetime is equal 1 minuteRevision 23 – 18.01.20196

API IOT Vega-ServerGet list of registered users (get users req,get users resp)Request message:{“cmd”: “get users req”,“keyword”?:[string, ]}//[optional] See below descriptionPossible string values of “keyword”: “no command and devEui” – return list of user without “devEui list” and “command list”Response message:{“cmd”: “get users resp”,“status”: boolean,“err string”?: string,“user list”:[{“login”: string,“device access”: string,“consoleEnable”: bool,“devEui list”?:// Main status of execution//[optional exist if “status” is false] – string code of error//Access level to devices (see below possible values). If “FULL”,“devEui list” would be ignored//Enable to connect to console subchart with debug information//[optional absent if “no command and devEui” is exist] List ofDevEUI that is accessible for user[“devEui 1”, ,“devEui n”],“command list”?:[//[optional absent if “no command and devEui” is exist] List ofcommands that is accessible for user“command 1”, ,“command n”],“rx settings”?:{//[optional absent if “no command and devEui” is exist] – setting ofonline receiving messages“unsolicited”: boolean,“direction”?: string,//online message is sending [true] or not sending [false - default]//[optional absent if “unsolicited” is false] – direction of possibleonline messages (see below)“withMacCommands”?:boolean //[optional] – online message contains MAC commands}}, ]}Possible values for “err string”: “inaccessible command” – returns if current user don’t have access for this command; “invalid cmd” – returns if command don’t contain “user list”; “empty input parameter list” – returns if “user list” is emptyPossible values for “token”: “FULL” – user have access to all devices; “SELECTED” – user have access to device that was selected by administrator.Possible string values of “direction”: “UPLINK” – data from device to server;Revision 23 – 18.01.20197

API IOT Vega-Server “DOWNLINK” – data from server to device; “ALL” – all data from and to device.Example request message:{“cmd”: “get users req”}Example response message:{“cmd”: “get users resp”,“status”: true,“user list”:[{“login”: “user1”,“device access”: “SELECTED”,“consoleEnable”: true,“devEui list”:[“0000000000000001”],“command list”:[“get userlist”,“update userlist”,“delete userlist”]}]}Revision 23 – 18.01.20198

API IOT Vega-ServerAdd new user or modify settings of existed ones(manage users req, manage users resp)Request message:{“cmd”: “manage users req”,“user list”:[{“login”: string,“password”?: string,“device access”: string,“consoleEnable”: bool,“devEui list”?:[“devEui 1”, ,“devEui n”],“command list”?:[“command 1”, ,“command n”],“rx settings”?:{“unsolicited”?: boolean,// User login as string//[optional] – password string. Should be exist when new user is added//[optional] – access level to devices (see below possible values). If“FULL”, “devEui list” would be ignored (“SELECTED” - default)//[optional] – enable to connect to console subchart with debuginformation (false – is default)//[optional] – list of DevEui that may be accessible by user//By default is empty//[optional] – list of commands groups that may be accessible by user//By default is empty//[optional] – setting of online receiving messages//[optional] – online message is sending [true] or not sending [false default]“direction”?: string,//[optional] – direction of possible online messages (see below)“withMacCommands”?:boolean //[optional] – online message contains MAC commands}}, ]}Possible values for “token”: “FULL” – user have access to all devices; “SELECTED” – user have access to device that was selected by administrator.Possible string values of “direction”: “UPLINK” – data from device to server; “DOWNLINK” – data from server to device; “ALL” – all data from and to device.Response message:{“cmd”: “manage users resp”,“status”: boolean,“err string”?: string//[optional exist if “status” is false] – string code of error“add user list”:[{“login”:string,“status”: boolean//User’s adding or updating status}, ]}Possible values for “err string”: “inaccessible command” – returns if current user don’t have access for this command “invalid cmd” – returns if command don’t contain “user list”;Revision 23 – 18.01.20199

API IOT Vega-Server “empty input parameter list” – returns if “user list” is empty; “login is reserved” – was used reserved sequence as user login;Example request message:{}“cmd”: “manage users req”,“user list”:[{“login”: “user1”,“password”: “123456”,“device access”: “SELECTED”,“consoleEnable”: false,“command list”:[“get userlist”,“update userlist”,“delete userlist”],“devEui list”:[“0000000000000001”],“rx settings”:{“unsolicited”: true,“direction”: “ALL”,“withMacCommands”: true}}]Example response message:{“cmd”: “manage users resp”,“status”: true,“add user list”:[{“login”: “user1”,“status”: true}]}Revision 23 – 18.01.201910

API IOT Vega-ServerNotification that some parameters has beenmodified (alter user resp){}“cmd”: “alter user resp”,“login”: string,// User login as string“deleted”?: boolean,//[optional] “True” if user has been deleted“device access”?: string,//[optional – exist if “deleted” is false] access level to devices. If “FULL”,“devEui list” would be ignored (“SELECTED” - default)“devEui list”?://[optional – exist if “device access” “SELECTED”] – list of DevEui that may beaccessible by user[//By default is empty“devEui 1”, ,“devEui n”],“command list”?://[optional – exist if “deleted” is false] list of commands groups that may beaccessible by user[//By default is empty“command 1”, ,“command n”],“consoleEnable”?: boolean, //[optional] if “true” - console commands would be sent“rx settings”?://[optional – exist if “deleted” is false] setting of online receiving messages{“unsolicited”: boolean, //online message is sending [true] or not sending [false - default]“direction”: string,//direction of possible online messages“withMacCommands”:boolean //online message contains MAC commands}Note: all fields are optional and send (present in packet) in case of modificationExample response message:{“cmd”: “alter user resp”,“login”: “user1”,“deleted”: false,“device access”: “SELECTED”,“command list”:[“get userlist”,“update userlist”,“delete userlist”],“devEui list”:[“0000000000000001”],“rx settings”:{“unsolicited”: true,“direction”: “ALL”,“withMacCommands”: true}}Revision 23 – 18.01.201911

API IOT Vega-ServerDelete registered users (delete users req,delete users resp)Request message:{“cmd”: “delete users req”,“user list”:[“login 1”, ,“login n”]}Response message:{“cmd”: “delete users resp”,“status”: boolean,“err string”?: string,//[optional exist if “status” is false] – string code of error“delete user list”:[{“login”:string,“status”: boolean,}, ]}Possible values for “err string”: “inaccessible command” – returns if current user don’t have access for this command; “invalid cmd” – returns if command don’t contain “delete user list”; “empty input parameter list” – returns if “delete user list” is emptyExample request message:{“cmd”: “delete users req”,“user list”:[“user1”,“user2”]}Example response message:{“cmd”: “delete users resp”,“status”: true,“delete user list”:[{“login”: “user1”,“status”: true},{“login”: “user2”,“status”: false}]}Revision 23 – 18.01.201912

API IOT Vega-ServerVerify server connection (ping req, ping resp)Request message:{“cmd”: “ping req”}Response message:{“cmd”: “ping resp”}Revision 23 – 18.01.201913

API IOT Vega-ServerGet list of devices with attribute set(get device appdata req,get device appdata resp)Request message:{“cmd”: “get device appdata req”,“keyword”?://[optional] See possible values[string, ]“select?:”//[optional] Filter object{“appEui list”?://[optional] List of corresponding AppEUI for request[“appEui 1”, ,“appEui n”]}}Possible string values of “keyword”: “no attributes” – return list of devEui without attribute sets; “add data info” – add extra 3 field (“last data ts”, “fcnt up” and “fcnt data”) to response.Response message:{“cmd”: “get device appdata resp”,“status”: boolean,//Status of execution of command (global status)“err string”?: string,//[optional exist if “status” is false] – string code of error“devices list”://Sets of attributes[{“devEui”: string,//Device EUI, 16 hex digits (without dashes)“appEui”: string,//Application EUI, 16 hex digits (without dashes)“devName”: string,//Custom name of device“key name1”?: string, //[optional – is absent if use keyword “no attributes”] first attribute name ,“key name n”?: string,//[optional – is absent if use keyword “no attributes”] n-st attributename“last data ts”?: integer,//[optional – is exist if use keyword “add data info”] server UTCtimestamp of last received data (ms from Linux epoch)“fcnt up”?: integer, //[optional – is exist if use keyword “add data info”] frame counter upload, a 32bit number“fcnt down”?: integer //[optional – is exist if use keyword “add data info”] frame counter download, a32-bit number}, ]}Possible values for “err string”: “inaccessible command” – returns if current user don’t have access for this command;Revision 23 – 18.01.201914

API IOT Vega-ServerExample request message:{“cmd” : “get device appdata req”}Example response message:{“cmd”: “get device appdata resp”,“status”: true,“devices list”:[{“devEui”: “3933363845366606”,“appEui”: “0000000000000001”,“devName”: “Окно левое в комнате 1”,“adress1”: “Novosibirsk”,“devType”: “SI-11.VA”“name”: “test”},{“devEui”: “3933363845366607”,“appEui”: “0000000000000001”,“devName”: “Окно левое в комнате 2”,“adress1”: “Novosibirsk”,“devType”: “SI-11.VA”“name”: “test2”}]}Revision 23 – 18.01.201915

API IOT Vega-ServerReturn saved data from device (get data req,get data resp)Request message:{“cmd”: “get data req”,“devEui”: string,“select”?:{“date from”?: integer,}//[optional] Extra optional for searching//[optional] server UTC timestamp as number (miliseconds from Linuxepoch)“date to”?: integer,//[optional] server UTC timestamp as number (miliseconds from Linuxepoch)“begin index”?: integer,//[optional] begin index of data list [default 0]“limit”?: integer,//[optional] limit of response data list [default 1000]“port”?: integer,//[optional] select data with noted port“direction”?: string,//[optional] direction of message transition (see below description)“withMacCommands”?: boolean//[optional] add MAC commands to response}Response message:{“cmd”: “get data resp”,“status”: boolean,“err string”?: string,“devEui”: string,“appEui”: string,“direction”?: string,“totalNum”?: integer,“data list”?:[{“ts “: integer,// Status of execution of command (global status)//[optional] If “status” false, contains error description (see belowdescription)//[optional – exist if “status” true]//[optional – exist if “status” true] Total existing number of datacorresponding type//[optional – exist if “status” true] Data, transmitted by device// Server UTC receiving timestamp (miliseconds from Linux epoch)4“gatewayId”: string,// Gateway IDs that receive data from device“ack”: boolean,// Acknowledgement flag as set by device“fcnt”: integer,// Frame counter, a 32-bit number (uplink or downlink based on “direction”value)“port”: integer,// Port (if 0, use JOIN operations or MAC-commands only)“data” : string,// Decrypted data payload“macData”?: string,//[optional– exist if “withMacCommands” true and MAC command is present]MAC command data from device“freq”: integer,// Radio frequency at which the frame was received/transmitted, in Hz“dr”: string,// Spreading factor, bandwidth and coding rate “SF12 BW125 4/5”“rssi”: integer,//[optional – exist if packet direction “UPLOAD”] Frame rssi, in dBm, as integernumber“snr”: float,//[optional – exist if packet direction “UPLOAD”] Frame snr, in dB“type”: string,// Type of packet (see below description). May contains several types joinedvia “ ”“packetStatus”?: string//[optional – exist if packet direction “UPLOAD”] Status of downlinkmessage only (see below description)}, ]}4Message from one device could be delivered over by several gateways. In this packet, “gatewayId” contains ID ofgateways joined via “ ”. I.e. “0000000000000001 0000000000000002”Revision 23 – 18.01.201916

API IOT Vega-ServerPossible string values of “direction”: “UPLINK” – data from device to server; “DOWNLINK” – data from server to device; “ALL” – all data from and to device.Possible string values of “type”: “UNCONF UP” – unconfirmed uplink data, “REPEATUNCONF UP” – repeated unconfirmed uplink data, 5 “UNCONF DOWN” – unconfirmed downlink data, “CONF UP” – confirmed uplink data, “REPEATCONF UP” – repeated confirmed uplink data,5“CONF DOWN” – confirmed downlink data,“JOIN REQ” – join request message,“JOIN ACC” – join accept message,“MAC LINKCHECK REQ” – LinkCheckReq MAC command (send by device) [request] [1 Byte length],“MAC LINKCHECK ANS” – LinkCheckAns MAC command (send by server) [answer] [3 Byte],“MAC ADR REQ” – LinkADRReq MAC command (send by server) [request] [5 Byte],“MAC ADR ANS” – LinkADRAns MAC command (send by device) [answer] [2 Byte],“MAC RXPARAM REQ” – RXParamSetupReq MAC command (send by server) [request] [5 Byte],“MAC RXPARAM ANS” – RXParamSetupAns MAC command (send by device) [answer] [2 Byte],“MAC STATUS REQ” – DevStatusReq MAC command (send by server) [request] [1 Byte],“MAC STATUS ANS” – DevStatusAns MAC command (send by device) [answer] [3 Byte],“MAC NEWCHAN REQ” – NewChannelReq MAC command (send by server) [request] [6 Byte],“MAC NEWCHAN ANS” – NewChannelAns MAC command (send by device) [answer] [2 Byte],“MAC RXTIMING REQ” – RXTimingSetupReq MAC command (send by server) [request] [2 Byte],“MAC RXTIMING ANS” – RXTimingSetupAns MAC command (send by device) [answer] [1 Byte],“MAC TXPARAM REQ” – TxParamSetupReq MAC command (send by server) [request] [2 Byte],“MAC TXPARAM ANS” – TxParamSetupAns MAC command (send by device) [answer] [1 Byte],“MAC DLCHAN REQ” – DlChannelReq MAC command (send by server) [request] [5 Byte],“MAC DLCHAN ANS” – DlChannelAns MAC command (send by device) [answer] [2 Byte].Possible string values of “status” for download message: “SUCCESS”; “TOO LARGE GW PING ERR” – ping to gateway is too large for transmission; “COLLISION ERR” – packet is collided with another (for device CLASS A); “BEACON COLLISION ERR” – current packet is collided with beacon synchro packet; “POWER ERR” – invalid power settings for corresponding base station; “FREQ ERR” – invalid; “LATENCY ERR” – latency for corresponding gateway is too big; “NO VACANT GW” – no vacant gateway (all gateways is busy); “PAYLOAD SIZE ERR” – payload is too big for transmission on corresponding SF (may be arise with send data req).Possible string values of “err string”: “invalidDevEui” – empty or invalid devEui; “invalidDirection” – invalid direction value in request; “inaccessible command” – returns if current user don’t have access for this command; “inaccessible devEui” – return if current user hasn’t access for corresponding device;5“REPEAT” prefix is used in case when device repeat last sending uplink packet. When class C device is used in transparentmode such packets should be ignored.Revision 23 – 18.01.201917

API IOT Vega-ServerExample request message:{“cmd”: “get data req”,“devEui”: “3933363845366606”,“select”:{“date from”: 354541184,“limit”: 100}}Example response message:{“cmd”: “get data resp”,“status”: true,“devEui”: “3933363845366606”,“appEui”: “0000000000000001”,“data list”:[{“ts “:6546544313531,“gatewayId”: “0000000000000001 0000000000000002”,“ack”: false,“fcnt”: 10,“port”: 40,“data” : “3543543545bccb”,“macData”: “02”,“freq”: 868100000,“dr”: “SF12 BW125 4/5”,“rssi”: -75,“snr”: 2.6,“type”: “ UNCONF UP MAC LINKCHECK ANS”}]}Revision 23 – 18.01.201918

API IOT Vega-ServerSend data to device (or add data to downlinkqueue) (send data req, send data resp)Request message:{“cmd”: “send data req”,“data list”:[{“devEui”: string,“data”: string,“port”: integer,“ack”?: boolean}, ]}////////Device EUI, 16 hex digits (without dashes)Data payload (to be encrypted by server). Should be paired!Port to be used (1.223)[optional] request confirmation (ACK) from end-deviceResponse message:{“cmd”: “send data resp”,“status”: boolean,// Result of execution command [true, false]“err string”?: string,//[optional] If “status” false, contains error description (see belowdescription)“append status”:[{“devEui”: string,“status”: boolean// Result of appending data for corresponding device}, ]}Possible values for “err string”: “inaccessible command” – returns if current user don’t have access for this command;Revision 23 – 18.01.201919

API IOT Vega-ServerExample request message:{“cmd”: “send data req”,“data list”:[{“devEui”: “3933363845366606”,“data”: “25db26a2c8b4”,“port”: 40,“ack”, true},{“devEui”: “3933363845366658”,“data”: “25db26a2c8b5”,“port”: 40}]}Example response message:{“cmd”: “send data resp”,“status”: true,“append status”:[{“devEui”: “3933363845366606”,“status”: true},{“devEui”: “3933363845366658”,“status”: true}]}Revision 23 – 18.01.201920

API IOT Vega-ServerManage attributes of corresponding devices(manage device appdata req,manage device appdata resp)Request message:{“cmd”: “manage device appdata req”,“data list”:[{“devEui”: string,“key 1”: string,// Name of 1-st attribute ,“key n”: string// Name of n-st attribute}, ]}Response message:{“cmd”: “manage device appdata resp”,“status”: boolean,// Status of executing command (global status)“err string”?: string,//[optional] If “status” false, contains error description (see belowdescription)“update status”?://[optional] Status of updating of corresponding device. Existing only if globalstatus “true”[{“devEui”: string,“status”: boolean}, ]}Possible string values of “err string”: “inaccessible command” – returns if current user don’t have access for this command; “empty input parameter list” – return if “data list” is emptyExample request message:{“cmd”: “manage device appdata req”,“data list”:[{“devEui”: “3933363845366606”,“location”: “Novosibirsk”,“name”: “test3”}]}Example response message:{“cmd”: “manage device appdata resp”,“status”: true,“update status”:[{“devEui”: “3933363845366606”,Revision 23 – 18.01.201921

API IOT Vega-Server“status”: true}]}Revision 23 – 18.01.201922

API IOT Vega-ServerDelete attributes of devices(delete device appdata req,delete device appdata resp)Request message:{“cmd”: “delete device appdata req”,“data list”:[{“devEui”: string,“delete keys”?://[optional] if not exist, would be deleted all attributes for corresponding device[“key 1”,// Name of 1-st attribute ,“key n”// Name of n-st attribute]}, ]}Response message:{“cmd”: “delete device appdata resp”,“status”: boolean,// Status of executing command (global status)“err string”?: string, //[optional] If “status” false, contains error description (see below description)“delete status”?://[optional] Status of updating of corresponding device. Existing only if global status “true”[{“devEui”: string,“status”: boolean}, ]}Possible string values of “err string”: “inaccessible command” – returns if current user don’t have access for this command; “empty input parameter list” – return if “data list” is emptyRevision 23 – 18.01.201923

API IOT Vega-ServerExample request message:{“cmd”: “delete device appdata req”,“data list”:[{“devEui”: “3933363845366606”,“delete keys”:[“location”,“name”]}]}Example response message:{“cmd”: “delete device appdata resp”,“status”: true,“delete status”:[{“devEui”: “3933363845366606”,“status”: true}]}Revision 23 – 18.01.201924

API IOT Vega-ServerGet list of registered gateways (get gateways req,get gateways resp)Request message:{“cmd”: “get gateways req”}Response message:{“cmd”: “get gateways resp”,“status”: boolean,“err string”?: string,//[optional] If “status” false, contains error description (see belowdescription)“gateway list”:[{“gatewayId”: string, // Gateway ID: 16 hex digits (without dashes)“extraInfo”: string,// Any addition information, e.g. location, type and other“active”: boolean,// Activity of base station“lastOnline”?: integer, //[optional – if gateway is NOT active] UTC time in ms of last keepalive massagefrom gateway“latency”: integer,// last latency value of gateway [ms]“downlinkChannel”: integer,// rfChannel for downlink packets“maxPower”: integer, // Maximum power for transitions [dBm]“rxOnly”: boolean,// true if gateway works in receive mode only (two gateway create full-duplextransceiver )“companionGateway”?: string, //[optional - if rxOnly is true] ID of gateway which can download packets“position”:{“longitude”: float,// geographical longitude of gateway position“latitude”: float,// geographical latitude of gateway position“altitude”: integer// altitude in meters}}, ]}Possible string values of “err string”:“inaccessible command” – returns if current user don’t have access for this commandRevision 23 – 18.01.201925

API IOT Vega-ServerExample request message:{“cmd”: “get gateways req”}Example response message (base stations “024b08050248” and “024b08050249” produce full duplex base station) :{“cmd”: “ get gateways resp”,“gateway list”:[{“gatewayId”: “024b08050248”,“extraInfo”: “Kerlink IoT 868”,“active”: true,“latency”: 503,“downlinkChannel”: 0,“maxPower”: 14,“rxOnly”: false,“position”:{“longitude”: 55.08,“latitude”: 82.3,“altitude”: 182}},{“gatewayId”: “024b08050249”,“extraInfo”: “Kerlink IoT 868”,“active”: true,“latency”: 25,“downlinkChannel”:

API IOT Vega-Server Revision 23 - 18.01.2019 8 "DOWNLINK" - data from server to device; "ALL" - all data from and to device.