Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
kb:ws:autorizacija_registerdevice [2017/10/25 08:17] – aleksandar | kb:ws:autorizacija_registerdevice [2018/04/16 08:13] – aleksandar | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Akcija ===== | ===== Akcija ===== | ||
- | Metodom se registruje (autorizuje) uredjaj za pristup web servisu. | + | Metodom se registruje (autorizuje) uredjaj za pristup web servisu. Samo token koji je dobio supervizor može da vrši operaciju. |
===== Sintaksa ===== | ===== Sintaksa ===== | ||
- | RegisterDevice (token, devid, body) | + | RegisterDevice (token, devid, |
^HTTP Metod^Primer URLa| | ^HTTP Metod^Primer URLa| | ||
- | |POST|[[http://< | + | |POST|[[http://< |
===== Parametri ===== | ===== Parametri ===== | ||
Line 19: | Line 19: | ||
|HTTP Body|String|Request body| | |HTTP Body|String|Request body| | ||
- | ==== Request body ==== | + | ==== Request body ==== |
- | Body zahteva sadrži string koji je duzine | + | Body zahteva sadrži |
+ | |||
+ | ^Član^Tip^Opis| | ||
+ | |id|String|Jedinstveni ID uredjaja do 80 znakova| | ||
+ | |desc|String|Jedinstveni | ||
+ | |||
+ | Primer: | ||
+ | |||
+ | < | ||
+ | { " | ||
+ | </ | ||
- | '' | ||
===== Rezultat ===== | ===== Rezultat ===== | ||
^Status^Opis| | ^Status^Opis| | ||
|200 OK|Uredjaj je uspešno registrovan| | |200 OK|Uredjaj je uspešno registrovan| | ||
+ | |401 Unauthorised|Token nije supervizorski| | ||
|406 Not Accepted|Greška u poslatim parametrima| | |406 Not Accepted|Greška u poslatim parametrima| | ||
|500 Server Error|Greška na serveru, uredjaj nije registrovan| | |500 Server Error|Greška na serveru, uredjaj nije registrovan| |