Wiki source code of 07 HTTP API
Last modified by Devin Chen on 2025/06/30 14:16
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = **General** = | ||
2 | |||
3 | This documents introduces WECON V-BOX HTTP API. And this document also shows some examples. All example is tested from postman application. | ||
4 | |||
5 | **Transport protocol:** HTTP protocol | ||
6 | |||
7 | **Server address:** | ||
8 | |||
9 | China: | ||
10 | |||
11 | [[http:~~/~~/api.v-box.net>>url:http://api.v-box.net/]] | ||
12 | |||
13 | Asean: | ||
14 | |||
15 | [[http:~~/~~/api.asean.v-box.net>>url:http://api.v-box.net/]] | ||
16 | |||
17 | Europe: | ||
18 | |||
19 | [[http:~~/~~/api.eu.v-box.net>>url:http://api.v-box.net/]] | ||
20 | |||
21 | (% style="text-align:center" %) | ||
22 | [[image:V-BOX HTTP manual_html_ceb1e13ef4c1fa5d.png||height="361" width="800" class="img-thumbnail"]] | ||
23 | |||
24 | For **ASEAN server** V-BOX, now can use http, the server address is api.asean.v-box.net. | ||
25 | |||
26 | The common KEY is: | ||
27 | |||
28 | **comid=128** | ||
29 | |||
30 | **comkey=7e421dd30a394d74b7b9c079e67e272c** | ||
31 | |||
32 | screctkey=f1cd9351930d4e589922edbcf3b09a7c | ||
33 | |||
34 | {{id name="_GoBack"/}} | ||
35 | |||
36 | For** EU server **V-BOX, now can use http, the server address is api.eu.v-box.net. | ||
37 | |||
38 | The common KEY is: | ||
39 | |||
40 | **comid=100** | ||
41 | |||
42 | **comkey=8919244ff15d441bae4b944b112a33ea** | ||
43 | |||
44 | screctkey=f1cd9351930d4e589922edbcf3b09a7c | ||
45 | |||
46 | (% class="box infomessage" %) | ||
47 | ((( | ||
48 | **✎Note:** If it is for Virtual Deployment, the comid and comkey would not be the same with values above. Try to get the actual value from HTTP access (V-NET~-~-Services~-~-HTTP access) | ||
49 | ))) | ||
50 | |||
51 | == **Interface Parameter Description** == | ||
52 | |||
53 | **Global parameters** | ||
54 | |||
55 | The following acturls need to have global parameters (The global parameter client is put into the JSON format and placed in the common parameters of the Headers) | ||
56 | |||
57 | (% style="text-align:center" %) | ||
58 | [[image:企业微信截图_20210531172144.png||height="467" width="800" class="img-thumbnail"]] | ||
59 | |||
60 | **The returned result represented by Json and case sensitive:** | ||
61 | |||
62 | 1).Abnormal | ||
63 | |||
64 | {"code" : 403, "msg" : "SessionID (user session ID) invalid", "reqId": "1502074141465"} | ||
65 | |||
66 | 2).Normal | ||
67 | |||
68 | {"code" : 200 , "result": {}, "msg" : "ok", "reqId":"1502074141465"} | ||
69 | |||
70 | **Status Code** | ||
71 | |||
72 | (% style="text-align:center" %) | ||
73 | [[image:1.png||height="141" width="500" class="img-thumbnail"]] | ||
74 | |||
75 | == **Example key and value** == | ||
76 | |||
77 | 1).**comid**=2 | ||
78 | |||
79 | 2).**comkey**=589625dce895454dbff9782c299db156 | ||
80 | |||
81 | 3).**screctkey**=f1cd9351930d4e589922edbcf3b09a7c | ||
82 | |||
83 | 4).**ts**=1573897380 | ||
84 | |||
85 | ((( | ||
86 | = **Basic API** = | ||
87 | ))) | ||
88 | |||
89 | == **{{id name="_Toc24963726"/}}Login operation** == | ||
90 | |||
91 | ((( | ||
92 | **2.1.1 Parameters** | ||
93 | ))) | ||
94 | |||
95 | (% class="table-bordered" style="width:888px" %) | ||
96 | |**Acturl**|(% colspan="2" style="width:731px" %)we-data/login | ||
97 | |**Function**|(% colspan="2" style="width:731px" %)Login with username, email, phone number | ||
98 | |(% colspan="1" rowspan="4" %)**Parameters**|Items|(% style="width:535px" %)Description | ||
99 | |alias|(% style="width:535px" %)Must be username, registered email will fail to login | ||
100 | |password|(% style="width:535px" %)32bit password (MD5 encryption) | ||
101 | |domain(Optional)|(% style="width:535px" %)3rd party interface domain(Only available for Virtual Deployment) | ||
102 | |(% rowspan="3" %)**Return value**|Items|(% style="width:535px" %)Description | ||
103 | |utype|(% style="width:535px" %)User Type: 1-Manage Account, 2-Viewer Account | ||
104 | |sid|(% style="width:535px" %)User session ID (Only available for 12 hours) | ||
105 | |||
106 | **Operating procedures** | ||
107 | |||
108 | **Setp1: ** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/login>>url:http://api.v-box.net/box-data/api/we-data/login]] | ||
109 | |||
110 | (% style="text-align:center" %) | ||
111 | [[image:V-BOX HTTP manual_html_78fa6b0e5f03b2f2.png||height="63" width="800" class="img-thumbnail"]] | ||
112 | |||
113 | **Setp2: ** Set parameters on Params | ||
114 | |||
115 | alias: weconuser | ||
116 | |||
117 | password: 599a3c736c04e196c58a29f43778f7ea(The md5 encryption result of Wecon159) | ||
118 | |||
119 | (% style="text-align:center" %) | ||
120 | [[image:V-BOX HTTP manual_html_563261d83c8f3530.png||height="250" width="700" class="img-thumbnail"]] | ||
121 | |||
122 | **Step3:** Get sign | ||
123 | |||
124 | alias=weconuser&comid=2&compvtkey=589625dce895454dbff9782c299db156&password=599a3c736c04e196c58a29f43778f7ea&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
125 | |||
126 | Put the whole string above encrypted by MD5, so will get the value of "sign" | ||
127 | |||
128 | "sign":"997513ff1320862f0cbb9ce19d0bd253" | ||
129 | |||
130 | {{info}} | ||
131 | **✎Note: **For Virtual Deployment, the sign string should be append with domain, so the format would be like following: | ||
132 | |||
133 | alias=xxx&comid=xxx&compvtkey=xxx&domain=xxx&password=xxx&ts=1657682972386&key=f1cd9351930d4e589922edbcf3b09a7c | ||
134 | |||
135 | The timestamp must be unit as Millisecond level | ||
136 | {{/info}} | ||
137 | |||
138 | **Step4: ** Set common of header | ||
139 | |||
140 | {"comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"997513ff1320862f0cbb9ce19d0bd253"} | ||
141 | |||
142 | (% style="text-align:center" %) | ||
143 | [[image:V-BOX HTTP manual_html_cbfc9bbb7d0d4f84.png||height="230" width="700" class="img-thumbnail"]] | ||
144 | |||
145 | ((( | ||
146 | **Result** | ||
147 | ))) | ||
148 | |||
149 | { | ||
150 | |||
151 | "code": 200, | ||
152 | |||
153 | "msg": "ok", | ||
154 | |||
155 | "reqId": "1573899119000", | ||
156 | |||
157 | "result": { | ||
158 | |||
159 | "utype": 1, | ||
160 | |||
161 | "ztRole": 1, | ||
162 | |||
163 | "sid": "2d7bfd344aa64d8ebc9beea0e4dad8ad" | ||
164 | |||
165 | } | ||
166 | |||
167 | } | ||
168 | |||
169 | (% style="text-align:center" %) | ||
170 | [[image:V-BOX HTTP manual_html_b00e7e6a00828e27.png||height="291" width="500" class="img-thumbnail"]] | ||
171 | |||
172 | ((( | ||
173 | = **Service data APIs** = | ||
174 | ))) | ||
175 | |||
176 | == **V-Box list** == | ||
177 | |||
178 | **{{id name="_Toc24963732"/}}Parameters** | ||
179 | |||
180 | (% style="text-align:center" %) | ||
181 | [[image:X.png||height="412" width="700" class="img-thumbnail"]] | ||
182 | |||
183 | **~ {{id name="_Toc24963733"/}}Operating procedures** | ||
184 | |||
185 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/boxs>>url:http://api.v-box.net/box-data/api/we-data/boxs]] | ||
186 | |||
187 | (% style="text-align:center" %) | ||
188 | [[image:V-BOX HTTP manual_html_7555868f6d398292.png||height="48" width="700" class="img-thumbnail"]] | ||
189 | |||
190 | **Step2:** Set parameters on Params | ||
191 | |||
192 | No parameters for this acturl, so no need to set. | ||
193 | |||
194 | **Step3: ** Get sign | ||
195 | |||
196 | comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
197 | |||
198 | MD5 value: 8fb4fbf99fcc1331c3274e708a403034 | ||
199 | |||
200 | **Step4:** Set common of header | ||
201 | |||
202 | {"sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"8fb4fbf99fcc1331c3274e708a403034"} | ||
203 | |||
204 | (% style="text-align:center" %) | ||
205 | [[image:V-BOX HTTP manual_html_999832f3a31ac851.png||height="232" width="700" class="img-thumbnail"]] | ||
206 | |||
207 | **Result** | ||
208 | |||
209 | { | ||
210 | |||
211 | "code": 200, | ||
212 | |||
213 | "msg": "ok", | ||
214 | |||
215 | "reqId": "1573900361203", | ||
216 | |||
217 | "result": { | ||
218 | |||
219 | "list": [ | ||
220 | |||
221 | { | ||
222 | |||
223 | "groupName": "", | ||
224 | |||
225 | "boxList": [ | ||
226 | |||
227 | { | ||
228 | |||
229 | "machineCode": "V01001171116005027a279eb001", | ||
230 | |||
231 | "devModel": "V-BOX S-00", | ||
232 | |||
233 | "isAlarm": 0, | ||
234 | |||
235 | "boxName": "Treatment Systems", | ||
236 | |||
237 | "remark": "", | ||
238 | |||
239 | "state": "1", | ||
240 | |||
241 | "map": "78.178613,9.177124", | ||
242 | |||
243 | "boxId": "913" | ||
244 | |||
245 | }, | ||
246 | |||
247 | ………… | ||
248 | |||
249 | { | ||
250 | |||
251 | "machineCode": "Vir001171116005027a27201908", | ||
252 | |||
253 | "devModel": "V-BOX S-00", | ||
254 | |||
255 | "isAlarm": 0, | ||
256 | |||
257 | "boxName": "(Smart farm)", | ||
258 | |||
259 | "remark": "", | ||
260 | |||
261 | "state": "1", | ||
262 | |||
263 | "map": "88.637476,50.415074", | ||
264 | |||
265 | "boxId": "973" | ||
266 | |||
267 | } | ||
268 | |||
269 | ] | ||
270 | |||
271 | }, | ||
272 | |||
273 | …………………… | ||
274 | |||
275 | { | ||
276 | |||
277 | "groupName": "(Manufacturing)", | ||
278 | |||
279 | "boxList": [ | ||
280 | |||
281 | { | ||
282 | |||
283 | "machineCode": "Vir001171116005027a27201904", | ||
284 | |||
285 | "devModel": "V-BOX S-00", | ||
286 | |||
287 | "isAlarm": 0, | ||
288 | |||
289 | "boxName": "(Adjustment)", | ||
290 | |||
291 | "remark": "", | ||
292 | |||
293 | "state": "1", | ||
294 | |||
295 | "map": "109.316038,33.749868", | ||
296 | |||
297 | "boxId": "957" | ||
298 | |||
299 | }, | ||
300 | |||
301 | ……………… | ||
302 | |||
303 | { | ||
304 | |||
305 | "machineCode": "Vir001171116005027a27201915", | ||
306 | |||
307 | "devModel": "V-BOX S-00", | ||
308 | |||
309 | "isAlarm": 0, | ||
310 | |||
311 | "boxName": "", | ||
312 | |||
313 | "remark": "", | ||
314 | |||
315 | "state": "1", | ||
316 | |||
317 | "map": "121.357068,24.312132", | ||
318 | |||
319 | "boxId": "975" | ||
320 | |||
321 | } | ||
322 | |||
323 | ] | ||
324 | |||
325 | } | ||
326 | |||
327 | ] | ||
328 | |||
329 | } | ||
330 | |||
331 | } | ||
332 | |||
333 | (% style="text-align:center" %) | ||
334 | [[image:V-BOX HTTP manual_html_5999b14ed63e8065.png||height="348" width="600" class="img-thumbnail"]] | ||
335 | |||
336 | == **Real-time group list** == | ||
337 | |||
338 | **{{id name="_Toc24963736"/}} Parameters** | ||
339 | |||
340 | (% class="table-bordered" %) | ||
341 | |**acturl**|(% colspan="3" %)we-data/realgroups | ||
342 | |**Functions**|(% colspan="3" %)Get V-BOX’s tags group list | ||
343 | |(% rowspan="2" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
344 | |boxId|(% colspan="2" %)VBoxID ("None" means custom grouping) | ||
345 | |(% rowspan="4" %)**Return value**|Field name|(% colspan="2" %)Description | ||
346 | |(% rowspan="3" %)list|(% colspan="2" %)Group list | ||
347 | |groupId|Group ID | ||
348 | |groupName|Group name | ||
349 | |||
350 | **Operating procedures** | ||
351 | |||
352 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realgroups>>url:http://api.v-box.net/box-data/api/we-data/realgroups]] | ||
353 | |||
354 | (% style="text-align:center" %) | ||
355 | [[image:V-BOX HTTP manual_html_abb2159981171c6.png||height="46" width="700" class="img-thumbnail"]] | ||
356 | |||
357 | **Step2: **Set parameters on Params | ||
358 | |||
359 | "boxId": "973" | ||
360 | |||
361 | (% style="text-align:center" %) | ||
362 | [[image:V-BOX HTTP manual_html_5c3ab35ebdab144e.png||height="151" width="800" class="img-thumbnail"]] | ||
363 | |||
364 | **Step3: **Get sign | ||
365 | |||
366 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
367 | |||
368 | MD5 value: 9b267b7549083167954b7ede30916ff5 | ||
369 | |||
370 | **Step4: **Set common of header | ||
371 | |||
372 | {"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"} | ||
373 | |||
374 | (% style="text-align:center" %) | ||
375 | [[image:V-BOX HTTP manual_html_cc06cac462c1b77a.png||height="172" width="800" class="img-thumbnail"]] | ||
376 | |||
377 | **Result** | ||
378 | |||
379 | { | ||
380 | |||
381 | "code": 200, | ||
382 | |||
383 | "msg": "ok", | ||
384 | |||
385 | "reqId": "1573901906667", | ||
386 | |||
387 | "result": { | ||
388 | |||
389 | "list": [ | ||
390 | |||
391 | { | ||
392 | |||
393 | "groupName": "Temperature", | ||
394 | |||
395 | "groupId": 7325 | ||
396 | |||
397 | }, | ||
398 | |||
399 | { | ||
400 | |||
401 | "groupName": "Humidity", | ||
402 | |||
403 | "groupId": 7326 | ||
404 | |||
405 | }, | ||
406 | |||
407 | { | ||
408 | |||
409 | "groupName": "Button switch", | ||
410 | |||
411 | "groupId": 7327 | ||
412 | |||
413 | } | ||
414 | |||
415 | ] | ||
416 | |||
417 | } | ||
418 | |||
419 | } | ||
420 | |||
421 | [[image:V-BOX HTTP manual_html_2445c358293d621.png||height="531" width="532"]] | ||
422 | |||
423 | == **Real-time tags configuration list** == | ||
424 | |||
425 | **Parameters** | ||
426 | |||
427 | (% class="table-bordered" %) | ||
428 | |**acturl**|(% colspan="3" %)we-data/realcfgs | ||
429 | |**Functions**|(% colspan="3" %)Get the tags configuration information in the specified group in V-BOX. | ||
430 | |(% colspan="1" rowspan="6" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
431 | |boxId|(% colspan="2" %)VBoxID(“None” means custom tags grouping) | ||
432 | |groupId|(% colspan="2" %)Group ID (Required) | ||
433 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
434 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
435 | |devType|(% colspan="2" %)Device type (0:Box, 1:HMI) | ||
436 | |(% rowspan="15" %)**Return value**|Field name|(% colspan="2" %)Description | ||
437 | |(% rowspan="11" %)cfgList|monitorId|Tags ID | ||
438 | |monitorName|Tags name | ||
439 | |updTime|Last update time | ||
440 | |dataId|((( | ||
441 | type of data | ||
442 | |||
443 | 100: 16-bit binary | ||
444 | |||
445 | 101: 16-digit octal | ||
446 | |||
447 | Refer to Appendix 1 | ||
448 | ))) | ||
449 | |addr|Address | ||
450 | |addrType|((( | ||
451 | 0: bit address | ||
452 | |||
453 | 1: byte address | ||
454 | |||
455 | 2: word address | ||
456 | |||
457 | 3: double word | ||
458 | ))) | ||
459 | |digitCount|Integer digits, decimal places | ||
460 | |digitBinary|Data type and integer digits, decimal places | ||
461 | |dataLimit|Data range | ||
462 | |rid|Address | ||
463 | |roleType|Permission: 1-read only, 2-write only, 3-read-write | ||
464 | |totalPage|(% colspan="2" %)Total pages | ||
465 | |totalRecord|(% colspan="2" %)Total record number | ||
466 | |currentPage|(% colspan="2" %)Current page number | ||
467 | |||
468 | **Operating procedures** | ||
469 | |||
470 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realcfgs>>url:http://api.v-box.net/box-data/api/we-data/realcfgs]] | ||
471 | |||
472 | (% style="text-align:center" %) | ||
473 | [[image:V-BOX HTTP manual_html_3fff373ae27e2e00.png||height="44" width="700" class="img-thumbnail"]] | ||
474 | |||
475 | **Step2: **Set parameters on Params | ||
476 | |||
477 | "boxId":"973" | ||
478 | |||
479 | "groupId":"7325" | ||
480 | |||
481 | "devType":"0" | ||
482 | |||
483 | "pageSize":"5" | ||
484 | |||
485 | "pageIndex":"2" | ||
486 | |||
487 | (% style="text-align:center" %) | ||
488 | [[image:1751263596452-675.png||height="222" width="555"]] | ||
489 | |||
490 | **Step3:** Get sign | ||
491 | |||
492 | boxId=763&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=0&groupId=211608&pageIndex=1&pageSize=5&sid=0e583b1f48cf467bbf738365b3da1a26&ts=1751263335125&key=f1cd9351930d4e589922edbcf3b09a7c | ||
493 | |||
494 | MD5 sign: 27a89c93a4990d0497a8bd47dea4aed3 | ||
495 | |||
496 | **Step4:** Set common of header | ||
497 | |||
498 | {"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"27a89c93a4990d0497a8bd47dea4aed3","comid":"128","sid":"0e583b1f48cf467bbf738365b3da1a26","ts":1751263335125} | ||
499 | |||
500 | (% style="text-align:center" %) | ||
501 | [[image:1751263680622-643.png]] | ||
502 | |||
503 | **Result** | ||
504 | |||
505 | { | ||
506 | |||
507 | "code": 200, | ||
508 | |||
509 | "msg": "ok", | ||
510 | |||
511 | "reqId": "1751263500705", | ||
512 | |||
513 | "result": { | ||
514 | |||
515 | "cfgList": [ | ||
516 | |||
517 | { | ||
518 | |||
519 | "monitorId": 2276374, | ||
520 | |||
521 | "monitorName": "x0", | ||
522 | |||
523 | "digitBinary": "", | ||
524 | |||
525 | "float_point": -1, | ||
526 | |||
527 | "rid": "X", | ||
528 | |||
529 | "roleType": 1, | ||
530 | |||
531 | "string_point": -1, | ||
532 | |||
533 | "dataId": 105, | ||
534 | |||
535 | "addr_stat_no": -1, | ||
536 | |||
537 | "updTime": 1745481123000, | ||
538 | |||
539 | "dataLimit": "0 1", | ||
540 | |||
541 | "addr": "0", | ||
542 | |||
543 | "digitCount": "", | ||
544 | |||
545 | "boxId": 763, | ||
546 | |||
547 | "addrType": 0 | ||
548 | |||
549 | }, | ||
550 | |||
551 | { | ||
552 | |||
553 | "monitorId": 2276373, | ||
554 | |||
555 | "monitorName": "y0", | ||
556 | |||
557 | "digitBinary": "", | ||
558 | |||
559 | "float_point": -1, | ||
560 | |||
561 | "rid": "Y", | ||
562 | |||
563 | "roleType": 3, | ||
564 | |||
565 | "string_point": -1, | ||
566 | |||
567 | "dataId": 105, | ||
568 | |||
569 | "addr_stat_no": -1, | ||
570 | |||
571 | "updTime": 1745480354000, | ||
572 | |||
573 | "dataLimit": "0 1", | ||
574 | |||
575 | "addr": "0", | ||
576 | |||
577 | "digitCount": "", | ||
578 | |||
579 | "boxId": 763, | ||
580 | |||
581 | "addrType": 0 | ||
582 | |||
583 | }, | ||
584 | |||
585 | { | ||
586 | |||
587 | "monitorId": 2276367, | ||
588 | |||
589 | "monitorName": "okg", | ||
590 | |||
591 | "digitBinary": "", | ||
592 | |||
593 | "float_point": 1, | ||
594 | |||
595 | "rid": "HDW", | ||
596 | |||
597 | "roleType": 3, | ||
598 | |||
599 | "string_point": -1, | ||
600 | |||
601 | "dataId": 105, | ||
602 | |||
603 | "addr_stat_no": -1, | ||
604 | |||
605 | "updTime": 1745475213000, | ||
606 | |||
607 | "dataLimit": "0 299999", | ||
608 | |||
609 | "addr": "10", | ||
610 | |||
611 | "digitCount": "5,0", | ||
612 | |||
613 | "boxId": 763, | ||
614 | |||
615 | "addrType": 2 | ||
616 | |||
617 | }, | ||
618 | |||
619 | { | ||
620 | |||
621 | "monitorId": 2276366, | ||
622 | |||
623 | "monitorName": "hjdfh", | ||
624 | |||
625 | "digitBinary": "", | ||
626 | |||
627 | "float_point": -1, | ||
628 | |||
629 | "rid": "HDX", | ||
630 | |||
631 | "roleType": 3, | ||
632 | |||
633 | "string_point": -1, | ||
634 | |||
635 | "dataId": 105, | ||
636 | |||
637 | "addr_stat_no": -1, | ||
638 | |||
639 | "updTime": 1745475139000, | ||
640 | |||
641 | "dataLimit": "0 299999,0 15", | ||
642 | |||
643 | "addr": "0,0", | ||
644 | |||
645 | "digitCount": "", | ||
646 | |||
647 | "boxId": 763, | ||
648 | |||
649 | "addrType": 0 | ||
650 | |||
651 | } | ||
652 | |||
653 | ], | ||
654 | |||
655 | "totalPage": 1, | ||
656 | |||
657 | "totalRecord": 4, | ||
658 | |||
659 | "currentPage": 1 | ||
660 | |||
661 | } | ||
662 | |||
663 | } | ||
664 | |||
665 | (% style="text-align:center" %) | ||
666 | [[image:1751263773173-191.png]] | ||
667 | |||
668 | == **Tags data list** == | ||
669 | |||
670 | {{warning}} | ||
671 | This API is not for getting the real-time data all the time.If you need to get the continuously updated real-time monitoring point data values,you need to use **[[Send switch to device>>https://docs.we-con.com.cn/bin/view/V-BOX/V-Net/Manual/6%20HTTP%20API/#HSendswitchtodevice]] **API with this API | ||
672 | {{/warning}} | ||
673 | |||
674 | **~ {{id name="_Toc24963744"/}}Parameters** | ||
675 | |||
676 | (% class="table-bordered" %) | ||
677 | |**acturl**|(% colspan="3" %)we-data/realdata | ||
678 | |**Functions**|(% colspan="3" %)Get the tags data in the specified group in V-BOX. | ||
679 | |(% colspan="1" rowspan="6" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
680 | |boxId|(% colspan="2" %)VBoxID(“None” means custom tag grouping) | ||
681 | |groupId|(% colspan="2" %)Group ID (Required) | ||
682 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
683 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
684 | |devType|(% colspan="2" %)Device type (0:Box, 1:HMI) | ||
685 | |(% rowspan="11" %)**Return value**|Field name|(% colspan="2" %)Description | ||
686 | |(% rowspan="7" %)List|(% colspan="2" %)Real-time data list | ||
687 | |com|Communication port ID | ||
688 | |monitorId|Tag ID | ||
689 | |monitorName|Tag name | ||
690 | |state|status | ||
691 | |value|Value | ||
692 | |groupId|Group ID | ||
693 | |totalPage|(% colspan="2" %)Total pages | ||
694 | |totalRecord|(% colspan="2" %)Total record | ||
695 | |currentPage|(% colspan="2" %)current page | ||
696 | |||
697 | **~ {{id name="_Toc24963745"/}}Operating procedures** | ||
698 | |||
699 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/realdata>>url:http://api.v-box.net/box-data/api/we-data/realdata]] | ||
700 | |||
701 | (% style="text-align:center" %) | ||
702 | [[image:V-BOX HTTP manual_html_839fb0577dac88c1.png||height="45" width="700" class="img-thumbnail"]] | ||
703 | |||
704 | **Step2: **Set parameters on Params | ||
705 | |||
706 | "boxId":"973" | ||
707 | |||
708 | "devType":"0" | ||
709 | |||
710 | "groupId":"7325" | ||
711 | |||
712 | "pageSize":"5" | ||
713 | |||
714 | "pageIndex":"2" | ||
715 | |||
716 | (% style="text-align:center" %) | ||
717 | [[image:1751264089450-269.png||height="221" width="607"]] | ||
718 | |||
719 | **Step3:** Get sign | ||
720 | |||
721 | boxId=763&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=0&groupId=211608&pageIndex=1&pageSize=5&sid=0e583b1f48cf467bbf738365b3da1a26&ts=1751263921050&key=f1cd9351930d4e589922edbcf3b09a7c | ||
722 | |||
723 | MD5 sign: 19191b155e92f800f4db086bf06f8367 | ||
724 | |||
725 | {"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"19191b155e92f800f4db086bf06f8367","comid":"128","sid":"0e583b1f48cf467bbf738365b3da1a26","ts":1751263921050} | ||
726 | |||
727 | **~ {{id name="_Toc24963746"/}}Result** | ||
728 | |||
729 | { | ||
730 | |||
731 | "code": 200, | ||
732 | |||
733 | "msg": "ok", | ||
734 | |||
735 | "reqId": "1751264055206", | ||
736 | |||
737 | "result": { | ||
738 | |||
739 | "totalPage": 1, | ||
740 | |||
741 | "list": [ | ||
742 | |||
743 | { | ||
744 | |||
745 | "com": 0, | ||
746 | |||
747 | "string_point": -1, | ||
748 | |||
749 | "monitorId": 2276374, | ||
750 | |||
751 | "addr_stat_no": -1, | ||
752 | |||
753 | "actAuth": 1, | ||
754 | |||
755 | "monitorName": "x0", | ||
756 | |||
757 | "groupId": 211608, | ||
758 | |||
759 | "state": 0, | ||
760 | |||
761 | "float_point": -1, | ||
762 | |||
763 | "templateId": 0, | ||
764 | |||
765 | "value": "0", | ||
766 | |||
767 | "boxId": 763 | ||
768 | |||
769 | }, | ||
770 | |||
771 | { | ||
772 | |||
773 | "com": 0, | ||
774 | |||
775 | "string_point": -1, | ||
776 | |||
777 | "monitorId": 2276373, | ||
778 | |||
779 | "addr_stat_no": -1, | ||
780 | |||
781 | "actAuth": 3, | ||
782 | |||
783 | "monitorName": "y0", | ||
784 | |||
785 | "groupId": 211608, | ||
786 | |||
787 | "state": 0, | ||
788 | |||
789 | "float_point": -1, | ||
790 | |||
791 | "templateId": 0, | ||
792 | |||
793 | "value": "0", | ||
794 | |||
795 | "boxId": 763 | ||
796 | |||
797 | }, | ||
798 | |||
799 | { | ||
800 | |||
801 | "com": 0, | ||
802 | |||
803 | "string_point": -1, | ||
804 | |||
805 | "monitorId": 2276367, | ||
806 | |||
807 | "addr_stat_no": -1, | ||
808 | |||
809 | "actAuth": 3, | ||
810 | |||
811 | "monitorName": "okg", | ||
812 | |||
813 | "groupId": 211608, | ||
814 | |||
815 | "state": 0, | ||
816 | |||
817 | "float_point": 1, | ||
818 | |||
819 | "templateId": 0, | ||
820 | |||
821 | "value": "0", | ||
822 | |||
823 | "boxId": 763 | ||
824 | |||
825 | }, | ||
826 | |||
827 | { | ||
828 | |||
829 | "com": 0, | ||
830 | |||
831 | "string_point": -1, | ||
832 | |||
833 | "monitorId": 2276366, | ||
834 | |||
835 | "addr_stat_no": -1, | ||
836 | |||
837 | "actAuth": 3, | ||
838 | |||
839 | "monitorName": "hjdfh", | ||
840 | |||
841 | "groupId": 211608, | ||
842 | |||
843 | "state": 0, | ||
844 | |||
845 | "float_point": -1, | ||
846 | |||
847 | "templateId": 0, | ||
848 | |||
849 | "value": "0", | ||
850 | |||
851 | "boxId": 763 | ||
852 | |||
853 | } | ||
854 | |||
855 | ], | ||
856 | |||
857 | "totalRecord": 4, | ||
858 | |||
859 | "currentPage": 1 | ||
860 | |||
861 | } | ||
862 | |||
863 | } | ||
864 | |||
865 | (% style="text-align:center" %) | ||
866 | [[image:1751264191566-865.png]] | ||
867 | |||
868 | == **Modify tag data** == | ||
869 | |||
870 | ((( | ||
871 | **Parameters** | ||
872 | ))) | ||
873 | |||
874 | (% class="table-bordered" %) | ||
875 | |**acturl**|(% colspan="2" %)we-data/updrealdata | ||
876 | |**Functions**|(% colspan="2" %)Modify tag data | ||
877 | |(% rowspan="5" %)**Parameters**|Parameter|Description | ||
878 | |boxId|Box ID | ||
879 | |monitorId|Tag ID | ||
880 | |value|value | ||
881 | |devType|Device type (0:Box, 1:HMI) | ||
882 | |**Return value**|(% colspan="2" %)None | ||
883 | |||
884 | **Operating procedures** | ||
885 | |||
886 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/updrealdata>>url:http://api.v-box.net/box-data/api/we-data/updrealdata]] | ||
887 | |||
888 | (% style="text-align:center" %) | ||
889 | [[image:1651915094120-525.png||height="45" width="700" class="img-thumbnail"]] | ||
890 | |||
891 | **Step2:** Set parameters on Params | ||
892 | |||
893 | boxId:6397578 | ||
894 | monitorId:1001 | ||
895 | value:66 | ||
896 | devType:1 | ||
897 | |||
898 | (% style="text-align:center" %) | ||
899 | [[image:1746502882467-849.png]] | ||
900 | |||
901 | **Step3:** Get sign | ||
902 | |||
903 | boxId=6397578&comid=128&compvtkey=7e421dd30a394d74b7b9c079e67e272c&devType=1&monitorId=1001&sid=d8c98edd64da40289fef565c94924fe5&ts=171746501715435&value=66&key=f1cd9351930d4e589922edbcf3b09a7c | ||
904 | |||
905 | MD5 sign: 4802a362fde2ca5053ad79fe4d272200 | ||
906 | |||
907 | **Step4: **Set common of header | ||
908 | |||
909 | {"compvtkey":"7e421dd30a394d74b7b9c079e67e272c","sign":"4802a362fde2ca5053ad79fe4d272200","comid":"128","sid":"d8c98edd64da40289fef565c94924fe5","ts":171746501715435} | ||
910 | |||
911 | (% style="text-align:center" %) | ||
912 | [[image:1746503047845-902.png]] | ||
913 | |||
914 | **Result** | ||
915 | |||
916 | { | ||
917 | |||
918 | "code": 200, | ||
919 | |||
920 | "msg": "ok", | ||
921 | |||
922 | "reqId": "1573907138803", | ||
923 | |||
924 | "result": {} | ||
925 | |||
926 | } | ||
927 | |||
928 | (% style="text-align:center" %) | ||
929 | [[image:1746503002289-932.png]] | ||
930 | |||
931 | == **Historical tags name list** == | ||
932 | |||
933 | **Parameters** | ||
934 | |||
935 | (% class="table-bordered" %) | ||
936 | |**acturl**|(% colspan="3" %)we-data/monitors | ||
937 | |**Functions**|(% colspan="3" %)Get a list of historical tags | ||
938 | |(% rowspan="3" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
939 | |boxId|(% colspan="2" %)Box ID (Not required) | ||
940 | |devType|(% colspan="2" %)Device type (0:Box, 1:HMI) | ||
941 | |(% rowspan="4" %)**Return value**|Field name|(% colspan="2" %)Description | ||
942 | |(% rowspan="3" %)list|(% colspan="2" %)Tag list | ||
943 | |monitorId|tag ID | ||
944 | |monitorName|tag name | ||
945 | |||
946 | **Operating procedures** | ||
947 | |||
948 | **Step1: **Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/monitors>>url:http://api.v-box.net/box-data/api/we-data/monitors]] | ||
949 | |||
950 | (% style="text-align:center" %) | ||
951 | [[image:V-BOX HTTP manual_html_456f00c6af3ea1b7.png||height="45" width="700" class="img-thumbnail"]] | ||
952 | |||
953 | **Step2: **Set parameters on Params | ||
954 | |||
955 | "boxId":"973" | ||
956 | |||
957 | (% style="text-align:center" %) | ||
958 | [[image:V-BOX HTTP manual_html_8bf7c3f9b3ce3897.png||height="185" width="700" class="img-thumbnail"]] | ||
959 | |||
960 | **Step3:** Get sign | ||
961 | |||
962 | boxId=973&comid=2&compvtkey=589625dce895454dbff9782c299db156&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
963 | |||
964 | MD5 sign: 9b267b7549083167954b7ede30916ff5 | ||
965 | |||
966 | **Step4:** Set common of header | ||
967 | |||
968 | {"boxId":"973","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"9b267b7549083167954b7ede30916ff5"} | ||
969 | |||
970 | (% style="text-align:center" %) | ||
971 | [[image:V-BOX HTTP manual_html_dba52ac718eeb66e.png||height="228" width="700" class="img-thumbnail"]] | ||
972 | |||
973 | **Result** | ||
974 | |||
975 | { | ||
976 | |||
977 | "code": 200, | ||
978 | |||
979 | "msg": "ok", | ||
980 | |||
981 | "reqId": "1573907813693", | ||
982 | |||
983 | "result": { | ||
984 | |||
985 | "list": [ | ||
986 | |||
987 | { | ||
988 | |||
989 | "monitorId": 91576, | ||
990 | |||
991 | "monitorName": "Hum", | ||
992 | |||
993 | "groupId": 7328 | ||
994 | |||
995 | }, | ||
996 | |||
997 | { | ||
998 | |||
999 | "monitorId": 91577, | ||
1000 | |||
1001 | "monitorName": "Temp", | ||
1002 | |||
1003 | "groupId": 7328 | ||
1004 | |||
1005 | } | ||
1006 | |||
1007 | ] | ||
1008 | |||
1009 | } | ||
1010 | |||
1011 | } | ||
1012 | |||
1013 | (% style="text-align:center" %) | ||
1014 | [[image:V-BOX HTTP manual_html_2a739377a9fb10b2.png||height="400" width="700" class="img-thumbnail"]] | ||
1015 | |||
1016 | == **Historical tag data list** == | ||
1017 | |||
1018 | **~ {{id name="_Toc24963756"/}}Parameters** | ||
1019 | |||
1020 | (% class="table-bordered" %) | ||
1021 | |**acturl**|(% colspan="3" %)we-data/historydata | ||
1022 | |**Functions**|(% colspan="3" %)Get historical data | ||
1023 | |(% rowspan="6" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
1024 | |monitorId|(% colspan="2" %)tag ID, (Required) | ||
1025 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
1026 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
1027 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
1028 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
1029 | |(% rowspan="8" %)**Return value**|Field name|(% colspan="2" %)Description | ||
1030 | |(% rowspan="4" %)list|(% colspan="2" %)Historical data list | ||
1031 | |monitorName|tag name | ||
1032 | |monitorTime|Monitoring time | ||
1033 | |value|Value | ||
1034 | |totalPage|(% colspan="2" %)Total pages | ||
1035 | |totalRecord|(% colspan="2" %)Total records | ||
1036 | |currentPage|(% colspan="2" %)Current page | ||
1037 | |||
1038 | **Operating procedures** | ||
1039 | |||
1040 | **Step:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/historydata>>url:http://api.v-box.net/box-data/api/we-data/historydata]] | ||
1041 | |||
1042 | (% style="text-align:center" %) | ||
1043 | [[image:V-BOX HTTP manual_html_cd2fdea1493dc20e.png||height="47" width="700" class="img-thumbnail"]] | ||
1044 | |||
1045 | **Step2:** Set parameters on Params | ||
1046 | |||
1047 | "monitorId": 91577 | ||
1048 | |||
1049 | "monitorBeginTime":"2019-11-16 10:45:44.000" | ||
1050 | |||
1051 | "monitorEndTime":"2019-11-16 20:45:44.000" | ||
1052 | |||
1053 | "pageSize":"10" | ||
1054 | |||
1055 | "pageIndex":"2" | ||
1056 | |||
1057 | (% style="text-align:center" %) | ||
1058 | [[image:V-BOX HTTP manual_html_f169ff87c20ce6c4.png||height="302" width="700" class="img-thumbnail"]] | ||
1059 | |||
1060 | **Step3: **Get sign | ||
1061 | |||
1062 | comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 10:45:44.000&monitorEndTime=2019-11-16 20:45:44.000&monitorId=91577&pageIndex=2&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
1063 | |||
1064 | MD5 sign: feeae8ddb4014951cfc2c02de4744bc4 | ||
1065 | |||
1066 | **Step4:** Set common of header | ||
1067 | |||
1068 | {"monitorId":"91577","monitorBeginTime":"2019-11-16 10:45:44.000","monitorEndTime":"2019-11-16 20:45:44.000","pageSize":"10","pageIndex":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"feeae8ddb4014951cfc2c02de4744bc4"} | ||
1069 | |||
1070 | (% style="text-align:center" %) | ||
1071 | [[image:V-BOX HTTP manual_html_fac48b1179b555ee.png||height="291" width="700" class="img-thumbnail"]] | ||
1072 | |||
1073 | **Result** | ||
1074 | |||
1075 | { | ||
1076 | |||
1077 | "code": 200, | ||
1078 | |||
1079 | "msg": "ok", | ||
1080 | |||
1081 | "reqId": "1573909705772", | ||
1082 | |||
1083 | "result": { | ||
1084 | |||
1085 | "totalPage": 12, | ||
1086 | |||
1087 | "list": [ | ||
1088 | |||
1089 | { | ||
1090 | |||
1091 | "monitorTime": 1573905337000, | ||
1092 | |||
1093 | "groupName": "His", | ||
1094 | |||
1095 | "monitorTime_show": "2019-11-16 19:55:37.000", | ||
1096 | |||
1097 | "monitorName": "Temp", | ||
1098 | |||
1099 | "groupId": 7328, | ||
1100 | |||
1101 | "value": "914" | ||
1102 | |||
1103 | }, | ||
1104 | |||
1105 | …………… | ||
1106 | |||
1107 | { | ||
1108 | |||
1109 | "monitorTime": 1573902637000, | ||
1110 | |||
1111 | "groupName": "His", | ||
1112 | |||
1113 | "monitorTime_show": "2019-11-16 19:10:37.000", | ||
1114 | |||
1115 | "monitorName": "Temp", | ||
1116 | |||
1117 | "groupId": 7328, | ||
1118 | |||
1119 | "value": "422" | ||
1120 | |||
1121 | } | ||
1122 | |||
1123 | ], | ||
1124 | |||
1125 | "totalRecord": 120, | ||
1126 | |||
1127 | "currentPage": 2 | ||
1128 | |||
1129 | } | ||
1130 | |||
1131 | } | ||
1132 | |||
1133 | (% style="text-align:center" %) | ||
1134 | [[image:V-BOX HTTP manual_html_f3b62eb69687a214.png||height="476" width="700" class="img-thumbnail"]] | ||
1135 | |||
1136 | == **Alarm tags data list** == | ||
1137 | |||
1138 | **{{id name="_Toc24963760"/}}Parameters** | ||
1139 | |||
1140 | (% class="table-bordered" %) | ||
1141 | |**acturl**|(% colspan="3" %)we-data/alarmdata | ||
1142 | |**Function**|(% colspan="3" %)Get alarm data | ||
1143 | |(% rowspan="10" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
1144 | |boxId|(% colspan="2" %)VBoxID, (Required) | ||
1145 | |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required) | ||
1146 | |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required) | ||
1147 | |pageSize|(% colspan="2" %)Number of each page, 10 by default | ||
1148 | |pageIndex|(% colspan="2" %)Number of current page, start from 1 | ||
1149 | |state|(% colspan="2" %)Status 1-unconfirmed, 2-confirm | ||
1150 | |alarmType|(% colspan="2" %)Alarm events: 1-trigger alarm, 0-disarm (Not necessary) | ||
1151 | |alarmLevel|(% colspan="2" %)((( | ||
1152 | Alarm level: 1 general alarm, | ||
1153 | |||
1154 | 2 serious alarm, | ||
1155 | |||
1156 | 3 particularly serious alarm | ||
1157 | |||
1158 | (Not necessary) | ||
1159 | ))) | ||
1160 | |devType|(% colspan="2" %)Device type (0:Box, 1:HMI) | ||
1161 | |(% rowspan="12" %)**Return value**|Field name|(% colspan="2" %)Description | ||
1162 | |(% rowspan="8" %)List|(% colspan="2" %)Alarm data list | ||
1163 | |monitorId|tag ID | ||
1164 | |monitorName|tag name | ||
1165 | |state|status | ||
1166 | |value|Value | ||
1167 | |monitorTime|Monitoring time | ||
1168 | |alarmType|Alarm event | ||
1169 | |alarmLevel|Alarm level | ||
1170 | |totalPage|(% colspan="2" %)Total pages | ||
1171 | |totalRecord|(% colspan="2" %)Total records | ||
1172 | |currentPage|(% colspan="2" %)Current page | ||
1173 | |||
1174 | **~ {{id name="_Toc24963761"/}}Operating procedures** | ||
1175 | |||
1176 | **Step1:** Set http: [[http:~~/~~/api.v-box.net/box-data/api/we-data/alarmdata>>url:http://api.v-box.net/box-data/api/we-data/alarmdata]] | ||
1177 | |||
1178 | (% style="text-align:center" %) | ||
1179 | [[image:V-BOX HTTP manual_html_4ebee4d4fcf0097c.png||height="45" width="700" class="img-thumbnail"]] | ||
1180 | |||
1181 | **Step2:** Set parameters on Params | ||
1182 | |||
1183 | "monitorId":"91931" | ||
1184 | |||
1185 | "monitorBeginTime":"2019-11-16 20:30:44.000" | ||
1186 | |||
1187 | "monitorEndTime":"2019-11-16 21:30:44.000" | ||
1188 | |||
1189 | "pageSize":"10" | ||
1190 | |||
1191 | "pageIndex":"1" | ||
1192 | |||
1193 | "state":"2" | ||
1194 | |||
1195 | (% style="text-align:center" %) | ||
1196 | [[image:V-BOX HTTP manual_html_2361d0eaa7447a9c.png||height="327" width="700" class="img-thumbnail"]] | ||
1197 | |||
1198 | **Step3:** Get sign | ||
1199 | |||
1200 | comid=2&compvtkey=589625dce895454dbff9782c299db156&monitorBeginTime=2019-11-16 20:30:44.000&monitorEndTime=2019-11-16 21:30:44.000&monitorId=91931&pageIndex=1&pageSize=10&sid=2d7bfd344aa64d8ebc9beea0e4dad8ad&state=2&ts=1573897380&key=f1cd9351930d4e589922edbcf3b09a7c | ||
1201 | |||
1202 | MD5 sign: 4056006bbc71bd80a3c632987626e15b | ||
1203 | |||
1204 | **Step4: **Set common of header | ||
1205 | |||
1206 | {"monitorId":"91931","monitorBeginTime":"2019-11-16 20:30:44.000","monitorEndTime":"2019-11-16 21:30:44.000","pageSize":"10","pageIndex":"1","state":"2","sid":"2d7bfd344aa64d8ebc9beea0e4dad8ad","comid":"2","compvtkey":"589625dce895454dbff9782c299db156","ts":"1573897380","sign":"4056006bbc71bd80a3c632987626e15b"} | ||
1207 | |||
1208 | (% style="text-align:center" %) | ||
1209 | [[image:V-BOX HTTP manual_html_cd9ce84648b86cb9.png||height="269" width="700" class="img-thumbnail"]] | ||
1210 | |||
1211 | **Result** | ||
1212 | |||
1213 | { | ||
1214 | |||
1215 | "code": 200, | ||
1216 | |||
1217 | "msg": "ok", | ||
1218 | |||
1219 | "reqId": "1573911745258", | ||
1220 | |||
1221 | "result": { | ||
1222 | |||
1223 | "totalPage": 1, | ||
1224 | |||
1225 | "list": [ | ||
1226 | |||
1227 | { | ||
1228 | |||
1229 | "monitorTime": 1573910934000, | ||
1230 | |||
1231 | "alarmType": 0, | ||
1232 | |||
1233 | "monitorId": 4437, | ||
1234 | |||
1235 | "monitorTime_show": "2019-11-16 21:28:54", | ||
1236 | |||
1237 | "monitorName": "Temperature alarm", | ||
1238 | |||
1239 | "alarmLevel": 2, | ||
1240 | |||
1241 | "state": 2, | ||
1242 | |||
1243 | "text": "The temperature is too high", | ||
1244 | |||
1245 | "value": "1", | ||
1246 | |||
1247 | "alarm_role": 0 | ||
1248 | |||
1249 | }, | ||
1250 | |||
1251 | ………… | ||
1252 | |||
1253 | { | ||
1254 | |||
1255 | "monitorTime": 1573910855000, | ||
1256 | |||
1257 | "alarmType": 1, | ||
1258 | |||
1259 | "monitorId": 4437, | ||
1260 | |||
1261 | "monitorTime_show": "2019-11-16 21:27:35", | ||
1262 | |||
1263 | "monitorName": "Temperature alarm", | ||
1264 | |||
1265 | "alarmLevel": 2, | ||
1266 | |||
1267 | "state": 2, | ||
1268 | |||
1269 | "text": "The temperature is too high", | ||
1270 | |||
1271 | "value": "18", | ||
1272 | |||
1273 | "alarm_role": 0 | ||
1274 | |||
1275 | } | ||
1276 | |||
1277 | ], | ||
1278 | |||
1279 | "totalRecord": 6, | ||
1280 | |||
1281 | "currentPage": 1 | ||
1282 | |||
1283 | } | ||
1284 | |||
1285 | } | ||
1286 | |||
1287 | (% style="text-align:center" %) | ||
1288 | [[image:V-BOX HTTP manual_html_d4a3e0114c402c27.png||height="475" width="700" class="img-thumbnail"]] | ||
1289 | |||
1290 | == **Get device state** == | ||
1291 | |||
1292 | **~ {{id name="_Toc24963760"/}}Parameters** | ||
1293 | |||
1294 | (% class="table-bordered" %) | ||
1295 | |**acturl**|(% colspan="3" %)we-data/getDeviceState | ||
1296 | |**Function**|(% colspan="3" %)Get vbox state based on machine code | ||
1297 | |(% colspan="1" rowspan="2" %)**Parameters**|Parameter|(% colspan="2" %)Description | ||
1298 | |machineCode|(% colspan="2" %)machineCode(required) | ||
1299 | |(% rowspan="2" %)**Return value**|Field name|(% colspan="2" %)Description | ||
1300 | |state|(% colspan="2" %)vbox state: 1-online, 0-offline | ||
1301 | |||
1302 | == **Send switch to device** == | ||
1303 | |||
1304 | **3.10.1 {{id name="_Toc24963760"/}}Parameters** | ||
1305 | |||
1306 | (% class="table-bordered" %) | ||
1307 | |(% style="width:102px" %)**acturl**|(% colspan="3" style="width:1059px" %)we-data/sendSwitchToDevice | ||
1308 | |(% style="width:102px" %)**Function**|(% colspan="3" style="width:1059px" %)Enable vbox reports real-time data, because now the vbox has added a real-time data switch function, only in the real-time data page vbox will report real-time data, otherwise it will not be reported. So if you need to keep to get real-time data, you need to call this interface first, and call it every 20 seconds, so that the vbox will continue to report real-time data. | ||
1309 | |(% colspan="1" rowspan="2" style="width:102px" %)**Parameters**|(% style="width:450px" %)Parameter|(% colspan="2" %)Description | ||
1310 | |(% style="width:450px" %)boxId|(% colspan="2" %)boxId(required) | ||
1311 | |(% rowspan="1" style="width:102px" %)**Return value**|(% style="width:450px" %)Field name|(% colspan="2" %)Description | ||
1312 | |||
1313 | = **Appendix** = | ||
1314 | |||
1315 | == (% style="color:inherit; font-family:inherit; font-size:26px" %)**Data type**(%%) == | ||
1316 | |||
1317 | 100: 16-bit binary | ||
1318 | |||
1319 | 101: 16-bit octal | ||
1320 | |||
1321 | 102: 16-bit hexadecimal | ||
1322 | |||
1323 | 103: 16-bit BCD code | ||
1324 | |||
1325 | 104: 16-bit signed decimal | ||
1326 | |||
1327 | 105: 16-bit unsigned decimal | ||
1328 | |||
1329 | 200: 32-bit binary | ||
1330 | |||
1331 | 201: 32-bit octal | ||
1332 | |||
1333 | 202: 32-bit hexadecimal | ||
1334 | |||
1335 | 203: 32-bit BCD | ||
1336 | |||
1337 | 204: 32-bit signed decimal | ||
1338 | |||
1339 | 205: 32-bit unsigned decimal | ||
1340 | |||
1341 | 206: 32-bit floating | ||
1342 | |||
1343 | 400: 64-bit binary | ||
1344 | |||
1345 | 401: 64-bit octal | ||
1346 | |||
1347 | 402: 64-bit hexadecimal | ||
1348 | |||
1349 | 403: 64-bit BCD | ||
1350 | |||
1351 | 404: 64-bit signed decimal | ||
1352 | |||
1353 | 405: 64-bit unsigned decimal | ||
1354 | |||
1355 | 406: 64-bit floating | ||
1356 | |||
1357 | 1000: string | ||
1358 | |||
1359 | |||
1360 | |||
1361 | |||
1362 | |||
1363 | |||
1364 | |||
1365 | |||
1366 | |||
1367 | Version: V1.1.0 | ||
1368 | |||
1369 | Date: Nov 2019 |