Wiki source code of HTTPS API

Last modified by Devin Chen on 2026/05/12 11:15

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.
Devin Chen 9.1 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)**
Wecon 1.1 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
Devin Chen 8.1 15 Please refer to the link below to create a third-party account
Wecon 1.1 16
Devin Chen 8.1 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]]
Wecon 1.1 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 * (((
Devin Chen 3.1 41 **Request url**:
42 Asean: https:~/~/api.asean.v-iec.com/m16/{acturl}
43
44 EU: https:~/~/api.eu.v-box.net/m16/{acturl}
Wecon 1.1 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
Devin Chen 4.1 331 cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
Wecon 1.1 332
333 Put the whole string above encrypted by MD5, so will get the value of "sign" 
334
Devin Chen 4.1 335 "sign":"2be680121333bf3dc479958efae791e2"
Wecon 1.1 336
337 **Step4: ** Set wcommon of header
338
Devin Chen 4.1 339 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"2be680121333bf3dc479958efae791e2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
Wecon 1.1 340
Devin Chen 10.1 341 (% style="text-align:center" %)
342 [[image:WeCom Screenshot_20260512111415.png]]
Wecon 1.1 343
344 **Result**
345
346 (% style="text-align:center" %)
347 [[image:1750924923320-272.png||height="566" width="475"]]
348
349 == 3.3 Get device state ==
350
351 (% style="margin-left:auto; margin-right:auto; width:800px" %)
352 |**acturl**|(% colspan="2" %)we-data/device/getDeviceState
353 |**Function**|(% colspan="2" rowspan="1" %)Get device state
354 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|**Description**
355 |machineCode|Machine Code
356 |(% colspan="1" rowspan="2" %)**Return value**|**Item**|**Description**
357 |state|0:Offline 1: Online
358 |(% colspan="1" %)**Example**|(% colspan="2" rowspan="1" %){
359 "code": 200,
360 "msg": "ok",
361 "result": {
362 "state": 1 
363 }
364 }
365
366 **Operating procedures(Dome)**
367
368 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/device/getDeviceState
369
370 **Step2: **Set parameters on Params
371
372 "machineCode": "V1400023040700790f5e19a1b55"
373
374 [[image:1750925468847-205.png]]
375
376 **Step3: **Get sign
377
378 cuid=123456789&lan=zh&machineCode=V1400023040700790f5e19a1b55&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
379
380 Put the whole string above encrypted by MD5, so will get the value of "sign" 
381
382 "sign":"f0889257ce45e561959928ba5475fbf1"
383
384 **Step4: ** Set wcommon of header
385
386 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"f0889257ce45e561959928ba5475fbf1","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
387
388 **Result**
389
390 (% style="text-align:center" %)
391 [[image:1750925773973-469.png]]
392
393
394 == (% id="cke_bm_206555S" style="display:none" %) (%%)3.4 Get real-time tag list ==
395
396 (% style="margin-left:auto; margin-right:auto; width:800px" %)
397 |**acturl**|(% colspan="3" %)we-data/actGroup
398 |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag list
399 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
400 |boxId|(% colspan="2" %)V-box ID
401 |(% colspan="1" rowspan="4" %)**Return value**|**Item**|(% colspan="2" %)**Description**
402 |(% rowspan="3" %)list|(% colspan="2" %)Group list
403 |groupId|Group Id
404 |groupName|Group Name
405 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
406 "code": 200,
407 "msg": "ok",
408 "result": {
409 "list": [
410 {
411 "groupId": 1,
412 "groupName": "group 1"
413 },
414 {
415 "groupId": 2,
416 "groupName": "group 2"
417 }
418 ]
419 }
420 }
421
422 **Operating procedures(Dome)**
423
424 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/actGroup
425
426 **Step2: **Set parameters on Params
427
428 "boxId": "10108"
429
430 [[image:1750926881603-584.png]]
431
432 **Step3: **Get sign
433
434 boxId=10108&cuid=123456789&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
435
436 Put the whole string above encrypted by MD5, so will get the value of "sign" 
437
438 "sign":"9e933e16e03f2821a58aa9694de49969"
439
440 **Step4: ** Set wcommon of header
441
442 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
443
444 [[image:1750926908151-938.png]]
445
446 **Result**
447
448 (% style="text-align:center" %)
449 [[image:1750926982185-137.png]]
450
451 == (% id="cke_bm_294214S" style="display:none" %) (%%)3.5 Get real-time tag configuration ==
452
453 (% style="margin-left:auto; margin-right:auto; width:800px" %)
454 |**acturl**|(% colspan="3" %)/we-data/realcfgs
455 |**Function**|(% colspan="3" rowspan="1" %)Get real-time tag configuration
456 |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
457 |boxId|(% colspan="2" %)V-box ID (Required)
458 |groupId|(% colspan="2" %)Group ID (Required)
459 |pageSize|(% colspan="2" %)Number of items per page (defaults to 10 if not specified)
460 |pageIndex|(% colspan="2" %)Page number, starting from 1
461 |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required)
462 |(% colspan="1" rowspan="16" %)**Return value**|**Item**|(% colspan="2" %)**Description**
463 |(% colspan="1" rowspan="12" %)cfgList|(% colspan="2" %)Configuration list
464 |monitorId|Monitor ID
465 |monitorName|Monitor Name
466 |updTime|Last Update Time
467 |dataId|(((
468 Data Type:
469
470 100 - 16-bit Binary
471
472 101 - 16-bit Octal
473
474 ... (Refer to Appendix 1)
475 )))
476 |addr|Address
477 |addrType|(((
478 0:bit address
479
480 1:byte address
481
482 2:word address
483
484 3:double word
485 )))
486 |digitCount|integer digits, decimal digits
487 |digitBinary|carry system
488 |dataLimit|Data Range
489 |rid|Register Address
490 |roleType|(((
491 Access Permission:
492
493 1 - Read Only
494
495 2 - Write Only
496
497 3 - Read/Write
498 )))
499 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
500 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
501 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
502 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
503 "code":200,
504 "msg":"ok",
505 "reqId":"1595385125344",
506 "result":
507 {
508 "cfgList":
509 [
510 {
511 "monitorId":544225,
512 "dataId":105,
513 "monitorName":"00",
514 "updTime":1589506814000,
515 "dataLimit":"0 99999",
516 "digitBinary":" decimal",
517 "addr":"0",
518 "rid":"0",
519 "roleType":3,
520 "digitCount":"",
521 "addrType":0
522 },
523 {
524 "monitorId":544224,
525 "dataId":105,
526 "monitorName":"40",
527 "updTime":1589507516000,
528 "dataLimit":"0 99999",
529 "digitBinary":" decimal",
530 "addr":"0",
531 "rid":"4",
532 "roleType":3,
533 "digitCount":"5,
534 0",
535 "addrType":2
536 }
537 ],
538 "totalPage":1,
539 "totalRecord":2,
540 "currentPage":1
541 }
542 }
543
544 **Operating procedures(Dome)**
545
546 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16~/~/we-data/realcfgs
547
548 **Step2: **Set parameters on Params
549
550 "boxId": "10108"
551
552 "groupId": "307096"
553
554 "devtype": "0"
555
556 [[image:1750930526412-753.png]]
557
558 **Step3: **Get sign
559
560 boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
561
562 Put the whole string above encrypted by MD5, so will get the value of "sign" 
563
564 "sign":"60fafbd0d795036e2ae09b4053c65671"
565
566 **Step4: ** Set wcommon of header
567
568 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"60fafbd0d795036e2ae09b4053c65671","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
569
570 [[image:1750930595350-219.png]]
571
572 **Result**
573
574 (% style="text-align:center" %)
575 [[image:1750930627007-466.png]]
576
577 == 3.6 Get Real-time data list ==
578
579 (% style="margin-left:auto; margin-right:auto; width:800px" %)
580 |**acturl**|(% colspan="3" %)we-data/realdata
581 |**Function**|(% colspan="3" rowspan="1" %)Get Real-time data list
582 |(% colspan="1" rowspan="6" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
583 |boxId|(% colspan="2" %)V-box ID (Required)
584 |groupId|(% colspan="2" %)Group ID (Required)
585 |pageSize|(% colspan="2" %)The number of each page, default 10
586 |pageIndex|(% colspan="2" %)Pages, starting from 1
587 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
588 |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description**
589 |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Real-time data list
590 |com|Com port ID
591 |monitorId|Monitor ID
592 |monitorName|Monitor Name
593 |state|State
594 |value|Value
595 |groupId|Group ID
596 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
597 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
598 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
599 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %)(((
600 {
601 "code": 200,
602 "msg": "ok",
603 "result": {
604 "list": [
605 {
606 "com": 1, ~/~/ com port ID
607 "monitorId": 1, ~/~/Monitor ID
608 "monitorName": "plc1", ~/~/Monitor Name
609 "state": 1, ~/~/State
610 "value": 12, ~/~/value
611 "groupId": 8~/~/ Group ID
612
613 },
614 {
615 "com": 2, ~/~/com port ID
616 "monitorId": 2,
617 "monitorName": "plc2",
618 "state": 1,
619 "value": 13,
620 "groupId": 8~/~/Group ID
621 }
622 ],
623 totalPage:10,
624 totalRecord:500,
625 currentPage:2
626 }
627 }
628 )))
629
630 **Operating procedures(Dome)**
631
632 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/realdata
633
634 **Step2: **Set parameters on Params
635
636 "boxId": "10108"
637
638 "groupId": "307096"
639
640 "devtype": "0"
641
642 [[image:1750931496306-864.png]]
643
644 **Step3: **Get sign
645
646 boxId=10108&cuid=123456789&devtype=0&groupId=307096&lan=zh&mt=255&pid=1&sid=1750818494344&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
647
648 Put the whole string above encrypted by MD5, so will get the value of "sign" 
649
650 "sign":"aa65f3d58da6dff1da04dc2f9babd931"
651
652 **Step4: ** Set wcommon of header
653
654 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"aa65f3d58da6dff1da04dc2f9babd931","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
655
656 [[image:1750931571632-223.png]]
657
658 **Result**
659
660 (% style="text-align:center" %)
661 [[image:1750931696007-370.png]]
662
663 == 3.7 Modify the data of real-time tag ==
664
665 (% style="margin-left:auto; margin-right:auto; width:800px" %)
666 |**acturl**|(% colspan="3" %)we-data/updrealdata
667 |**Function**|(% colspan="3" rowspan="1" %)Modify the data of real-time tag
668 |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
669 |boxId|(% colspan="2" %)V-box ID (Required)
670 |monitorId|(% colspan="2" %)Monitor ID
671 |value|(% colspan="2" %)value
672 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
673 |(% colspan="1" rowspan="2" %)**Return value**|**Item**|(% colspan="2" %)**Description**
674 |(% colspan="1" %) |(% colspan="2" %)
675 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
676 "code":200
677 "msg":"ok",
678 "result":{
679
680 }
681
682 **Operating procedures(Dome)**
683
684 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/updrealdata
685
686 **Step2: **Set parameters on Params
687
688 "boxId": "10108"
689
690 "monitorId": "10002423"
691
692 "value": "33"
693
694 "devtype": "0"
695
696 [[image:1750932160187-949.png]]
697
698 **Step3: **Get sign
699
700 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
701
702 Put the whole string above encrypted by MD5, so will get the value of "sign" 
703
704 "sign":"d8cd8c57e3220c8327be1895ed2b3ca8"
705
706 **Step4: ** Set wcommon of header
707
708 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d8cd8c57e3220c8327be1895ed2b3ca8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
709
710 [[image:1750932298989-982.png]]
711
712 **Result**
713
714 (% style="text-align:center" %)
715 [[image:1750932371164-131.png]]
716
717 == 3.8 Get Historical tags name list ==
718
719 (% style="margin-left:auto; margin-right:auto; width:800px" %)
720 |**acturl**|(% colspan="3" %)we-data/monitors
721 |**Function**|(% colspan="3" rowspan="1" %)Get a list of historical tags
722 |(% colspan="1" rowspan="3" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
723 |boxId|(% colspan="2" %)V-box ID (Required)
724 |devtype|(% colspan="2" %)Device type (0:box,1:hmi) (Required)
725 |(% colspan="1" rowspan="5" %)**Return value**|**Item**|(% colspan="2" %)**Description**
726 |(% colspan="1" rowspan="4" %)list|(% colspan="2" %)Tag list
727 |monitorId|Monitor ID
728 |monitorName|Monitor Name
729 |groupId|Group ID
730 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
731 "code": 200,
732 "msg": "ok",
733 "result": {
734 "list": [
735 {
736 "monitorId": 1,
737 "monitorName": "tag 1"
738 "groupId": "00000001" 
739 },
740 {
741 "monitorId": 2,
742 "monitorName": "tag 2"
743 "groupId": "00000002"
744 }
745 ]
746 }
747 }
748
749 **Operating procedures(Dome)**
750
751 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/monitors
752
753 **Step2: **Set parameters on Params
754
755 "boxId": "10108"
756
757 "devtype": "0"
758
759 (% style="text-align:center" %)
760 [[image:1750937987348-940.png]]
761
762
763 **Step3: **Get sign
764
765 boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
766
767 Put the whole string above encrypted by MD5, so will get the value of "sign" 
768
769 "sign":"066fd57475cbb808e1c095205b334e6e"
770
771 **Step4: ** Set wcommon of header
772
773 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"066fd57475cbb808e1c095205b334e6e","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
774
775 (% style="text-align:center" %)
776 [[image:1750938105712-443.png]]
777
778 **Result**
779
780 (% style="text-align:center" %)
781 [[image:1750938200648-249.png]]
782
783 == 3.9 Get Historical tag data list ==
784
785 (% style="margin-left:auto; margin-right:auto; width:800px" %)
786 |**acturl**|(% colspan="3" %)we-data/historydata
787 |**Function**|(% colspan="3" rowspan="1" %)Get historical data
788 |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
789 |boxId|(% colspan="2" %)V-box ID (Required)
790 |monitorId|(% colspan="2" %)tag ID, (Required)
791 |groupId|(% colspan="2" %)Group ID
792 |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required)
793 |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required)
794 |pageSize|(% colspan="2" %)Number of each page, 10 by default
795 |pageIndex|(% colspan="2" %)Number of current page, start from 1
796 |(% colspan="1" rowspan="11" %)**Return value**|**Item**|(% colspan="2" %)**Description**
797 |(% colspan="1" rowspan="7" %)list|(% colspan="2" %)Historical data list
798 |monitorName|Tag Name
799 |monitorTime|Monitoring Time (timestamp)
800 |monitorTime_show|Monitoring time (formatted string)
801 |value|Value
802 |groupName|Group Name
803 |groupId|Group ID
804 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
805 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
806 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
807 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
808 "code": 200,
809 "msg": "ok",
810 "result": {
811 "list": [
812 {
813 "monitorName": "plc1", ~/~/Monitor Name
814 "value": 12, ~/~/value
815 "monitorTime": "15645122555", ~/~/monitoring time
816 "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time
817 "groupName": "", ~/~/ group name
818 "groupId": 1 ~/~/ group ID
819 },
820 {
821 "monitorName": "plc2",
822 "value": 13,
823 "monitorTime": "2017-05-25 12:18:30"
824 "monitorTime_show": "2017-05-25 12:18:30", ~/~/monitoring time
825 "groupName": "", ~/~/ group name
826 "groupId": 1 ~/~/group ID
827 }
828 ],
829 totalPage:10,
830 totalRecord:500,
831 currentPage:2
832 }
833 }
834
835 **Operating procedures(Dome)**
836
837 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/historydata
838
839 **Step2: **Set parameters on Params
840
841 "boxId": "10108"
842
843 "groupId": "10000683"
844
845 "monitorId": "10002467"
846
847 [[image:1751251214664-153.png]]
848
849 **Step3: **Get sign
850
851 boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
852
853 Put the whole string above encrypted by MD5, so will get the value of "sign" 
854
855 "sign":"6aabcd106be192898ac8cdc683a27bdf"
856
857 **Step4: ** Set wcommon of header
858
859 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"6aabcd106be192898ac8cdc683a27bdf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
860
861 [[image:1751251262825-117.png]]
862
863 **Result**
864
865 (% style="text-align:center" %)
866 [[image:1751251300796-556.png]]
867
868
869 == 3.10 Get Alarm tags data list ==
870
871 (% style="margin-left:auto; margin-right:auto; width:800px" %)
872 |**acturl**|(% colspan="3" %)we-data/alarmdata
873 |**Function**|(% colspan="3" rowspan="1" %)Get alarm data
874 |(% colspan="1" rowspan="8" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
875 |boxId|(% colspan="2" %)V-box ID (Required)
876 |monitorBeginTime|(% colspan="2" %)Monitoring start time, (Not required)
877 |monitorEndTime|(% colspan="2" %)Monitoring end time, (Not required)
878 |pageSize|(% colspan="2" %)Number of each page, 10 by default
879 |pageIndex|(% colspan="2" %)Number of current page, start from 1
880 |state|(% colspan="2" %)Status 1-unconfirmed, 2-confirm
881 |alarmType|(% colspan="2" %)Alarm events: 1-trigger alarm, 0-disarm
882 |(% colspan="1" %) |alarmLevel|(% colspan="2" %)(((
883 Alarm level:
884
885 1 general alarm,2 serious alarm,3 particularly serious alarm
886 )))
887 |(% colspan="1" %) |devtype|(% colspan="2" %)0: V-Box ,1: HMI (Required)
888 |(% colspan="1" rowspan="15" %)**Return value**|**Item**|(% colspan="2" %)**Description**
889 |(% colspan="1" rowspan="11" %)list|(% colspan="2" %)Alarm data list
890 |monitorId|Monitor ID
891 |monitorName|Monitor Name
892 |state|State
893 |value|Value
894 |monitorTime|Monitoring time ( timestamp )
895 |monitorTime_show|Monitoring time (formatted string)
896 |alarmType|Alarm Type
897 |alarmLevel|Alarm Level
898 |text|Alarm content
899 |alarm_role|Alarm permissions
900 |(% colspan="1" %)totalPage|(% colspan="2" rowspan="1" %)Total Pages
901 |(% colspan="1" %)totalRecord|(% colspan="2" %)Total Records
902 |(% colspan="1" %)currentPage|(% colspan="2" %)Current Page
903 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
904 "code": 200,
905 "msg": "ok",
906 "result": {
907 "list": [
908 {
909 "monitorId": 1,
910 "monitorName": "plc1", 
911 "state": 1, 
912 "value": 12, 
913 "monitorTime": "15215452111", 
914 "monitorTime_show": "2017-05-25 12:18:30",
915 "alarmType": "", 
916 "alarmLevel": "",
917 "text": "",
918 "alarm_role": ""
919 },
920 {
921 "monitorId": 1,
922 "monitorName": "plc2",
923 "state": 1,
924 "value": 13,
925 "monitorTime": "621554211225",
926 "monitorTime_show": "2017-05-25 12:18:30",
927 "alarmType": "", 
928 "alarmLevel": "",
929 "text": "",
930 "alarm_role": "" 
931 }
932 ],
933 totalPage:10,
934 totalRecord:500,
935 currentPage:2
936 }
937 }
938
939 **Operating procedures(Dome)**
940
941 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmdata
942
943 **Step2: **Set parameters on Params
944
945 "boxId": "10108"
946
947 "state": "2"
948
949 "devtype": "0"
950
951 [[image:1751590830927-952.png]]
952
953
954 **Step3: **Get sign
955
956 boxId=10108&cuid=123456789&devtype=0&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&state=2&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
957
958 Put the whole string above encrypted by MD5, so will get the value of "sign" 
959
960 "sign":"d689e54257984a9804bc0822df97d1a8"
961
962 **Step4: ** Set wcommon of header
963
964 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"d689e54257984a9804bc0822df97d1a8","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
965
966 [[image:1751590858077-283.png]]
967
968
969 **Result**
970
971 (% style="text-align:center" %)
972 [[image:1751590880404-167.png]]
973
974 == 3.11 Notify the device to report real-time data ==
975
976 (% style="margin-left:auto; margin-right:auto; width:800px" %)
977 |**acturl**|(% colspan="3" %)we-data/sendSwitchToDevice
978 |**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.
979 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
980 |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)
981 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
982 "code": 200,
983 "msg": "ok",
984 "result": {}
985 }
986
987 **Operating procedures(Dome)**
988
989 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com~/~/m16/we-data/sendSwitchToDevice
990
991 **Step2: **Set parameters on Params
992
993 "boxId": "10108"
994
995 [[image:1751590928746-181.png]]
996
997 **Step3: **Get sign
998
999 boxId=10108&cuid=123456789&groupId=10000683&lan=zh&monitorId=10002467&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
1000
1001 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1002
1003 "sign":"9e933e16e03f2821a58aa9694de49969"
1004
1005 **Step4: ** Set wcommon of header
1006
1007 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"9e933e16e03f2821a58aa9694de49969","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1008
1009 [[image:1751590956278-632.png]]
1010
1011 **Result**
1012
1013 (% style="text-align:center" %)
1014 [[image:1751590971071-144.png]]
1015
1016 == 3.12 Confirm the alarm data (V-Box/HMI) ==
1017
1018 (% style="margin-left:auto; margin-right:auto; width:800px" %)
1019 |**acturl**|(% colspan="3" %)we-data/historydata  ~-~-  (V-BOX)
1020 we-data/hmiDataAction/confirmData  ~-~-  (HMI)
1021 |**Function**|(% colspan="3" rowspan="1" %)Confirm the alarm data (V-BOX / HMI)
1022 |(% colspan="1" rowspan="5" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
1023 |alarm_cfg_ids|(% colspan="2" %)Alarm confirmation ID (Required)
1024 |monitor_times|(% colspan="2" %)Monitor time  (Required)
1025 |deviceId|(% colspan="2" %)Device ID (Required)
1026 |alarm_types (HMI only)|(% colspan="2" %)Alarm Type:1: Triggered, 0: Cancelled
1027 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
1028 "code": 200,
1029 "msg": "ok",
1030 "reqId": "1663749297007",
1031 "result": {}
1032 }
1033
1034 **Operating procedures(Dome for V-BOX)**
1035
1036 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/alarmDataAction/confirmData
1037
1038 **Step2: **Set parameters on Params
1039
1040 "alarm_cfg_ids": "10000017"
1041
1042 "deviceId": "10108"
1043
1044 "monitor_times": "1748588490783"
1045
1046 [[image:1751592962453-264.png]]
1047
1048 **Step3: **Get sign
1049
1050 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
1051
1052 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1053
1054 "sign":"93e7cd5abe03040b16e645d2869706f2"
1055
1056 **Step4: ** Set wcommon of header
1057
1058 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"93e7cd5abe03040b16e645d2869706f2","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1059
1060 [[image:1751593015952-261.png]]
1061
1062 **Result**
1063
1064 (% style="text-align:center" %)
1065 [[image:1751593034158-244.png]]
1066
1067 == 3.12 Get remote monitoring Url ==
1068
1069 (% style="margin-left:auto; margin-right:auto; width:800px" %)
1070 |**acturl**|(% colspan="3" %)we-data/getMonitorUrl
1071 |**Function**|(% colspan="3" rowspan="1" %)Get remote monitoring Url
1072 |(% colspan="1" rowspan="2" %)**Parameters**|**Item**|(% colspan="2" %)**Description**
1073 |deviceId|(% colspan="2" %)Device ID (Required)
1074 |(% colspan="1" rowspan="2" %)**Return value**|f_ver|(% colspan="2" %)Version
1075 |Url|(% colspan="2" %)Remote monitoring URL
1076 |(% colspan="1" %)**Example**|(% colspan="3" rowspan="1" %){
1077 "code": 200,
1078 "msg": "ok",
1079 "reqId": "1663749297007",
1080 "result": {“f_ver”:”V_0.5”,“url”:http:~/~/245646468...52.hmi.we-con.com.cn:1142/index.html?d=115...&token=42354...}
1081 }
1082
1083 **Operating procedures(Dome)**
1084
1085 **Step1:**  Set URL:https:~/~/api.asean.v-iec.com/m16/we-data/getMonitorUrl
1086
1087 **Step2: **Set parameters on Params
1088
1089 "deviceId": "10000467"
1090
1091 (% style="text-align:center" %)
1092 [[image:1751593657691-677.png]]
1093
1094 **Step3: **Get sign
1095
1096 cuid=123456789&deviceId=10000467&lan=zh&mt=255&pid=1&sid=e95ae840f7f147718d2b7650abe6c05f&sv=1.0&ts=1750818494344&key=5cee621329f24e5cbdc43daa959ce9a1
1097
1098 Put the whole string above encrypted by MD5, so will get the value of "sign" 
1099
1100 "sign":"dd1324f34dc90683373504f31aaf24cf"
1101
1102 **Step4: ** Set wcommon of header
1103
1104 {"dap":"","cuid":"123456789","sv":"1.0","mt":"255","lan":"zh","sign":"dd1324f34dc90683373504f31aaf24cf","pid":"1","ts":1750818494344,"sid":"e95ae840f7f147718d2b7650abe6c05f"}
1105
1106 [[image:1751594984300-563.png]]
1107
1108 **Result**
1109
1110 [[image:1751595028434-214.png]]
1111
1112