Wiki source code of HTTPS API

Version 1.3 by Wecon on 2025/09/04 11:41

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