Wiki source code of HTTPS API

Version 9.1 by Devin Chen on 2026/03/19 09:44

Show last authors
1 {{warning}}
2 Important Notice:
3
4
5 This standard defines Wecon's proprietary access protocol. Third-party API integration requires explicit authorization through our V-net V2.0 platform, with all API access strictly monitored and regulated. Wecon reserves all rights to interpret and modify these specifications without prior notice.
6 \\To prevent API abuse,this feature will not be enabled by default for all users. **Access requires submitting an application**, with a monthly free quota of 10,000 times.The free quota will be restored on the 1st of the following month.**(This limitation is only for Wecon API motioned by in this manual)**
7 {{/warning}}
8
9 = 1.Third-party account =
10
11 On the V-NET 2.0 platform, API functions require integration with third-party accounts.
12
13 == 1.1 Create a third-party account ==
14
15 Please refer to the link below to create a third-party account
16
17 [[How to create a third-party account for V-net API>>doc:V-BOX.FAQ.How to create a third-party account for V-net API]]
18
19 == 1.2 Assign device to third-party account ==
20
21 1.choose the third-party account
22
23 (% style="text-align:center" %)
24 [[image:bu3lT1iyiV.png||height="601" width="1200"]]
25
26 2.select a device to bind
27
28 (% style="text-align:center" %)
29 [[image:v1U3oIZDMH.png||height="880" width="1200"]]
30
31 3.Binded successfully
32
33 (% style="text-align:center" %)
34 [[image:1752032411880-592.png||height="820" width="1200"]]
35
36 = 2.Operational process =
37
38 == 2.1 Basic information ==
39
40 * (((
41 **Request url**:
42 Asean: https:~/~/api.asean.v-iec.com/m16/{acturl}
43
44 EU: https:~/~/api.eu.v-box.net/m16/{acturl}
45 )))
46 * (((
47 **Protocol: **https
48 )))
49 * (((
50 **Interface Parameter Description:**
51 )))
52
53 Global Parameters (HTTP Headers)
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 |=**Parameter**|=**Description**
58 |sid|session ID (Obtained after login, and is used for all acturls after login)
59 |ts|Millisecond-level timestamp;( e.g. ,1750818494344)
60 |sign|(((
61 How to get sign:
62
63 Concatenate all parameters, including the header parameters above and the individual business parameters of each interface, in the format **key=value**, separated by & symbols. For example, for the login interface, the concatenated result would be:
64 **alias=test&cuid=123456789&password=dc6e6a331dc2b23420d99c53a0d4962e&pid=1&sv=1.0&mt=255&ts=1595381946008&lan=zh&sign=sign**
65
66 Here, alias and password are the business parameters specific to the login interface, while the others are header parameters (**Note**: The sid parameter is excluded for the login interface but must be included for other interfaces).
67
68 1. **Sort all parameters alphabetically**:
69 1*. Order by the first letter; if the first letters are identical, proceed to the second letter, and so on.
70 1. **Append the fixed parameter key=5cee621329f24e5cbdc43daa959ce9a1 at the end**:
71 1*. This parameter is mandatory for all interfaces and must always be placed last.
72
73 Finally, calculate the MD5 hash of the concatenated string to generate the sign
74 )))
75
76 The final header parameters are as follows (Note: The login interface does not require 'sid', while other interfaces must include 'sid'. The value of 'ts' must be identical to the 'ts' used in the above sign calculation):
77
78 wcommon:{"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"XXX","pid":"1","ts":1742612007058}
79
80 **Return the result in JSON format, case-sensitive, for example:**
81
82 1) Client error responses
83
84 {{code language="none"}}
85 {"code" : 403, "msg" : "session timeout", "reqId":"1502074141465", "result":{}}
86 {{/code}}
87
88 2) Successful responses
89
90 {{code language="none"}}
91 {"code" : 200 , "result": {}, "msg" : "ok", "reqId":"1502074141465"}
92 {{/code}}
93
94 **HTTP response status codes**
95
96 |=**Status codes**|=**Description**
97 |(% style="text-align:center" %)200|(% style="text-align:center" %)The request succeeded
98 |(% style="text-align:center" %)400|(% style="text-align:center" %)Bad Request
99 |(% style="text-align:center" %)403|(% style="text-align:center" %)Forbidden (invalid Session ID)
100 |(% style="text-align:center" %)503|(% style="text-align:center" %)Bad Request
101
102 == 2.2 Recommended tools ==
103
104 1) [[Current Millis>>https://currentmillis.com/]] - Provides the current time in milliseconds elapsed since the UNIX epoch (Jan 1, 1970) as well as in other common formats including local / UTC time
105
106 (% style="text-align:center" %)
107 [[image:1750850646536-560.png]]
108
109 2) [[MD5 Encryption>>https://10015.io/tools/md5-encrypt-decrypt]] - Online tool for generating MD5 hashes from strings
110
111 (% style="text-align:center" %)
112 [[image:1750850693417-516.png]]
113
114 = 3.Third-party API invocation Method =
115
116 **Example parameter and value**
117
118 alias:3af2a002690b4becbd3d4fbced0d2df3
119
120 password:87845c1edaa92c4b24b64b65bb5fd2bb
121
122 ts:1750818494344
123
124 == 3.1 Login operation ==
125
126 (% style="margin-left:auto; margin-right:auto; width:800px" %)
127 |**acturl**|(% colspan="2" rowspan="1" %)we-data/sign/login
128 |**Function**|(% colspan="2" rowspan="1" %)Use username to login
129 |(% colspan="1" rowspan="4" %)**Parameters**|**Items**|**Description**
130 |alias|Username
131 |password|32-bit password (MD5 encryption)
132 |isRemember|0(Optional)
133 |(% colspan="1" rowspan="5" %)**Return value**|**Items**|**Description**
134 |utype|User Type:
135 |sid|User session ID (Only available for 12 hours)
136 |ztRole|(((
137 Cloud SCADA permissions:
138
139 1 - Has permission, 0 - No permission
140 )))
141 |userName|user name
142 |**Example**|(% colspan="2" rowspan="1" %)(((
143 {
144
145 "utype":5,
146
147 "ztRole":1,
148
149 "userName":"0edc4188a48f4bdcb7e89d35c6e7986f",
150
151 "sid":"c253a6a9635646a98bb46fba22411568"
152
153 }
154 )))
155
156 **Operating procedures**
157
158 **Setp1: ** Set URL: https:~/~/api.asean.v-iec.com/m16/we-data/sign/login
159
160 **Setp2: ** Set parameters on Params
161
162 alias: 3af2a002690b4becbd3d4fbced0d2df3
163
164 password: 9fa4250f6d70b341199f6dace528120f(The md5 encryption result of 87845c1edaa92c4b24b64b65bb5fd2bb)
165
166 (% style="text-align:center" %)
167 [[image:1750852260814-901.png]]
168
169 **Step3:**  Get sign
170
171 alias=3af2a002690b4becbd3d4fbced0d2df3&cuid=123456789&lan=zh&mt=255&password=9fa4250f6d70b341199f6dace528120f&pid=1&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
172
173 Put the whole string above encrypted by MD5, so will get the value of "sign"
174
175 "sign":"d3071131ae5c7ab032fca3c623101e89"
176
177 **Step4: ** Set wcommon of header
178
179 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d3071131ae5c7ab032fca3c623101e89","pid":"1","ts":1750818494344}
180
181 (% style="text-align:center" %)
182 [[image:1750852478079-903.png]]
183
184 **Result**
185
186 (% style="text-align:center" %)
187 [[image:1750852594291-467.png]]
188
189 Now, we got the sid for other API invocation
190
191 == 3.2 Get the device list ==
192
193 (% style="margin-left:auto; margin-right:auto; width:800px" %)
194 |**acturl**|(% colspan="2" %)we-data/device/getList
195 |**Function**|(% colspan="2" rowspan="1" %)Get the device list
196 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|**Description**
197 | |
198 |(% colspan="1" rowspan="3" %)**Return value**|**Item**|**Description**
199 |boxList|Devices supporting WVPN
200 |list|Device List
201 |**Example**|(% colspan="2" rowspan="1" %){
202 "reqId": "1667285652454",
203 "code": 200,
204 "msg": "ok",
205 "result": {
206 "boxList": [
207 {
208 "code": "U370H1220307220W0001c75b693b2955",
209 "lev_name": "Group",
210 "name": "name1",
211 "f_name": " Group ",
212 "model": "PI3070ig",
213 "boxType": 1,
214 "id": 444860,
215 "state": 1,
216 "f_id": 226038,
217 "type": "1",
218 "lev_id": "226038",
219 "create_date": 1653985793000
220 },
221 {
222 "code": "V02001211222999a2d12c52a355",
223 "lev_name": "Default group",
224 "name": " V-BOX ",
225 "f_name": "Default group",
226 "model": "V-BOX S-4G",
227 "boxType": 0,
228 "id": 444848,
229 "state": 0,
230 "f_id": 225922,
231 "type": "1",
232 "lev_id": "225922",
233 "create_date": 1652378606000
234 }
235 ],
236 "list": [
237 {
238 "all": 3,
239 "offline": 0,
240 "lev_name": " group",
241 "children": [
242 {
243 "all": 0,
244 "offline": 0,
245 "lev_name": " group 1, group ",
246 "children": [],
247 "name": " group 1",
248 "f_name": " group ",
249 "online": 0,
250 "id": 225986,
251 "f_id": 226038,
252 "type": "0",
253 "lev_id": "225986,226038",
254 "create_date": 1657010779000
255 },
256 {
257 "code": "U370H1220307220W0001c75b693b2955",
258 "lev_name": "group",
259 "name": "aaaaa",
260 "f_name": " group ",
261 "model": "PI3070ig",
262 "boxType": 1,
263 "id": 444860,
264 "state": 1,
265 "f_id": 226038,
266 "type": "1",
267 "lev_id": "226038",
268 "create_date": 1653985793000
269 }
270 ],
271 "name": "Group",
272 "online": 3,
273 "id": 226038,
274 "f_id": 0,
275 "type": "0",
276 "lev_id": "226038",
277 "create_date": 1659618529000
278 },
279 {
280 "all": 1,
281 "offline": 1,
282 "lev_name": "Default group",
283 "children": [
284 {
285 "all": 0,
286 "offline": 0,
287 "lev_name": "Test 2,Default group",
288 "children": [],
289 "name": " Test 2",
290 "f_name": "Default group",
291 "online": 0,
292 "id": 225987,
293 "f_id": 225922,
294 "type": "0",
295 "lev_id": "225987,225922",
296 "create_date": 1657010789000
297 },
298 {
299 "code": "V02001211222999a2d12c52a355",
300 "lev_name": "Default group",
301 "name": "V-BOX",
302 "f_name": "Default group",
303 "model": "V-BOX S-4G",
304 "boxType": 0,
305 "id": 444848,
306 "state": 0,
307 "f_id": 225922,
308 "type": "1",
309 "lev_id": "225922",
310 "create_date": 1652378606000
311 }
312 ],
313 "name": "Default group",
314 "online": 0,
315 "id": 225922,
316 "f_id": 0,
317 "type": "0",
318 "lev_id": "225922",
319 "create_date": 1653984617000
320 }
321 ]
322 }
323 }
324
325 **Operating procedures(Dome)**
326
327 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/device/getList
328
329 **Step2:**  Get sign (Using the sid obtained from calling the login API;demonstrated here as "e95ae840f7f147718d2b7650abe6c05f")
330
331 cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
332
333 Put the whole string above encrypted by MD5, so will get the value of "sign" 
334
335 "sign":"2be680121333bf3dc479958efae791e2"
336
337 **Step4: ** Set wcommon of header
338
339 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"2be680121333bf3dc479958efae791e2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
340
341 [[image:1750906712204-462.png]]
342
343 **Result**
344
345 (% style="text-align:center" %)
346 [[image:1750924923320-272.png||height="566" width="475"]]
347
348 == 3.3 Get device state ==
349
350 (% style="margin-left:auto; margin-right:auto; width:800px" %)
351 |**acturl**|(% colspan="2" %)we-data/device/getDeviceState
352 |**Function**|(% colspan="2" rowspan="1" %)Get device state
353 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|**Description**
354 |machineCode|Machine Code
355 |(% colspan="1" rowspan="2" %)**Return value**|**Item**|**Description**
356 |state|0:Offline 1: Online
357 |(% colspan="1" %)**Example**|(% colspan="2" rowspan="1" %){
358 "code": 200,
359 "msg": "ok",
360 "result": {
361 "state": 1 
362 }
363 }
364
365 **Operating procedures(Dome)**
366
367 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/device/getDeviceState
368
369 **Step2: **Set parameters on Params
370
371 "machineCode": "V1400023040700790f5e19a1b55"
372
373 [[image:1750925468847-205.png]]
374
375 **Step3: **Get sign
376
377 cuid=123456789&lan=zh&machineCode=V1400023040700790f5e19a1b55&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
378
379 Put the whole string above encrypted by MD5, so will get the value of "sign" 
380
381 "sign":"f0889257ce45e561959928ba5475fbf1"
382
383 **Step4: ** Set wcommon of header
384
385 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"f0889257ce45e561959928ba5475fbf1","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
386
387 **Result**
388
389 (% style="text-align:center" %)
390 [[image:1750925773973-469.png]]
391
392
393 == (% id="cke_bm_206555S" style="display:none" %) (%%)3.4 Get real-time tag list ==
394
395 (% style="margin-left:auto; margin-right:auto; width:800px" %)
396 |**acturl**|(% colspan="3" %)we-data/actGroup
397 |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag list
398 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
399 |boxId|(% colspan="2" %)V-box ID
400 |(% colspan="1" rowspan="4" %)**Return value**|**Item**|(% colspan="2" %)**Description**
401 |(% rowspan="3" %)list|(% colspan="2" %)Group list
402 |groupId|Group Id
403 |groupName|Group Name
404 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
405 "code": 200,
406 "msg": "ok",
407 "result": {
408 "list": [
409 {
410 "groupId": 1,
411 "groupName": "group 1"
412 },
413 {
414 "groupId": 2,
415 "groupName": "group 2"
416 }
417 ]
418 }
419 }
420
421 **Operating procedures(Dome)**
422
423 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/actGroup
424
425 **Step2: **Set parameters on Params
426
427 "boxId": "10108"
428
429 [[image:1750926881603-584.png]]
430
431 **Step3: **Get sign
432
433 boxId=10108&cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
434
435 Put the whole string above encrypted by MD5, so will get the value of "sign" 
436
437 "sign":"9e933e16e03f2821a58aa9694de49969"
438
439 **Step4: ** Set wcommon of header
440
441 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
442
443 [[image:1750926908151-938.png]]
444
445 **Result**
446
447 (% style="text-align:center" %)
448 [[image:1750926982185-137.png]]
449
450 == (% id="cke_bm_294214S" style="display:none" %) (%%)3.5 Get real-time tag configuration ==
451
452 (% style="margin-left:auto; margin-right:auto; width:800px" %)
453 |**acturl**|(% colspan="3" %)/we-data/realcfgs
454 |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag configuration
455 |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
456 |boxId|(% colspan="2" %)V-box ID (Required)
457 |groupId|(% colspan="2" %)Group ID (Required)
458 |pageSize|(% colspan="2" %)Number of items per page (defaults to 10 if not specified)
459 |pageIndex|(% colspan="2" %)Page number, starting from 1
460 |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required)
461 |(% colspan="1" rowspan="16" %)**Return value**|**Item**|(% colspan="2" %)**Description**
462 |(% colspan="1" rowspan="12" %)cfgList|(% colspan="2" %)Configuration list
463 |monitorId|Monitor ID
464 |monitorName|Monitor Name
465 |updTime|Last Update Time
466 |dataId|(((
467 Data Type:
468
469 100 - 16-bit Binary
470
471 101 - 16-bit Octal
472
473 ... (Refer to Appendix 1)
474 )))
475 |addr|Address
476 |addrType|(((
477 0:bit address
478
479 1:byte address
480
481 2:word address
482
483 3:double word
484 )))
485 |digitCount|integer digits, decimal digits
486 |digitBinary|carry system
487 |dataLimit|Data Range
488 |rid|Register Address
489 |roleType|(((
490 Access Permission:
491
492 1 - Read Only
493
494 2 - Write Only
495
496 3 - Read/Write
497 )))
498 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
499 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
500 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
501 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
502 "code":200,
503 "msg":"ok",
504 "reqId":"1595385125344",
505 "result":
506 {
507 "cfgList":
508 [
509 {
510 "monitorId":544225,
511 "dataId":105,
512 "monitorName":"00",
513 "updTime":1589506814000,
514 "dataLimit":"0 99999",
515 "digitBinary":" decimal",
516 "addr":"0",
517 "rid":"0",
518 "roleType":3,
519 "digitCount":"",
520 "addrType":0
521 },
522 {
523 "monitorId":544224,
524 "dataId":105,
525 "monitorName":"40",
526 "updTime":1589507516000,
527 "dataLimit":"0 99999",
528 "digitBinary":" decimal",
529 "addr":"0",
530 "rid":"4",
531 "roleType":3,
532 "digitCount":"5,
533 0",
534 "addrType":2
535 }
536 ],
537 "totalPage":1,
538 "totalRecord":2,
539 "currentPage":1
540 }
541 }
542
543 **Operating procedures(Dome)**
544
545 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16~/~/we-data/realcfgs
546
547 **Step2: **Set parameters on Params
548
549 "boxId": "10108"
550
551 "groupId": "307096"
552
553 "devtype": "0"
554
555 [[image:1750930526412-753.png]]
556
557 **Step3: **Get sign
558
559 boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
560
561 Put the whole string above encrypted by MD5, so will get the value of "sign" 
562
563 "sign":"60fafbd0d795036e2ae09b4053c65671"
564
565 **Step4: ** Set wcommon of header
566
567 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"60fafbd0d795036e2ae09b4053c65671","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
568
569 [[image:1750930595350-219.png]]
570
571 **Result**
572
573 (% style="text-align:center" %)
574 [[image:1750930627007-466.png]]
575
576 == 3.6 Get Real-time data list ==
577
578 (% style="margin-left:auto; margin-right:auto; width:800px" %)
579 |**acturl**|(% colspan="3" %)we-data/realdata
580 |**Function**|(% colspan="3" rowspan="1" %)Get Real-time data list
581 |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
582 |boxId|(% colspan="2" %)V-box ID (Required)
583 |groupId|(% colspan="2" %)Group ID (Required)
584 |pageSize|(% colspan="2" %)The number of each page, default 10
585 |pageIndex|(% colspan="2" %)Pages, starting from 1
586 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
587 |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description**
588 |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Real-time data list
589 |com|Com port ID
590 |monitorId|Monitor ID
591 |monitorName|Monitor Name
592 |state|State
593 |value|Value
594 |groupId|Group ID
595 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
596 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
597 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
598 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %)(((
599 {
600 "code": 200,
601 "msg": "ok",
602 "result": {
603 "list": [
604 {
605 "com": 1, ~/~/ com port ID
606 "monitorId": 1, ~/~/Monitor ID
607 "monitorName": "plc1", ~/~/Monitor Name
608 "state": 1, ~/~/State
609 "value": 12, ~/~/value
610 "groupId": 8~/~/ Group ID
611
612 },
613 {
614 "com": 2, ~/~/com port ID
615 "monitorId": 2,
616 "monitorName": "plc2",
617 "state": 1,
618 "value": 13,
619 "groupId": 8~/~/Group ID
620 }
621 ],
622 totalPage:10,
623 totalRecord:500,
624 currentPage:2
625 }
626 }
627 )))
628
629 **Operating procedures(Dome)**
630
631 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/realdata
632
633 **Step2: **Set parameters on Params
634
635 "boxId": "10108"
636
637 "groupId": "307096"
638
639 "devtype": "0"
640
641 [[image:1750931496306-864.png]]
642
643 **Step3: **Get sign
644
645 boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=1750818494344&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
646
647 Put the whole string above encrypted by MD5, so will get the value of "sign" 
648
649 "sign":"aa65f3d58da6dff1da04dc2f9babd931"
650
651 **Step4: ** Set wcommon of header
652
653 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"aa65f3d58da6dff1da04dc2f9babd931","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
654
655 [[image:1750931571632-223.png]]
656
657 **Result**
658
659 (% style="text-align:center" %)
660 [[image:1750931696007-370.png]]
661
662 == 3.7 Modify the data of real-time tag ==
663
664 (% style="margin-left:auto; margin-right:auto; width:800px" %)
665 |**acturl**|(% colspan="3" %)we-data/updrealdata
666 |**Function**|(% colspan="3" rowspan="1" %)Modify the data of real-time tag
667 |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
668 |boxId|(% colspan="2" %)V-box ID (Required)
669 |monitorId|(% colspan="2" %)Monitor ID
670 |value|(% colspan="2" %)value
671 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
672 |(% colspan="1" rowspan="2" %)**Return value**|**Item**|(% colspan="2" %)**Description**
673 |(% colspan="1" %) |(% colspan="2" %)
674 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
675 "code":200
676 "msg":"ok",
677 "result":{
678
679 }
680
681 **Operating procedures(Dome)**
682
683 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/updrealdata
684
685 **Step2: **Set parameters on Params
686
687 "boxId": "10108"
688
689 "monitorId": "10002423"
690
691 "value": "33"
692
693 "devtype": "0"
694
695 [[image:1750932160187-949.png]]
696
697 **Step3: **Get sign
698
699 boxId=10108&cuid=123456789&devtype=0&lan=zh&monitorId=10002423&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&value=33&key=5cee621329f24e5cbdc43daa959ce9a1
700
701 Put the whole string above encrypted by MD5, so will get the value of "sign" 
702
703 "sign":"d8cd8c57e3220c8327be1895ed2b3ca8"
704
705 **Step4: ** Set wcommon of header
706
707 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d8cd8c57e3220c8327be1895ed2b3ca8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
708
709 [[image:1750932298989-982.png]]
710
711 **Result**
712
713 (% style="text-align:center" %)
714 [[image:1750932371164-131.png]]
715
716 == 3.8 Get Historical tags name list ==
717
718 (% style="margin-left:auto; margin-right:auto; width:800px" %)
719 |**acturl**|(% colspan="3" %)we-data/monitors
720 |**Function**|(% colspan="3" rowspan="1" %)Get a list of historical tags
721 |(% colspan="1" rowspan="3" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
722 |boxId|(% colspan="2" %)V-box ID (Required)
723 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
724 |(% colspan="1" rowspan="5" %)**Return value**|**Item**|(% colspan="2" %)**Description**
725 |(% colspan="1" rowspan="4" %)list|(% colspan="2" %)Tag list
726 |monitorId|Monitor ID
727 |monitorName|Monitor Name
728 |groupId|Group ID
729 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
730 "code": 200,
731 "msg": "ok",
732 "result": {
733 "list": [
734 {
735 "monitorId": 1,
736 "monitorName": "tag 1"
737 "groupId": "00000001" 
738 },
739 {
740 "monitorId": 2,
741 "monitorName": "tag 2"
742 "groupId": "00000002"
743 }
744 ]
745 }
746 }
747
748 **Operating procedures(Dome)**
749
750 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/monitors
751
752 **Step2: **Set parameters on Params
753
754 "boxId": "10108"
755
756 "devtype": "0"
757
758 (% style="text-align:center" %)
759 [[image:1750937987348-940.png]]
760
761
762 **Step3: **Get sign
763
764 boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
765
766 Put the whole string above encrypted by MD5, so will get the value of "sign" 
767
768 "sign":"066fd57475cbb808e1c095205b334e6e"
769
770 **Step4: ** Set wcommon of header
771
772 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"066fd57475cbb808e1c095205b334e6e","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
773
774 (% style="text-align:center" %)
775 [[image:1750938105712-443.png]]
776
777 **Result**
778
779 (% style="text-align:center" %)
780 [[image:1750938200648-249.png]]
781
782 == 3.9 Get Historical tag data list ==
783
784 (% style="margin-left:auto; margin-right:auto; width:800px" %)
785 |**acturl**|(% colspan="3" %)we-data/historydata
786 |**Function**|(% colspan="3" rowspan="1" %)Get historical data
787 |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
788 |boxId|(% colspan="2" %)V-box ID (Required)
789 |monitorId|(% colspan="2" %)tag ID, (Required)
790 |groupId|(% colspan="2" %)Group ID
791 |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required)
792 |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required)
793 |pageSize|(% colspan="2" %)Number of each page, 10 by default
794 |pageIndex|(% colspan="2" %)Number of current page, start from 1
795 |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description**
796 |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Historical data list
797 |monitorName|Tag Name
798 |monitorTime|Monitoring Time (timestamp)
799 |monitorTime_show|Monitoring time (formatted string)
800 |value|Value
801 |groupName|Group Name
802 |groupId|Group ID
803 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
804 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
805 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
806 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
807 "code": 200,
808 "msg": "ok",
809 "result": {
810 "list": [
811 {
812 "monitorName": "plc1", ~/~/Monitor Name
813 "value": 12, ~/~/value
814 "monitorTime": "15645122555", ~/~/monitoring time
815 "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time
816 "groupName": "", ~/~/ group name
817 "groupId": 1 ~/~/ group ID
818 },
819 {
820 "monitorName": "plc2",
821 "value": 13,
822 "monitorTime": "2017-05-25 12:18:30"
823 "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time
824 "groupName": "", ~/~/ group name
825 "groupId": 1 ~/~/group ID
826 }
827 ],
828 totalPage:10,
829 totalRecord:500,
830 currentPage:2
831 }
832 }
833
834 **Operating procedures(Dome)**
835
836 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/historydata
837
838 **Step2: **Set parameters on Params
839
840 "boxId": "10108"
841
842 "groupId": "10000683"
843
844 "monitorId": "10002467"
845
846 [[image:1751251214664-153.png]]
847
848 **Step3: **Get sign
849
850 boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
851
852 Put the whole string above encrypted by MD5, so will get the value of "sign" 
853
854 "sign":"6aabcd106be192898ac8cdc683a27bdf"
855
856 **Step4: ** Set wcommon of header
857
858 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"6aabcd106be192898ac8cdc683a27bdf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
859
860 [[image:1751251262825-117.png]]
861
862 **Result**
863
864 (% style="text-align:center" %)
865 [[image:1751251300796-556.png]]
866
867
868 == 3.10 Get Alarm tags data list ==
869
870 (% style="margin-left:auto; margin-right:auto; width:800px" %)
871 |**acturl**|(% colspan="3" %)we-data/alarmdata
872 |**Function**|(% colspan="3" rowspan="1" %)Get alarm data
873 |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
874 |boxId|(% colspan="2" %)V-box ID (Required)
875 |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required)
876 |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required)
877 |pageSize|(% colspan="2" %)Number of each page, 10 by default
878 |pageIndex|(% colspan="2" %)Number of current page, start from 1
879 |state|(% colspan="2" %)Status 1-unconfirmed, 2-confirm
880 |alarmType|(% colspan="2" %)Alarm events: 1-trigger alarm, 0-disarm
881 |(% colspan="1" %) |alarmLevel|(% colspan="2" %)(((
882 Alarm level:
883
884 1 general alarm,2 serious alarm,3 particularly serious alarm
885 )))
886 |(% colspan="1" %) |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required)
887 |(% colspan="1" rowspan="15" %)**Return value**|**Item**|(% colspan="2" %)**Description**
888 |(% colspan="1" rowspan="11" %)list|(% colspan="2" %)Alarm data list
889 |monitorId|Monitor ID
890 |monitorName|Monitor Name
891 |state|State
892 |value|Value
893 |monitorTime|Monitoring time ( timestamp )
894 |monitorTime_show|Monitoring time (formatted string)
895 |alarmType|Alarm Type
896 |alarmLevel|Alarm Level
897 |text|Alarm content
898 |alarm_role|Alarm permissions
899 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
900 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
901 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
902 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
903 "code": 200,
904 "msg": "ok",
905 "result": {
906 "list": [
907 {
908 "monitorId": 1,
909 "monitorName": "plc1", 
910 "state": 1, 
911 "value": 12, 
912 "monitorTime": "15215452111", 
913 "monitorTime_show": "2017-05-25 12:18:30",
914 "alarmType": "", 
915 "alarmLevel": "",
916 "text": "",
917 "alarm_role": ""
918 },
919 {
920 "monitorId": 1,
921 "monitorName": "plc2",
922 "state": 1,
923 "value": 13,
924 "monitorTime": "621554211225",
925 "monitorTime_show": "2017-05-25 12:18:30",
926 "alarmType": "", 
927 "alarmLevel": "",
928 "text": "",
929 "alarm_role": "" 
930 }
931 ],
932 totalPage:10,
933 totalRecord:500,
934 currentPage:2
935 }
936 }
937
938 **Operating procedures(Dome)**
939
940 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmdata
941
942 **Step2: **Set parameters on Params
943
944 "boxId": "10108"
945
946 "state": "2"
947
948 "devtype": "0"
949
950 [[image:1751590830927-952.png]]
951
952
953 **Step3: **Get sign
954
955 boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&state=2&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
956
957 Put the whole string above encrypted by MD5, so will get the value of "sign" 
958
959 "sign":"d689e54257984a9804bc0822df97d1a8"
960
961 **Step4: ** Set wcommon of header
962
963 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d689e54257984a9804bc0822df97d1a8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
964
965 [[image:1751590858077-283.png]]
966
967
968 **Result**
969
970 (% style="text-align:center" %)
971 [[image:1751590880404-167.png]]
972
973 == 3.11 Notify the device to report real-time data ==
974
975 (% style="margin-left:auto; margin-right:auto; width:800px" %)
976 |**acturl**|(% colspan="3" %)we-data/sendSwitchToDevice
977 |**Function**|(% colspan="3" rowspan="1" %)Notify the device to report real-time data. Since the device now has a real-time data toggle feature, it will only report real-time data when on the real-time data page. Otherwise, it will not report. Therefore, to continuously obtain real-time data, you must first call this interface and then invoke it every 20 seconds to ensure the device keeps reporting real-time data.
978 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
979 |boxId|(% colspan="2" %)V-box ID (Required,supports batch operations with comma-separated values (maximum 5,000 box IDs per request), e.g., 3012,4021,5036)
980 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
981 "code": 200,
982 "msg": "ok",
983 "result": {}
984 }
985
986 **Operating procedures(Dome)**
987
988 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com~/~/m16/we-data/sendSwitchToDevice
989
990 **Step2: **Set parameters on Params
991
992 "boxId": "10108"
993
994 [[image:1751590928746-181.png]]
995
996 **Step3: **Get sign
997
998 boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
999
1000 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1001
1002 "sign":"9e933e16e03f2821a58aa9694de49969"
1003
1004 **Step4: ** Set wcommon of header
1005
1006 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1007
1008 [[image:1751590956278-632.png]]
1009
1010 **Result**
1011
1012 (% style="text-align:center" %)
1013 [[image:1751590971071-144.png]]
1014
1015 == 3.12 Confirm the alarm data (V-Box/HMI) ==
1016
1017 (% style="margin-left:auto; margin-right:auto; width:800px" %)
1018 |**acturl**|(% colspan="3" %)we-data/historydata  ~-~-  (V-BOX)
1019 we-data/hmiDataAction/confirmData  ~-~-  (HMI)
1020 |**Function**|(% colspan="3" rowspan="1" %)Confirm the alarm data (V-BOX / HMI)
1021 |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
1022 |alarm_cfg_ids|(% colspan="2" %)Alarm confirmation ID (Required)
1023 |monitor_times|(% colspan="2" %)Monitor time  (Required)
1024 |deviceId|(% colspan="2" %)Device ID (Required)
1025 |alarm_types (HMI only)|(% colspan="2" %)Alarm Type:1: Triggered, 0: Cancelled
1026 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
1027 "code": 200,
1028 "msg": "ok",
1029 "reqId": "1663749297007",
1030 "result": {}
1031 }
1032
1033 **Operating procedures(Dome for V-BOX)**
1034
1035 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmDataAction/confirmData
1036
1037 **Step2: **Set parameters on Params
1038
1039 "alarm_cfg_ids": "10000017"
1040
1041 "deviceId": "10108"
1042
1043 "monitor_times": "1748588490783"
1044
1045 [[image:1751592962453-264.png]]
1046
1047 **Step3: **Get sign
1048
1049 alarm_cfg_ids=10000017&cuid=123456789&deviceId=10108&lan=zh&monitor_times=1748588490783&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
1050
1051 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1052
1053 "sign":"93e7cd5abe03040b16e645d2869706f2"
1054
1055 **Step4: ** Set wcommon of header
1056
1057 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"93e7cd5abe03040b16e645d2869706f2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1058
1059 [[image:1751593015952-261.png]]
1060
1061 **Result**
1062
1063 (% style="text-align:center" %)
1064 [[image:1751593034158-244.png]]
1065
1066 == 3.12 Get remote monitoring Url ==
1067
1068 (% style="margin-left:auto; margin-right:auto; width:800px" %)
1069 |**acturl**|(% colspan="3" %)we-data/getMonitorUrl
1070 |**Function**|(% colspan="3" rowspan="1" %)Get remote monitoring Url
1071 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
1072 |deviceId|(% colspan="2" %)Device ID (Required)
1073 |(% colspan="1" rowspan="2" %)**Return value**|f_ver|(% colspan="2" %)Version
1074 |Url|(% colspan="2" %)Remote monitoring URL
1075 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
1076 "code": 200,
1077 "msg": "ok",
1078 "reqId": "1663749297007",
1079 "result": {“f_ver”:”V_0.5”,“url”:http:~/~/245646468...52.hmi.we-con.com.cn:1142/index.html?d=115...&token=42354...}
1080 }
1081
1082 **Operating procedures(Dome)**
1083
1084 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/getMonitorUrl
1085
1086 **Step2: **Set parameters on Params
1087
1088 "deviceId": "10000467"
1089
1090 (% style="text-align:center" %)
1091 [[image:1751593657691-677.png]]
1092
1093 **Step3: **Get sign
1094
1095 cuid=123456789&deviceId=10000467&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
1096
1097 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1098
1099 "sign":"dd1324f34dc90683373504f31aaf24cf"
1100
1101 **Step4: ** Set wcommon of header
1102
1103 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"dd1324f34dc90683373504f31aaf24cf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1104
1105 [[image:1751594984300-563.png]]
1106
1107 **Result**
1108
1109 [[image:1751595028434-214.png]]
1110
1111