Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
en:mervis-ide:65-webpanel:webpanel-api [2017/06/21 14:41] m.chlupac [Request] |
en:mervis-ide:65-webpanel:webpanel-api [2019/05/21 09:57] m.chlupac |
||
---|---|---|---|
Line 6: | Line 6: | ||
==== Request ==== | ==== Request ==== | ||
+ | |||
+ | **URL:** '' | ||
<code js>{ | <code js>{ | ||
Line 11: | Line 13: | ||
//optional - only for non-authenticated access | //optional - only for non-authenticated access | ||
// | // | ||
- | c: {u: “karel”, p: “x”} | + | c: {u: "karel", p: "x"} |
}</ | }</ | ||
Line 18: | Line 20: | ||
<code js>{ | <code js>{ | ||
ver : 1,//version | ver : 1,//version | ||
- | code: “ok”, //return code | + | code: "ok", //return code |
- | msg: “”, //error message | + | msg: "" |
- | c : {u: “karel”, p:”x”} //must be used for further communication | + | c : {u: "karel", p:"x"} //must be used for further communication |
}</ | }</ | ||
Line 26: | Line 28: | ||
==== Request ==== | ==== Request ==== | ||
+ | |||
+ | **URL:** '' | ||
<code js>{ | <code js>{ | ||
Line 31: | Line 35: | ||
//optional - only for non-authenticated access | //optional - only for non-authenticated access | ||
// | // | ||
- | c: {u: “karel”, p: “x”}, | + | c: {u: "karel", p: "x"}, |
//variable IDs | //variable IDs | ||
- | v: [ “svc:// | + | v: [ "svc:// |
- | “svc:// | + | "svc:// |
}</ | }</ | ||
* variable ID is unique string - in future, may be different for different platforms/ | * variable ID is unique string - in future, may be different for different platforms/ | ||
- | === Variable specification for RT2 === | + | === Variable specification for Mervis RT === |
* svc - protocol | * svc - protocol | ||
Line 52: | Line 56: | ||
- converted into POST parameters (jQuery default behaviour):< | - converted into POST parameters (jQuery default behaviour):< | ||
- | The best solution would be to support both versions. Easier is now the JSON string. | ||
==== Response ==== | ==== Response ==== | ||
Line 71: | Line 74: | ||
=== Encoding of values - version 1 === | === Encoding of values - version 1 === | ||
- | Ea | + | |
===== Command Request ===== | ===== Command Request ===== | ||
Line 77: | Line 80: | ||
==== Request ==== | ==== Request ==== | ||
+ | **URL:** '' | ||
<code js>{ | <code js>{ | ||
Line 82: | Line 86: | ||
// | // | ||
// | // | ||
- | c: {u: “karel”, p: “x”}, | + | c: {u: "karel", p: "x"}, |
v: [{ | v: [{ | ||
- | | + | |
// | // | ||
- | | + | |
- | | + | |
- | | + | |
// | // | ||
set: 5, | set: 5, | ||
- | // | + | // |
// | // | ||
- | | + | |
} | } | ||
] | ] | ||
Line 103: | Line 107: | ||
==== Request ==== | ==== Request ==== | ||
+ | |||
+ | **URL:** '' | ||
<code js>{ | <code js>{ | ||
Line 108: | Line 114: | ||
// | // | ||
// | // | ||
- | c: {u: “karel”, p: “x”}, | + | c: {u: "karel", p: "x"}, |
- | v: [ {i:“svc:// | + | v: [ {i:"svc:// |
from: XXXX, | from: XXXX, | ||
to: YYYY | to: YYYY | ||
}, | }, | ||
- | {i:“svc:// | + | {i:"svc:// |
from: XXXX, | from: XXXX, | ||
to: YYYY | to: YYYY | ||
Line 120: | Line 126: | ||
}</ | }</ | ||
+ | ==== Response ==== | ||
- | + | < | |
- | ===== Configuration Response ===== | + | "ver": 1, |
- | + | " | |
- | < | + | " |
- | ver : 1,//version | + | " |
- | | + | " |
- | | + | |
- | | + | " |
- | | + | " |
- | }</ | + | |
- | + | { | |
+ | " | ||
+ | " | ||
+ | | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | }, | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | | ||
+ | }] | ||
+ | } | ||
+ | </ | ||