Funkce /api/get vrací stav zařízení. Odpověď je ve formátu JSON.
Metoda: POST
Klíče:
K získání hodnot všech vstupních slouží klíč "param". (když nedám žádný parametr/klíč?),
Jak vypadá požadavek jen na některé klíče?
POST { "param": [ "sntp_enable", "sntp_server", "sntp_timeout", "sntp_period", "dev_sn", "test_wr_param" ] } nebo POST { "param": [] //returns all existing parameters } |
Odpověď je ve formátu json.
POST { "status": { // return unread parameters "sntp_timeout": "undefined", "test_wr_param": "access_denied" }, "value": { // returns read parameters "sntp_enable":"no", "sntp_server": "ntp.cesnet.cz", "sntp_period": 2, "dev_sn": "00000013" } } |
To get the reading of parameter value.
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "deviceType": { "type": "string" } }, "required": [ "deviceType", ] } |
{ "deviceType": "5.1.0.0" } |