0% found this document useful (0 votes)
29 views

Edgelink RESTful API Specification_v2.0

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Edgelink RESTful API Specification_v2.0

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 99

Advantech Energy Solutions

Edgelink Open
RESTful API
Specification
For Edgelink RESTful Web Service

An.Xin
2023-4-21
RECORD OF CHANGES
Version Date Chapter Description Reviser
1.0 2015-1-14 Initial Version. An Xin
1.1 2015-6-01 Ver.1.1 An Xin
1.2 2015-9-21 Ver.1.2 An Xin
1.3 2016-11-18 Ver.1.3 An Xin
1.4 2017-08-23 Ver1.4 An.Xin
1.5 2018-04-23 Ver1.5 An.Xin
1.6 2018-11-30 Ver1.6 An.Xin
1.7 2019-12-30 New Add: Ver1.7 An.Xin
2.9: Data Logger
2.0 2022-12-05 New Add: Ver2.0 An.Xin
2.8.4: Tag Search
2.11.6: Recover to default
2.13.2: Lan Configuration
2.13.3: Wlan Configuration
2.13.4: Cellular Configuration
2.13.5: GPS Configuration

2023-03-27 2.14 remote.it Ver2.0 An.Xin


2.15 Web Page Setting
Content
1 Web Service Uniform Interface................................................................................................. 5
1.1 RESTful Web Service Uniform Interface...................................................................... 5
1.2 GET ............................................................................................................................... 5
1.3 PUT ............................................................................................................................... 5
1.4 PATCH .......................................................................................................................... 5
1.5 POST ............................................................................................................................. 6
1.6 Safe and Idempotent...................................................................................................... 6
1.7 HTTPS Response Status-Code ...................................................................................... 6
2 Web Service API Definition ...................................................................................................... 8
2.1 URLOverview ............................................................................................................... 8
2.2 Device Information ..................................................................................................... 11
2.3 Device Control ............................................................................................................ 15
2.3.1 Restart ............................................................................................................. 15
2.3.2 Calibration ....................................................................................................... 15
2.4 Analog Input ............................................................................................................... 18
2.4.1 AI - Data Acquisition ...................................................................................... 18
2.5 Analog output.............................................................................................................. 23
2.5.1 AO - Data Acquisition ..................................................................................... 23
2.6 Digital input ................................................................................................................ 26
2.6.1 DI - Data Acquisition ...................................................................................... 26
2.7 Digital output .............................................................................................................. 29
2.7.1 DO - Data Acquisition ..................................................................................... 29
2.8 Tag Information........................................................................................................... 33
2.8.1 Tag - Data Acquisition..................................................................................... 33
2.8.2 System/User/IO/Calc Tag - Data Acquisition.................................................. 37
2.8.3 Tag Search ....................................................................................................... 44
2.9 Data Logger................................................................................................................. 58
2.10 Log in/log out .............................................................................................................. 65
2.10.1 Log in .............................................................................................................. 65
2.10.2 Log out ............................................................................................................ 66
2.11 Image Update .............................................................................................................. 68
2.11.1 Image File Information Verification ................................................................ 68
2.11.2 Image Upload .................................................................................................. 69
2.11.3 Image Update .................................................................................................. 70
2.11.4 Get information in update process .................................................................. 71
2.11.5 Image version information .............................................................................. 71
2.11.6 Recover to default image................................................................................. 73
2.12 System log file ............................................................................................................ 74
2.12.1 Get syslog of device ........................................................................................ 74
2.13 Network....................................................................................................................... 76
2.13.1 GPRS Info ....................................................................................................... 76
2.13.2 Lan Configuration ........................................................................................... 77
2.13.3 Wlan Configuration ......................................................................................... 81
2.13.4 Cellular Configuration .................................................................................... 86
2.13.5 GPS Configuration .......................................................................................... 96
2.14 Remoteit ...................................................................................................................... 98
2.15 Web Page Setting ........................................................................................................ 98
1 Web Service Uniform Interface

1.1 RESTful Web Service Uniform Interface


In REST, resources (a resource is any information that you want to make available to others) are
identified by unique URI. User agents (a.k.a. web browsers) only interact with resources using the
prescribed HTTP verbs, The main verbs (GET, PUT, POST, and DELETE) are what we call the
uniform interface. Resources can be read or written to using the HTTP verbs. GET to read resource,
PUT is typically used for modifying an existing resource, POST indicates the desire to perform
batch operation, DELETE indicates that a client wishes to delete a resource.

1.2 GET
The GET method means retreive whatever information (in the form of an entity) is identified by the
Request-URI. If the Request-URI refers to a data-producing process, it is the produced data which
shall be returned as the entity in the response and not the source text of the process, unless that text
happens to be the output of the process.

1.3 PUT
PUT can be used when the client is sending data to the the server and the client is determining the
URI for the newly created resource.

The PUT method requests that the enclosed entity be stored under the supplied Request-URI.
If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be
considered as a modified version of the one residing on the origin server. If the Request-URI
does not point to an existing resource, and that URI is capable of being defined as a new
resource by the requesting user agent, the origin server can create the resource with that URI.

⚫ client must supply the ID


⚫ if the resource exists, *replace* it with the inbound data
⚫ if it doesn't exist, create a new one (assuming you can do that)

1.4 PATCH
RFC5786 defines the new HTTP/1.1 [RFC2616] method, PATCH, which is used to apply partial
modifications to a resource.
PATCH can be used when the client is sending one or more changes to be applied by the the server.

The PATCH method requests that a set of changes described in the request entity be applied to
the resource identified by the Request-URI. The set of changes is represented in a format called
a "patch document"...

The point is that PATCH is used to doing some kind of 'partial' update.

1.5 POST
POST can be used when the client is sending data to the server and the server will decide the URI
for the newly created resource.

"The POST method is used to request that the origin server accept the entity enclosed in the
request as a new subordinate of the resource identified by the Request-URI in the Request-
Line."

This is what most of us think of when we talk about "creating data" on a web server.

1.6 Safe and Idempotent


Methods can also have the property of "idempotence" in that (aside from error or expiration issues)
the side-effects of N > 0 identical requests is the same as for a single request. The methods GET,
HEAD, PUT and DELETE share this property. Also, the methods OPTIONS and TRACE SHOULD
NOT have side effects, and so are inherently idempotent.

Safe? Idempotent?

GET Y Y

POST N N

PATCH N N

PUT N Y

DELETE N Y

1.7 HTTPS Response Status-Code


[RFC2616] The Status-Code element is a 3-digit integer result code of the attempt to understand
and satisfy the request.
The first digit of the Status-Code defines the class of response. The last two digits do not have any
categorization role. There are 5 values for the first digit:

- 1xx: Informational - Request received, continuing process

- 2xx: Success - The action was successfully received, understood, and accepted
- 3xx: Redirection - Further action must be taken in order to complete the request

- 4xx: Client Error - The request contains bad syntax or cannot be fulfilled

- 5xx: Server Error - The server failed to fulfill an apparently valid request

The status codes supported by ADAM web server are described below.
Status-Code Reason-Phrase Conditions
The request succeeded, and that the requested
200 OK information is in the response.
This is the most common status code to receive.
The request could not be understood by the server due to
malformed syntax.
⚫ The value in Content-length header does not
400 Bad Request
match with the real data length.
⚫ Invalid JOSN objects or format.
⚫ Invalid multipart contents.
The server refuses to fulfill the request due to
403 Forbidden
authentication error, such as invalid cookie.
The requested resource (URI) does not exist on the
404 Not Found
server.
Method Not The request method (POST or GET) is not allowed on
405
Allowed the requested resource.
411 Length Required The required Content-length header is missing.
Memory access errors occurred on the server when
Internal Server processed the file uploaded by client.
500
Error Fail to reply the JSON-format message due to out of
buffer size, or others.
Service The login list is full.
503
Unavailable
2 Web Service API Definition

2.1 URLOverview
HTTP Methods
URI Description Applicable
GET PUT PATCH POST
/ data  The entry URI for user’s HTML
/sys/log_in  Log in for update data
/sys/log_out  Log out
/sys/version  Get all versions on device
Get upload file total size and total
/sys/file_verify 
count, and each file size and file name
/sys/upload  Upload files for update
/sys/update  Firmware update
/sys/update_info  Get info in the process of update

/sys/log_create  Start to get syslog messages


Edgelink device
/sys/log_message  Get syslog messages
series
/sys/control  Calibration, restart
/lan /id_x   Get and config network information
/wlan /id_0   Get and config wlan device
/sys/net_basic   Config cellular module parameters
/cellular /status  Get cellular working status
/gps   Get and set GPS function
/value   Tag value acquisition
/quality   Tag quality acquisition
/data/tags /timestamp   Tag timestamp acquisition
/name  Tag name acquisition
/readwrite  Tag read-write property acquisition
/type  Tag type acquisition
/value 
/data/cellular_info /quality 
/timestamp 

/data/di_value /slot_x   Data values of digital input channels


/ch_x

/data/do_value /slot_x   Data values of digital output channels


/ch_x

/data/ai_value /slot_x   Data values of analog output channels


/ch_x
Data values of analog input channels
/data/ao_value /slot_x  
/ch_x
Device information, such as module
/data/device_info /slot_x  
name, firmware version, time, date

/data/datalogger   Datalogger query

Note: *1. All method (GET/ PUT/POST/PATCH) must be used with cookie, seen in 2.10.1 Log in chapter.
*2. All HTTP requests need including ‘Referer’ in HTTP Header, the value of ‘Referer’ should be IP address for request.
2.2 Device Information

/data/device_info/slot_index

Description Retrieves the device information including the I/O module slots.
URL Structure https://{ip address}/data/device_info
https://{ip address}/data/device_info /slot_index
where index = 0: the on-board module
1 ~: the identifier of I/O extension slot

HTTP Method GET:Returns the representation of all I/O module slots information resource.
PATCH: Set date/time/timezone.
GET Multi Slot Request:
GET / data/device_info
Single Slot Request:
GET / data/device_info /slot_index

[Example]:
⚫ Request: GET / data/device_info

Content-type: application/json
Response: 200 OK
{
"slot_0": {
"SL": 0,
"Id": "ADAM-3600-C2GL1A1E",
"DIn": 8,
"DOn": 4,
"AIn": 8,
"AOn": 0,
"FwVer": "01010168",
"Tm": "2016-04-07T03:34:36+08:00",
"Tz": "/Asia/Shanghai"
},
"slot_1": {
"SL": 1,
"Id": "ADAM-3617",
"DIn": 0,
"DOn": 0,
"AIn": 4,
"AOn": 0,
"FwVer": "01010170"
},
"slot_2": {
"SL": 2,
"Id": "ADAM-3618",
"DIn": 0,
"DOn": 0,
"AIn": 4,
"AOn": 0,
"FwVer": "01010173"
},
"slot_4": {
"SL": 4,
"Id": "ADAM-3624",
"DIn": 0,
"DOn": 0,
"AIn": 0,
"AOn": 4,
"FwVer": "01010176"
}
}

⚫ Request: GET /data/device_info/slot_0

Content-type: application/json
Response: 200 OK
{
"SL": 0,
"Id": "ADAM-3600-C2GL1A1E",
"DIn": 8,
"DOn": 4,
"AIn": 8,
"AOn": 0,
"FwVer": "01010168",
"Tm": "2016-04-07T03:38:29+08:00",
"Tz": "/Asia/Shanghai"
}

PUT None
POST None
PATCH Request:PATCH /data/device_info/slot_0

[Example]:
⚫ Request: PATCH /data/device_info/slot_0, configure time/date/time zone.
Content-type: application/json
{
"Tm": "2016-04-07T03:38:29+08:00",
"Tz": "/Asia/Shanghai"
}

Response: 200 OK

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
Slot Number SL Number R 0, 1 ~: Slot number.
Model ID Id String R Model ID.
For example,
“ADAM-3600- slot_0: core module
C2GL1A1E”
“ADAM-3617” slot_1 ~: extension slots
“ADAM-3656” slot_1 ~: extension slots
Total DI Number DIn Number R 0, 1 ~: Digital input channel number.
Total DO Number DOn Number R 0, 1 ~: Digital output channel number.
Total AI Number AIn Number R 0, 1 ~: Analog input channel number.
Total AO Number Aon Number R 0, 1 ~: Analog output channel number.
Firmware Version FwVer String R Version information of main firmware image.
Local Time and Date Tm String RW Note: Only for slot_0 (on board device)

Following ISO 8601 which is endorsed by W3C and


RFC 3339.
Complete date plus hours, minutes and seconds:
YYYY-MM-DDThh:mm:ssTZD
where:
YYYY = four-digit year
MM = two-digit month (01=January, etc.)
DD = two-digit day of month (01 through 31)
hh = two digits of hour (00 through 23)
(am/pm NOT allowed)
mm = two digits of minute (00 through 59)
ss = two digits of second (00 through 59)
TZD = time zone designator (Z or +hh:mm or -
hh:mm)

For example,
“1994-11-05T08:15:30-05:00” corresponds to
November 5, 1994, 8:15:30 am, US Eastern Standard
Time.
Time zone Tz String RW Note: Only for slot_0 (on board device)
/Asia/Shanghai.

Remarks
2.3 Device Control

/sys/control

2.3.1 Restart

/sys/control/rst

Description The system can be controlled by command objects.


URL Structure https://{ip address}/sys/control/rst
HTTP Method PATCH:Send the control command to module.
GET None
PUT None
POST None
PATCH Request:PATCH /sys/control/rst

[Example]:
⚫ Request: PATCH /sys/control, Restart the module.
Content-type: application/json
{
"Rst":"1"
}

Response: 200 OK

⚫ Resource value definitions:


Abbreviatio Data
Field Property Description
n Type
System Restart Rst String W 1: Restart the system

Remarks

2.3.2 Calibration

/sys/control/cali

Description The system can be controlled by command objects.


URL Structure https://{ip address}/sys/control/cali
HTTP Method PATCH:Send the control command to module.
GET None
PUT None
POST None
PATCH Request:PATCH /sys/control/cali

[Example]:
⚫ Request: PATCH /sys/control/cali, calibrate the AI/AO module.
Content-type: application/json
{
"Mid":"1",
"Cid":"1",
"Rng":"1",
"Calmd ":"1",
"Iot ":"1",
}

Response: 200 OK

⚫ Resource value definitions:


Data
Field Abbreviation Property Description
Type
Module Id Mid String W 0~4: Module id
Channel Id Cid String W 0 ~7: Channel id.

Range Code Rng String W Range code


1 V_Neg10To10

3 V_Neg2pt5To2pt5

7 V_0To10

33 mA_0To20

34 mA_4To20

0x8028 Btype_200To1820C

0x8020 Etype_Neg270To1000C

0x801D Jtype_Neg210To1200C

0x801E Ktype_Neg270To1372C

0x8029 Ntype_Neg100To100C

0x8025 Rtype_0To1768C

0x8026 Stype_0To1768C

0x801F Ttype_Neg270To400C
Calibration Calmd String W Calibration mode
mode 1 SaveCaliValToFlash
1 AoSaveCaliValToFlash
3 WriteFacCaliValToUser
0x5500 ZeroCalibration
0xAA00 SpanCalibration
0x55 AoOutputSpanValue
0xAA AoCalibreateSpanValue
IO type Iot String W Range code
0 AI

1 AO

Remarks
2.4 Analog Input

2.4.1 AI - Data Acquisition

/data/ai_value/slot_index/ch_num

Description Retrieves information about the analog input value resource on specific slot.
URL https://{ip address}/data/ai_value/slot_index
Structure https://{ip address}/data/ai_value/slot_index/ch_num
where index = 0: the core module
1 ~ n: the identifier of I/O extension slot
where num = 0 ~ n: the channel number
HTTP GET:Returns the representation of all analog input value resource.
Method PUT:None
PATCH:Apply partial modifications to analog input value resource.
GET Multi-Channel Request:
GET /data/ai_value/slot_index
Single Channel Request:
GET /data/ai_value/slot_index/ch_num

[Example]:
⚫ Request: GET /data/ai_value/slot_0

Content-type: application/json
Response: 200 OK
{
"AIVal": [
{
"Ch":0,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA": 0,
"HiA": 0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
},
{
"Ch":1,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA":0,
"HiA":0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
},
{
"Ch":2,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA":0,
"HiA":0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
},
{
"Ch":3,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA":0,
"HiA":0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
},
{
"Ch":4,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA":0,
"HiA":0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
}
]
}

⚫ Request: GET /data/ai_value/slot_0/ch_2

Content-type: application/json
Response: 200 OK
{
"Ch":2,
"En":0,
"Rng":1,
"Val":32765,
"Eg":0,
"Evt":0,
"LoA":0,
"HiA":0,
"HVal":0,
"HEg":0,
"LVal":0,
"LEg":0,
"SVal":0,
"ClrH": 0,
"ClrL": 0
}
PUT Single Channel Request:
PUT /data/ai_value/slot_index/ch_num

[Example]:
⚫ Request: PUT /data/ai_value/slot_0/ch_3
Content-type: application/json
{
"Rng":"1"
}

Response: 200 OK
POST None
PATCH None
⚫ JSON array name definition:
Field Abbreviation Data Type
Array of Analog input configurations AIVal Array

⚫ Resource value definitions (Total channels = AI channel number + 1 average channel):


Data
Field Abbreviation Property Description
Type
Channel Number Ch Number R 0, 1, …: Analog input channel number.
Note for the average channel:
The average channel number for a 4-ch AI
module is 4.
Input Range Rng Number RW Analog input range.
Range code
1 +/- 10 V
3 +/- 2.5 V
33 4 ~ 20 mA
34 0 ~ 20 mA
Channel Enable En* Number R 1 / 0: Enable / Disable AI conversion
Notice: Average channel is read only. When
channel mask of average is not 0, the value is 1.
Channel Raw Value Val Number R 0 ~ 65535 :AI measurement data (Raw data)
Channel Engineering Eg* Number R AI engineering data, the value is 1/1000 scale.
data For example,
1630 → 1.63
Channel Event Status Evt Number R AI statuses

Low Alarm Status LoA* Number R Low alarm status


Read 1 : low alarm occurred.
0 : not occurred
Write 0 : clear the low alarm status
High Alarm Status HiA* Number R High alarm status
Read 1 : high alarm occurred.
0 : not occurred
Write 0 : clear the high alarm status
Maximum AI Raw HVal* Number R AI max. measurement data (Raw data)
Value
Maximum AI HEg* Number R AI max. engineering data, the value is 1/1000
Engineering data scale
For example,
10200→10.2
Minimum AI Raw LVal* Number R AI min. measurement data (Raw data)
Value
Minimum AI Leg* Number R AI min. engineering data, the value is 1/1000
Engineering data scale
For example,
250 → 0.25
Channel Raw Value SVal* Number R 0 ~ 65535 : AI measurement data (Raw data)
After Scaling after scaling
Clear Maximum AI ClrH* Number R 1 : Clear the Maximum AI value
Value
Clear Minimum AI ClrL* Number R 1 : Clear the Minimum AI value
Value
Remarks *:Unused in Edgelink devices, just keep consistent with other products.
2.5 Analog output

2.5.1 AO - Data Acquisition

/data/ao_value/slot_index/ch_num

Description Retrieves information about the analog input value resource on specific slot.
URL Structure https://{ip address}/data/ao_value/slot_index
https://{ip address}/data/ao_value/slot_index/ch_num
where index = 0: the core module
1 ~ n: the identifier of I/O extension slot
where num = 0 ~ n: the channel number
HTTP Method GET:Returns the representation of all analog output value resource.
PUT:None
PATCH:Apply partial modifications to analog input value resource.
GET Multi-Channel Request:
GET /data/ao_value/slot_index
Single Channel Request:
GET /data/ao_value/slot_index/ch_num

[Example]:
⚫ Request: GET /data/ao_value/slot_0

Content-type: application/json
Response: 200 OK
{
"AIVal": [
{
"Ch":0,
"Rng":1,
"Val":148,
},
{
"Ch":1,
"Rng":1,
"Val":0,
},
{
"Ch":2,
"Rng":1,
"Val":0,
},
{
"Ch":3,
"Rng":1,
"Val":0,
}
]
}

⚫ Request: GET /data/ao_value/slot_0/ch_2

Content-type: application/json
Response: 200 OK
{
"Ch":2,
"Rng":328,
"Val":0,
}
PUT Single Channel Request:
PUT /data/ao_value/slot_index/ch_num

[Example]:
⚫ Request: PUT /data/ao_value/slot_0/ch_3
Content-type: application/json
{
"Rng":"1",
}
{
"Val": "65535",
}

Response: 200 OK
POST None
PATCH None
⚫ JSON array name definition:
Field Abbreviation Data Type
Array of Analog input configurations AOVal Array

⚫ Resource value definitions (Total channels = AO channel number + 1 average channel):


Field Abbreviation Data Type Property Description
Channel Number Ch Number R 0, 1, …: Analog output channel number.
Note for the average channel:
The average channel number for a 4-ch AI module
is 4.
Input Range Rng Number RW Analog input range.
Range code
7 0~ 10 V
33 4 ~ 20 mA
34 0 ~ 20 mA
Channel Raw Value Val Number RW 0 ~ 65535: AO data (Raw data)

Remarks
2.6 Digital input

2.6.1 DI - Data Acquisition

/data/di_value/slot_index/ch_num

Description Retrieves information about the digital input value resource on specific slot.
URL https://{ip address}/data/di_value/slot_index
Structure https://{ip address}/ data/di_value/slot_index/ch_num
where index = 0: the core module
1 ~: the identifier of I/O extension slot
where num = 0 ~: the channel number
HTTP GET:Returns the representation of all digital input value resource.
Method PUT:Replace all digital input value resource
PATCH:Apply partial modifications to digital input value resource.

GET Multi-channel Request:


GET /data/di_value/slot_index
Single Channel Request:
GET /data/di_value/slot_index/ch_num

[Example]:
⚫ Request: GET /data/di_value/slot_0

Content-type: application/json
Response: 200 OK
{
"DIVal": [
{
"Ch":0,
"Md":0,
"Stat":1,
"Val":1,
"Cnting":0,
"ClrCnt":0,
"OvLch": 0
},
{
"Ch":1,
"Md":0,
"Stat":0,
"Val":0,
"Cnting":0,
"ClrCnt":0,
"OvLch": 0
},
{
"Ch":2,
"Md":0,
"Stat":0,
"Val":0,
"Cnting":1,
"ClrCnt":0,
"OvLch": 0
},
{
"Ch":3,
"Md":0,
"Stat":0,
"Val":1,
"Cnting":0,
"ClrCnt":0,
"OvLch": 0
}
]
}

⚫ Request: GET /di_value/slot_0/ch_2

Content-type: application/json
Response: 200 OK
{
"Ch":2,
"Md":0,
"Stat":1,
"Val":1,
"Cnting":0,
"ClrCnt":0,
"OvLch": 0
}

PUT Single Channel Request:


PUT /data/di_value/slot_index/ch_num
[Example]:
⚫ Request: PUT /data/di_value/slot_0/ch_2
Content-type: application/json
{
"Md":"1",
}
Response: 200 OK
{
"Cnting":"1",
}
Response: 200 OK
POST None
PATCH None

⚫ JSON array name definition:


Field Abbreviation Data Type
Array of Digital input configurations DIVal Array

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
Channel Number Ch Number R 0, 1, …: Digital input channel number.
Mode Md Number RW Digital input mode.
0 DI
1 Counter
Signal Logic Status Stat Number R 1, 0: Input signal is Logic High or Low.
Channel Value Val Number R DI measurement data

Input Mode Value Description


DI Logic status of DI
Counter Counter value
Start Counter Cnting Number RW Start/Stop counter counting
Read 1: counter is counting
0: not counting
Write 1: start counting
0: stop counting
Clear Counter ClrCnt Number W 1: Clear the counter value
Get/Clear Counter OvLch* Number RW counter overflow or latch status
Overflow or Latch Read 1: overflow/latch occurred.
0: no overflow or latch
Status Write 0: clear the overflow or latch status

Remarks *:Unused in Edgelink devices, just keep consistent with other products.
2.7 Digital output

2.7.1 DO - Data Acquisition

/data/do_value/slot_index/ch_num

Description Retrieves information about the digital input value resource on specific slot.
URL https://{ip address}/data/do_value/slot_index
Structure https://{ip address}/data/do_value/slot_index/ch_num
where index = 0: the core module
1 ~n: the identifier of I/O extension slot
where num = 0 ~n: the channel number
HTTP GET:Returns the representation of all digital output value resource.
Method PUT:Replace all digital output value resource
PATCH:Apply partial modifications to digital output value resource.
GET Multi-Channel Request:
GET /data/do_value/slot_index
Single Channel Request:
GET /data/do_value/slot_index/ch_num

[Example]:
⚫ Request: GET /data/do_value/slot_0

Content-type: application/json
Response: 200 OK
{
"DOVal": [
{
"Ch":0,
"Md":0,
"Stat":1,
"Val":1,
"PsCtn":0,
"PsStop":0,
"PsLo": 5000,
"PsHi": 5000,
"PsIV": 0
},
{
"Ch":1,
"Md":0,
"Stat":0,
"Val":0,
"PsCtn":0,
"PsStop":0,
"PsLo": 5000,
"PsHi": 5000,
"PsIV": 0
},
{
"Ch":2,
"Md":0,
"Stat":0,
"Val":0,
"PsCtn":0,
"PsStop":0,
"PsLo": 5000,
"PsHi": 5000,
"PsIV": 0
},
{
"Ch":3,
"Md":0,
"Stat":0,
"Val":1,
"PsCtn":0,
"PsStop":0,
"PsLo": 5000,
"PsHi": 5000,
"PsIV": 0
}
]
}

⚫ Request: GET /data/do_value/slot_0/ch_2

Content-type: application/json
Response: 200 OK
{
"Ch":2,
"Md":0,
"Stat":1,
"Val":1,
"PsCtn":0,
"PsStop":0,
"PsLo": 5000,
"PsHi": 5000,
"PsIV": 0
}
PUT Single Channel Request:
PUT /data/do_value/slot_index/ch_num
[Example]:
⚫ Request: PUT /data/do_value/slot_0/ch_2
Content-type: application/json
{
"Md":"0",
}
Response: 200 OK

{
"Val":"0",
}

Response: 200 OK

POST None
PATCH None

⚫ JSON array name definition:


Field Abbreviation Data Type
Array of Digital input configurations DOVal Array

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
Channel Number Ch Number R 0, 1, …: Digital output channel number.
Mode Md Number RW Digital output mode.
0 DO
1 Pulse Output

Signal Logic Status Stat Number R 1, 0: Output signal is Logic High or Low.
Channel Value Val Number RW DO measurement data

Output Mode Value Description


DO Get the current signal
status or set its status
Pulse Output Get or set the absolute
pulse count value 0-232
Pulse Output PsCtn Number RW 1 / 0: Pulse outputting is continuous or not.
Continue State Write 1: start pulse out
0: stop pulse out
Stop Pulse Output PsStop* Number W 1: Stop the pulse outputting.
(Continue is disabled, Absolute and
incremental values are reset to zero. DO signal
status is set to logic low.)
Low Signal Width PsLo Number RW Low signal width of pulse
1 - 65535 (0.1 ms)
High Signal Width PsHi Number RW High signal width of pulse
1 - 65535 (0.1 ms).
Incremental Pulse PsIV* Number RW Incremental Pulse Output Value
Output Value
Remarks *:Unused in Edgelink devices, just keep consistent with other products.
2.8 Tag Information

2.8.1 Tag - Data Acquisition

/data/tags

Description Retrieves information about the system tag resource on edgelink device.
URL Structure https://{ip address}/data/tags
HTTP Method GET:Returns the representation of all of tags resources include value, quality, and
timestamp
GET Multi-Tag Request:
GET / data/tags

[Example]:
⚫ Request: GET /data/tags
Content-type: application/json
Response: 200 OK
{
"#SYS_UPTIME": {
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "298",
"quality": "0000H",
"timestamp": "1670204923.768992",
"readwrite": "1"
},
"#SYS_CURRENT_TIME": {
"name": "#SYS_CURRENT_TIME",
"type": "System Tag",
"value": "1670204923",
"quality": "0000H",
"timestamp": "1670204923.769002",
"readwrite": "1"
},
"#SYS_CPU_FREQ": {
"name": "#SYS_CPU_FREQ",
"type": "System Tag",
"value": "597600000",
"quality": "0000H",
"timestamp": "1670204689.725974",
"readwrite": "1"
},
"#SYS_MEM_SIZE": {
"name": "#SYS_MEM_SIZE",
"type": "System Tag",
"value": "242.68 MB",
"quality": "0000H",
"timestamp": "1670204689.726412",
"readwrite": "1"
},
"#SYS_CPU_USED": {
"name": "#SYS_CPU_USED",
"type": "System Tag",
"value": "8.01%",
"quality": "0000H",
"timestamp": "1670204923.811514",
"readwrite": "1"
},
"#SYS_CPU_IOWAIT": {
"name": "#SYS_CPU_IOWAIT",
"type": "System Tag",
"value": "0.01%",
"quality": "0000H",
"timestamp": "1670204861.001783",
"readwrite": "1"
},
"#SYS_MEM_USED": {
"name": "#SYS_MEM_USED",
"type": "System Tag",
"value": "17.41%",
"quality": "0000H",
"timestamp": "1670204923.811745",
"readwrite": "1"
},
"#SYS_SYSCARD_CAPACITY": {
"name": "#SYS_SYSCARD_CAPACITY",
"type": "System Tag",
"value": "908.00 MB",
"quality": "0000H",
"timestamp": "1670204689.727537",
"readwrite": "1"
},
"#SYS_SYSCARD_FREE_SPACE": {
"name": "#SYS_SYSCARD_FREE_SPACE",
"type": "System Tag",
"value": "204.84 MB",
"quality": "0000H",
"timestamp": "1670204689.727581",
"readwrite": "1"
},
"#SYS_DATACARD_CAPACITY": {
"name": "#SYS_DATACARD_CAPACITY",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8004H",
"timestamp": "1670204689.727635",
"readwrite": "1"
},
"#SYS_DATACARD_FREE_SPACE": {
"name": "#SYS_DATACARD_FREE_SPACE",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8004H",
"timestamp": "1670204689.727664",
"readwrite": "1"
},
"#SYS_NODE_ID": {
"name": "#SYS_NODE_ID",
"type": "System Tag",
"value": "161",
"quality": "0000H",
"timestamp": "1670204689.734325",
"readwrite": "1"
},
……
}

⚫ Request: GET /data/tags/%23SYS_UPTIME


Content-type: application/json
Response: 200 OK
{
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "640",
"quality": "0000H",
"timestamp": "1670205265.254424",
"readwrite": "1"
}
PUT Set the number of significant digits after the decimal point of double type for tag
value:

PUT /data/tags
[Example]:
⚫ Request: PUT /data/tags
Content-type: application/json
{
"digits": 2,
}
Response: 200 OK

POST None
PATCH None

Note

⚫ Resource value definitions:


Data
Field Abbreviation Property Description
Type
value value String R Tag value
type type String R Tag type:
System Tag
IO Tag
User Tag
Calc Tag
quality quality String R Tag quality.
0000H OK
0001H QLTY_OVER_RANGE
0002H QLTY_UNDER_RANGE
0003H QLTY_OPEN_LOOP
0004H QLTY_SHORTED_LOOP
8001H QLTY_RESTART
8002H QLTY_DRIVER_LOAD_FAILED
8003H QLTY_PORT_OPEN_FAILED
8004H QLTY_DEVICE_ERROR
8005H QLTY_CONVERSION_CODE_ERROR
8006H QLTY_CONVERSION_ERROR
8007H QLTY_DATA_TYPE_ERROR
8008H QLTY_DATA_SIZE_ERROR
8009H QLTY_DATA_ERROR
800aH QLTY_CHECKSUM_ERROR
800bH QLTY_MSG_SEQ_ERROR
8080H QLTY_NO_OWNER
8081H QLTY_DISCONNECTED
8100H QLTY_DRIVER_SEPCIFIED
timestamp timestamp String R Tag timestamp
readwrite readwrite String R Tag Property: 1: read only, 3: read -write
digits digits Number W The number of significant digits after the decimal
point.
Range: 0~16.
Remark

2.8.2 System/User/IO/Calc Tag - Data Acquisition

/data/tags?systag

/data/tags?iotag

/data/tags?usertag

/data/tags?calctag

/data/tags/{tag_name}/name

/data/tags/{tag_name}/type

/data/tags/{tag_name}/value

/data/tags/{tag_name}/quality

/data/tags/{tag_name}/timestamp

/data/tags/{tag_name}/readwrite

Description Retrieves information about tag resource on edgelink device.


URL Structure https://{ip address}/data/tags/{tag_name}/name
https://{ip address}/data/tags/{tag_name}/type
https://{ip address}/data/tags/{tag_name}/value
https://{ip address}/data/tags/{tag_name}/quality
https://{ip address}/data/tags/{tag_name}/timestamp
https://{ip address}/data/tags/{tag_name}/readwrite
where {tag_name}: tag name defined in DataCenter

HTTP Method GET:Returns the representation of all io tag, user tag or calc tag resources
include value, quality, and timestamp
GET Multi-Tag Request:
GET / data/tags?systag
GET / data/tags?iotag
GET / data/tags?usertag
GET / data/tags?calctag

Single Tag Request:


GET /data/ tags/{tag_name}/

Single Resource Request:


GET /data/tags{tag_name}/name
GET /data/tags/{tag_name}/type
GET /data/tags/{tag_name}/value
GET /data/tags/{tag_name}/quality
GET /data/ tags/{tag_name}/timestamp
GET /data/ tags{tag_name}/readwrite
[Example]:
⚫ Request: GET /data/tags?iotag
Content-type: application/json
Response: 200 OK
{
"BoardIO:AI_0": {
"name": "BoardIO:AI_0",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_1": {
"name": "BoardIO:AI_1",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_2": {
"name": "BoardIO:AI_2",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_3": {
"name": "BoardIO:AI_3",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_4": {
"name": "BoardIO:AI_4",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_5": {
"name": "BoardIO:AI_5",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_6": {
"name": "BoardIO:AI_6",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:AI_7": {
"name": "BoardIO:AI_7",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
},
"BoardIO:DI_0": {
"name": "BoardIO:DI_0",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_1": {
"name": "BoardIO:DI_1",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_2": {
"name": "BoardIO:DI_2",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_3": {
"name": "BoardIO:DI_3",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_4": {
"name": "BoardIO:DI_4",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_5": {
"name": "BoardIO:DI_5",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_6": {
"name": "BoardIO:DI_6",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DI_7": {
"name": "BoardIO:DI_7",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.580872",
"readwrite": "1"
},
"BoardIO:DO_0": {
"name": "BoardIO:DO_0",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.595945",
"readwrite": "3"
},
"BoardIO:DO_1": {
"name": "BoardIO:DO_1",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.595945",
"readwrite": "3"
},
"BoardIO:DO_2": {
"name": "BoardIO:DO_2",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.595945",
"readwrite": "3"
},
"BoardIO:DO_3": {
"name": "BoardIO:DO_3",
"type": "IO Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670206722.595945",
"readwrite": "3"
}

}
⚫ Request: GET /data/tags/BoardIO:AI_0/
Content-type: application/json
Response: 200 OK
{
"name": "BoardIO:AI_0",
"type": "IO Tag",
"value": "-10.0000",
"quality": "0000H",
"timestamp": "1670206722.563118",
"readwrite": "1"
}
⚫ Request: GET /data/tags/%23SYS_UPTIME
Content-type: application/json
Response: 200 OK
{
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "640",
"quality": "0000H",
"timestamp": "1670205265.254424",
"readwrite": "1"
}

PUT Single tag Request:


PUT /data/tags/tag_name/value
[Example]:
⚫ Request: PUT /data/tags/BoardIO:AI_0/value
Content-type: application/json
{
"value": "2.00",
}

Response: 200 OK

POST None

PATCH None
⚫ Resource value definitions:
Abbreviati Data Propert
Field Description
on Type y
value value String RW Tag value
type type Strin R Tag type:
g System Tag
IO Tag
User Tag
Calc Tag
quality quality String R Tag quality.
0000H OK
0001H QLTY_OVER_RANGE
0002H QLTY_UNDER_RANGE
0003H QLTY_OPEN_LOOP
0004H QLTY_SHORTED_LOOP
8001H QLTY_RESTART
8002H QLTY_DRIVER_LOAD_FAILED
8003H QLTY_PORT_OPEN_FAILED
8004H QLTY_DEVICE_ERROR
8005H QLTY_CONVERSION_CODE_ERROR
8006H QLTY_CONVERSION_ERROR
8007H QLTY_DATA_TYPE_ERROR
8008H QLTY_DATA_SIZE_ERROR
8009H QLTY_DATA_ERROR
800aH QLTY_CHECKSUM_ERROR
800bH QLTY_MSG_SEQ_ERROR
8080H QLTY_NO_OWNER
8081H QLTY_DISCONNECTED
8100H QLTY_DRIVER_SEPCIFIED
readwrite readwrite String R Tag Property: 1: read only, 3: read-write
timestamp timestamp String R Tag timestamp
Remarks For [#] mark: Some time use %23 instead of escape character #.

2.8.3 Tag Search

/data/tags?{query string}

Description Search tags according to different conditions in query string.


URL Structure https://{ip address}/data/tags
HTTP Method GET:Returns the tag information according to the query string.
GET Tag Counts Request:
GET /data/tags?_count=total
GET /data/tags?name={tag name}&_count=total
GET /data/tags?iotag&_count=total
GET /data/tags?iotag&select=name&_count=total

Tag Name Request:


GET /data/tags?systag&select=name
GET /data/tags?iotag&select=name&name={tag name}

Tag Information Request:


GET /data/tags?taglist={tag name1}&{tag name2}&…
GET /data/tags?_page_no=1&_page_size=10
GET /data/tags?iotag
GET /data/tags?iotag&_port_dev=1_1
GET /data/tags?iotag&_page_no=1&_page_size=10
GET /data/tags?name={tag name}

GET /data/tags?_v2&taglist={tag name1}&{tag name2}&…


GET /data/tags?_v2&_page_no=1&_page_size=10
GET /data/tags?_v2
GET /data/tags?_v2&iotag
GET /data/tags?_v2&iotag&_port_dev=1_1
GET /data/tags?_v2&iotag&_page_no=1&_page_size=10
GET /data/tags?_v2&name={tag name}

[Example]:
⚫ Request: GET /data/tags?_count=total
Content-type: application/json
Response: 200 OK
{
99
}

⚫ Request: GET /data/tags?name= SYS_UPTIME&_count=total


Content-type: application/json
Response: 200 OK
{
1
}

⚫ Request: GET /data/tags?systag&select=name


Content-type: application/json
Response: 200 OK
[
"#SYS_UPTIME",
"#SYS_CURRENT_TIME",
"#SYS_CPU_FREQ",
"#SYS_MEM_SIZE",
"#SYS_CPU_USED",
"#SYS_CPU_IOWAIT",
"#SYS_MEM_USED",
"#SYS_SYSCARD_CAPACITY",
"#SYS_SYSCARD_FREE_SPACE",
"#SYS_DATACARD_CAPACITY",
"#SYS_DATACARD_FREE_SPACE",
"#SYS_NODE_ID",
"#SYS_ROOT_READONLY",
"#SYS_COM_COUNT",
"#SYS_LAN_COUNT",
"#SYS_DEFAULT_IF",
"#MOBILE_SIM",
"#MOBILE_IP",
"#MOBILE_MNO",
"#MOBILE_MNT",
"#MOBILE_MDT",
"#MOBILE_MPN",
"#MOBILE_SIGNAL_QUALITY",
"#MOBILE_CSQ",
"#MOBILE_MCC",
"#MOBILE_MNC",
"#MOBILE_LAC",
"#MOBILE_CID",
"#MOBILE_IMSI",
"#MOBILE_IMEI",
"#MOBILE_IMEI_RAW",
"#MOBILE_USBID",
"#MOBILE_DATA_DAY",
"#MOBILE_DATA_MONTH",
"#MOBILE_DATA_YEAR",
"#WLAN0_SIGNAL_QUALITY",
"#WLAN0_SIGNAL_LEVEL",
"#WLAN0_SIGNAL_NOISE",
"#WLAN0_SIGNAL_BITRATE",
"#ICDM_COM1_SCORE",
"#ICDM_COM2_SCORE",
"#ICDM_COM3_SCORE",
"#ICDM_LAN1_SCORE",
"#ICDM_LAN1_LINK",
"#ICDM_LAN2_SCORE",
"#ICDM_LAN2_LINK",
"#GPS_LATITUDE",
"#GPS_LONGITUDE",
"#GPS_ALTITUDE",
"#GPS_SPEED",
"#GPS_COURSE",
"#GPS_SATELLITE",
"#SYS_BATTERY_LOW",
"#SYS_TIME_SECOND",
"#SYS_TIME_MINUTE",
"#SYS_TIME_HOUR",
"#SYS_TIME_DAY",
"#SYS_TIME_MONTH",
"#SYS_TIME_YEAR",
"#SYS_TIME_WDAY",
"#SYS_TIME_YDAY",
"#SYS_TIME_ISDST",
"#SYS_TIME_GMT_OFFSET",
"#DATALOG_ENABLE",
"#DATALOG_ERROR",
"#SYS_MAC_LAN1",
"#SYS_MAC_LAN2",
"#SYS_TFCARD_CAPACITY",
"#SYS_TFCARD_FREE_SPACE",
"#SYS_SDCARD_CAPACITY",
"#SYS_SDCARD_FREE_SPACE",
"#DISABLE_DEVICE_BoardIO",
"#BATCH_WRITE_BoardIO",
"#DEVICE_ERROR_BoardIO",
"#DISABLE_PORT_ADAM-3600-C2GL1A1E",
"#DISABLE_PORT_COM1",
"#DISABLE_PORT_COM2",
"#DISABLE_PORT_COM3",
"#DISABLE_PORT_TCP"
]
⚫ Request: GET
/data/tags?taglist=#SYS_UPTIME&#SYS_CURRENT_TIME
Content-type: application/json
Response: 200 OK
{
"#SYS_UPTIME": {
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "15985",
"quality": "0000H",
"timestamp": "1670220609.916803",
"readwrite": "1"
},
"#SYS_CURRENT_TIME": {
"name": "#SYS_CURRENT_TIME",
"type": "System Tag",
"value": "1670220609",
"quality": "0000H",
"timestamp": "1670220609.916813",
"readwrite": "1"
}
}
⚫ Request: GET
/data/tags?_v2&taglist=#SYS_UPTIME&#SYS_CURRENT_TIME
Content-type: application/json
Response: 200 OK
[
{
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "22587",
"quality": "0000H",
"timestamp": "1679988061.540029",
"readwrite": "1"
},
{
"name": "#SYS_CURRENT_TIME",
"type": "System Tag",
"value": "1679988061",
"quality": "0000H",
"timestamp": "1679988061.239660",
"readwrite": "1"
}
]

⚫ Request: GET /data/tags?_page_no=1&_page_size=10


Content-type: application/json
Response: 200 OK
{
"#SYS_UPTIME": {
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "16246",
"quality": "0000H",
"timestamp": "1670220871.002871",
"readwrite": "1"
},
"#SYS_CURRENT_TIME": {
"name": "#SYS_CURRENT_TIME",
"type": "System Tag",
"value": "1670220871",
"quality": "0000H",
"timestamp": "1670220871.002880",
"readwrite": "1"
},
"#SYS_CPU_FREQ": {
"name": "#SYS_CPU_FREQ",
"type": "System Tag",
"value": "597600000",
"quality": "0000H",
"timestamp": "1670204689.725974",
"readwrite": "1"
},
"#SYS_MEM_SIZE": {
"name": "#SYS_MEM_SIZE",
"type": "System Tag",
"value": "242.68 MB",
"quality": "0000H",
"timestamp": "1670204689.726412",
"readwrite": "1"
},
"#SYS_CPU_USED": {
"name": "#SYS_CPU_USED",
"type": "System Tag",
"value": "5.00%",
"quality": "0000H",
"timestamp": "1670220871.041042",
"readwrite": "1"
},
"#SYS_CPU_IOWAIT": {
"name": "#SYS_CPU_IOWAIT",
"type": "System Tag",
"value": "0.01%",
"quality": "0000H",
"timestamp": "1670218819.731185",
"readwrite": "1"
},
"#SYS_MEM_USED": {
"name": "#SYS_MEM_USED",
"type": "System Tag",
"value": "17.54%",
"quality": "0000H",
"timestamp": "1670220868.842525",
"readwrite": "1"
},
"#SYS_SYSCARD_CAPACITY": {
"name": "#SYS_SYSCARD_CAPACITY",
"type": "System Tag",
"value": "908.00 MB",
"quality": "0000H",
"timestamp": "1670204689.727537",
"readwrite": "1"
},
"#SYS_SYSCARD_FREE_SPACE": {
"name": "#SYS_SYSCARD_FREE_SPACE",
"type": "System Tag",
"value": "204.84 MB",
"quality": "0000H",
"timestamp": "1670204689.727581",
"readwrite": "1"
},
"#SYS_DATACARD_CAPACITY": {
"name": "#SYS_DATACARD_CAPACITY",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8004H",
"timestamp": "1670204689.727635",
"readwrite": "1"
}
}
⚫ Request: GET /data/tags?name=UPTIME
Content-type: application/json
Response: 200 OK
{
"#SYS_UPTIME": {
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "16449",
"quality": "0000H",
"timestamp": "1670221074.719794",
"readwrite": "1"
}
}
⚫ Request: GET /data/tags?name=UPTIME&_whole=1
Content-type: application/json
Response: 200 OK
{}

⚫ Request: GET /data/tags?name=uptime&_whole=0&_case=0


Content-type: application/json
Response: 200 OK
{
"#SYS_UPTIME": {
"name": "#SYS_UPTIME",
"type": "System Tag",
"value": "16449",
"quality": "0000H",
"timestamp": "1670221074.719794",
"readwrite": "1"
}
}
⚫ Request: GET
/data/tags?page_no=1&_page_size=10&_order_by=aes
Content-type: application/json
Response: 200 OK
{
"#BATCH_WRITE_BoardIO": {
"name": "#BATCH_WRITE_BoardIO",
"type": "System Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670204688.305426",
"readwrite": "3"
},
"#DATALOG_ENABLE": {
"name": "#DATALOG_ENABLE",
"type": "System Tag",
"value": "0.0000",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "1"
},
"#DATALOG_ERROR": {
"name": "#DATALOG_ERROR",
"type": "System Tag",
"value": "0.0000",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "1"
},
"#DEVICE_ERROR_BoardIO": {
"name": "#DEVICE_ERROR_BoardIO",
"type": "System Tag",
"value": "0x0000",
"quality": "0000H",
"timestamp": "1670204688.490452",
"readwrite": "1"
},
"#DISABLE_DEVICE_BoardIO": {
"name": "#DISABLE_DEVICE_BoardIO",
"type": "System Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670204688.305426",
"readwrite": "3"
},
"#DISABLE_PORT_ADAM-3600-C2GL1A1E": {
"name": "#DISABLE_PORT_ADAM-3600-C2GL1A1E",
"type": "System Tag",
"value": "0",
"quality": "0000H",
"timestamp": "1670204688.303582",
"readwrite": "3"
},
"#DISABLE_PORT_COM1": {
"name": "#DISABLE_PORT_COM1",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "3"
},
"#DISABLE_PORT_COM2": {
"name": "#DISABLE_PORT_COM2",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "3"
},
"#DISABLE_PORT_COM3": {
"name": "#DISABLE_PORT_COM3",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "3"
},
"#DISABLE_PORT_TCP": {
"name": "#DISABLE_PORT_TCP",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "0.000000",
"readwrite": "3"
}
}

PUT None

POST None
PATCH None

Note
⚫ Resource value definitions:
Data
Field Abbreviation Property Description
Type
Tag value value String R Tag value
Tag type type String R Tag type:
System Tag
IO Tag
User Tag
Calc Tag
Tag quality String R Tag quality.
quality 0000H OK
0001H QLTY_OVER_RANGE
0002H QLTY_UNDER_RANGE
0003H QLTY_OPEN_LOOP
0004H QLTY_SHORTED_LOOP
8001H QLTY_RESTART
8002H QLTY_DRIVER_LOAD_FAILED
8003H QLTY_PORT_OPEN_FAILED
8004H QLTY_DEVICE_ERROR
8005H QLTY_CONVERSION_CODE_ERROR
8006H QLTY_CONVERSION_ERROR
8007H QLTY_DATA_TYPE_ERROR
8008H QLTY_DATA_SIZE_ERROR
8009H QLTY_DATA_ERROR
800aH QLTY_CHECKSUM_ERROR
800bH QLTY_MSG_SEQ_ERROR
8080H QLTY_NO_OWNER
8081H QLTY_DISCONNECTED
8100H QLTY_DRIVER_SEPCIFIED
Tag timestamp String R Tag timestamp
timestamp
Tag readwrite String R Tag Property: 1: read only, 3: read -write
readwrite
property
Tag value digits Number W The number of significant digits after the decimal
digits point.
Range: 0~16.
⚫ Query fields definitions:
Field Abbreviation Data Type Description
Tag list taglist String Tag list
Select item select String Get tag name.
select=name
Version _v2 String Return tag information in json array
array
Io tag [1] iotag String All io tags
Sys tag [2] systag String All system tags
User tag [2] usertag String All user tags
Calc tag [2] calctag Number All calc tags
name [3] name String Search tags according to the tag name’s part of the
name or whole of the name.
Support:
1) whole name search;
2) case sensitive search;
3) regex search
Page number _page_no String Set the page number of the select tags, use with
[4]
_page_size
Page size [4] _page_size String Set the tags numbers in one page, use with _page_no
Port number _port_dev String Search according to the port name and the device
and device name. For io tags only.
number [5] E.g.: 0_1 means port 0, device 1; 1 means all devices
on port 1.
Tag count _count String Returns tag counts according to the query conditions.
_count=total
Case _case String Case sensitive when searching tags.
sensitive* _case=0: no case sensitive
_case=1: case sensitive
Whole word _whole String Whole word search.
search* _while=0: no whole word search
_while=1: whole word search
Regex _regex String Regex search.
search* _regex=0: no regex search
_regex=1: regex search
Sort order* _order_by String Sort order.
_order_by=asc: ascend order
_order_by=desc: descend order
Remark *: The fields marked with [*] can be used with each other and the fields marked [1],
[2], [3], [4] and [5]. The fields cannot be used alone.
[3]: The field can be used with the fields marked [1], [2], [4] and [5].
[5]: The field should be used with field marked [1].

/data/daq

Description Retrieves information about io tag structure on edgelink device.


URL Structure https://{ip address}/data/daq
HTTP Method GET:Returns tag names of all io tag according to port-device hierarchical
structure
GET GET / data/daq

[Example]:
⚫ Request: GET /data/daq
Content-type: application/json
Response: 200 OK
{
"Port": [
{
"name": "ADAM-3600-C2GL1A1E",
"enable": "true",
"portNbr": 0,
"Device": [
{
"name": "BoardIO",
"deviceIndex": 0,
"IOTag": [
"BoardIO:AI_0",
"BoardIO:AI_1",
"BoardIO:AI_2",
"BoardIO:AI_3",
"BoardIO:AI_4",
"BoardIO:AI_5",
"BoardIO:AI_6",
"BoardIO:AI_7",
"BoardIO:DI_0",
"BoardIO:DI_1",
"BoardIO:DI_2",
"BoardIO:DI_3",
"BoardIO:DI_4",
"BoardIO:DI_5",
"BoardIO:DI_6",
"BoardIO:DI_7",
"BoardIO:DO_0",
"BoardIO:DO_1",
"BoardIO:DO_2",
"BoardIO:DO_3"
]
}
]
},
{
"name": "COM1",
"enable": "false",
"portNbr": 1
},
{
"name": "COM2",
"enable": "false",
"portNbr": 2
},
{
"name": "COM3",
"enable": "true",
"portNbr": 3,
"Device": [
{
"name": "ModbusRTU1",
"deviceIndex": 0,
"IOTag": [
"ModbusRTU1:RTU1",
"ModbusRTU1:RTU2",
"ModbusRTU1:RTU3"
]
},
{
"name": "ModbusRTU2",
"deviceIndex": 1,
"IOTag": [
"ModbusRTU2:RTU21",
"ModbusRTU2:RTU22",
"ModbusRTU2:RTU23",
"ModbusRTU2:RTU24"
]
}
]
},
{
"name": "TCP",
"enable": "true",
"portNbr": 4,
"Device": [
{
"name": "ModbusTCP",
"deviceIndex": 0,
"IOTag": [
"ModbusTCP:TCP1",
"ModbusTCP:TCP2",
"ModbusTCP:TCP3"
]
},
{
"name": "DNP3",
"deviceIndex": 1,
"IOTag": [
"DNP3:DNP1",
"DNP3:DNP2"
]
},
{
"name": "OPCUA",
"deviceIndex": 2,
"IOTag": [
"OPCUA:opcua1",
"OPCUA:opcua2"
]
}
]
}
]
}

PUT None

POST None

PATCH None

Note

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
portNbr portNbr String R Port index
deviceIndex deviceIndex String R Device index
enable enable String R The port or device is
enabled or not
Remark

2.9 Data Logger

/data/datalogger/tagname

Description Retrieves all tag names recorded in data logger.


URL Structure https://{ip address}/data/datalogger/tagname
HTTP Method GET:Returns the tag names recorded in datalogger.
GET Request:GET / data/datalogger/{tagname}

[Example]:
⚫ Request: GET / data/ datalogger/{tagname}

Content-type: application/json
Response: 200 OK

{
"datalogger_tagname": [
"#SYS_CPU_USED",
"#SYS_TFCARD_CAPACITY",
"#SYS_NODE_ID",
"#SYS_LAN_COUNT",
"#SYS_UPTIME",
"#SYS_MAC_LAN1",
"#SYS_MAC_LAN2",
"#MOBILE_MPN",
"#GPS_LATITUDE",
]
}
PUT None
POST None
PATCH None
Remarks
/data/datalogger

/data/datalogger/{TaskID}
Description Start to query all records of the selected tag in data logger.
URL https://{ip address}/data/datalogger
Structure
POST:Returns the time stamp of the beginning point of the query.
GET None
PUT None
POST Request:POST / data/datalogger

[Example]: Start to query Statistics data


⚫ Request: POST
/ data/datalogger
Content-type: application/json
{
"Tn":"#SYS_CPU_FREQ",
"St":"1577899541",
"Et":"1577975941",
"Tp":"-1"
}
Response: 200 OK
{
"taskid": "0 "
}
PATCH None

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
Tag Name Tn String RW Tag name in datalogger
Start time St String RW Start time of time. Unix timestamp
0: The first record time
Ebd time Et String RW End time of time. Unix timestamp
0: The latest record time
Query Type Tp String RW Query type
“-1” Historical query
“0” Query in minutes
“1” Query in hour
“2” Query in day
Remarks
Description Get the status of the inquiries
URL https://{ip address}/data/datalogger/{TaskID}
Structure Where: TaskID: returns by post request:/ data/datalogger

GET:Returns the query status.


GET Request:GET / data/datalogger/{TaskID}

[Example]: Get query status


⚫ Request: GET
/ data/datalogger/0

Content-type: application/json
Response: 200 OK
If the query is not finished,
{
"status": "querying",
"timestamp": "xxxxxxx",
"count": "4",
}
If the query is timeout
{
"taskid":"xxx",
"status":"timeout",
"records": [
{
"timestamp": "1523424600",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424720",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424900",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424960",
"quality": "-32640",
"partial": "0",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523425020",
"quality": "-32640",
"partial": "0",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
}
],
"count": "5"
}
If the query is completed
{
"taskid":"xxx",
"status":"finish",
"records": [
{
"timestamp": "1523424600",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424720",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424900",
"quality": "-32640",
"partial": "1",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523424960",
"quality": "-32640",
"partial": "0",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
},
{
"timestamp": "1523425020",
"quality": "-32640",
"partial": "0",
"last": "0.0000",
"min": "0.0000",
"max": "0.0000",
"avg": "0.0000"
}
],
"count": "5"
}
[Example]: Query Historical data
⚫ Request: GET
/ data/ datalogger/0
{
"taskid":"xxx",
"status":"finish",
"records": [
{
"timestamp": "1523424652.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424653.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424654.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424655.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424656.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424657.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424658.0000",
"value": "0.0000",
"quality": "-32640"
},
{
"timestamp": "1523424659.0000",
"value": "0.0000",
"quality": "-32640"
}
],
"count": "8"
}
PUT None
POST Request:POST / data/datalogger/0

[Example]: Send cancel command to stop quety


⚫ Request: POST
/ data/datalogger/0
Content-type: application/json
{
"status":"cancel"
}
Response: 200 OK

PATCH None

⚫ Query value definitions:


Data
Field Abbreviation Property Description
Type
Tag Tn String RW Tag name in datalogger
Name
Start time St String RW Start time of time. Unix
timestamp
0: The first record time
Ebd time Et String RW End time of time. Unix timestamp
0: The latest record time
Query Tp String RW Query type
Type “-1” Historical query
“0” Query in minutes
“1” Query in hour
“2” Query in day
Remarks Timeout:
Timeout for querying data logger is 20 seconds, if the interval between two GET
requests is more than 20 seconds , the query will be canceled,data that has been
queried can be get.
Cancel:
If the query is canceled, data that has been queried can be get.
Note: In both above cases, the query result may be incomplete.
2.10 Log in/log out

2.10.1 Log in

/sys/log_in

Description Log in the device for configuration or image updating.


URL Structure https://{ip address}/sys/log_in/
HTTP Method PUT:
GET None
PUT Request:PUT /sys/log_in
[Example]:
⚫ Request: PUT /sys/log_in
Content-type: application/json
{
"password":"00000000"
}

Response:
{
"sesion_id": "c9f4baf91d3e4ed7cfb18e598c5711f5",
}
[Example]:
⚫ Request: PUT /sys/log_in?timeout=xxxx
Content-type: application/json
{
"password":"00000000"
}

Response:
{
"sesion_id":"c9f4baf91d3e4ed7cfb18e598c5711f5"
}

POST None
PATCH None
⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
password password String RW User password
Session index session_id String R Session index for cookies
⚫ Query param definitions:
Field Abbreviation Data Type Property Description
Timeout timeout String W Set timeout for current
login session.
xxxx:timeout value.
unit: second.
If timeout value is zero,
then the session will never
timeout util the logout
operation is happened.
Remarks Session_id will be used in cookie for GET/PUT/POST/PATCH method.

Cookie: SID=c9f4baf91d3e4ed7cfb18e598c5711f5

Session timeout value means if there is no web access to webservice for


such time period after login, the session will be timeout. The default
value is 3600 seconds.

2.10.2 Log out

/sys/log_out

Description Log out the device


URL Structure https://{ip address}/sys/log_out/
HTTP Method  PUT
GET None
PUT ⚫ Request: PUT /sys/log_out
Content-type: application/json

Response:
{
"Success":"Log out "
}
POST None

PATCH None
⚫ Resource value definitions:
Remarks
2.11 Image Update

2.11.1 Image File Information Verification

/sys/file_verify

Description Get image file information from user.


URL Structure https://{ip address}/sys/file_verify/
HTTP Method POST
GET None
PUT None
POST Request:POST /sys/file_verify
[Example]:
⚫ Request: POST /sys/file_verify
Content-type: application/json

Response:
{
"size":"5375",
"count":"2"
"detail": [
{
" name ":" manifest.xml",
" size ":"5007",
},
{
"name":" checksum.md5",
"size":”368”,
},
]
}
PATCH None

⚫ Resource value definitions:


Remarks This request must be executed before /sys/upload
2.11.2 Image Upload

/sys/upload

The standard way to upload files in a web application is to use a form with a special
multipart/form-data encoding.
<RFC1521> In the case of multiple part entities, in which one or more different sets of
data are combined in a single body, a "multipart" Content-Type field must appear in the
entity's header. The body must then contain one or more "body parts," each preceded
by an encapsulation boundary, and the last one followed by a closing boundary. Each
part starts with an encapsulation boundary, and then contains a body part consisting of
header area, a blank line, and a body area.
Each body part is preceded by an encapsulation boundary. The encapsulation boundary
MUST NOT appear inside any of the encapsulated parts. Thus, it is crucial that the
composing agent be able to choose and specify the unique boundary that will separate
the parts.
Encapsulation boundaries must not appear within the encapsulations, and must be no
longer than 70 characters, not counting the two leading hyphens.
The encapsulation boundary following the last body part is a distinguished delimiter
that indicates that no further body parts will follow. Such a delimiter is identical to
the previous delimiters, with the addition of two more hyphens at the end of the line:
--gc0p4Jq0M2Yt08jU534c0p--

<RFC2388> “Multipart/form-data” can be used for forms that are presented using
representations other than HTML (spreadsheets, Portable Document Format, etc), and
for transport using other means than electronic mail or HTTP. This document defines
the representation of form values independently of the application for which it is used.
"Multipart/form-data" contains a series of parts. Each part is expected to contain a
content-disposition header [RFC 2183] where the disposition type is "form-data", and
where the disposition contains an (additional) parameter of "name", where the value of
that parameter is the original field name in the form. For example, a part might contain
a header:

Content-Disposition: form-data; name="user"

with the value corresponding to the entry of the "user" field.


Field names originally in non-ASCII character sets may be encoded within the value of
the "name" parameter using the standard method described in RFC 2047.

Description Log in the device for configuration or image updating.


URL Structure https://{ip address}/sys/upload/
HTTP Method POST:
GET None
PUT None
POST Request:POST /sys/upload
[Example]:
⚫ Request: POST /sys/upload
Content-type: application/json

Content-Type:multipart/form-data;

boundary=----WebKitFormBoundaryuTETT0zNHgTxZV1W

------WebKitFormBoundaryuTETT0zNHgTxZV1W

Content-Disposition:form-data; name="ADAM-3600-image-
1.1.2.bin"; filename="ADAM-3600-image-1.1.2.bin"

Content-Type: text/plain

< data>

------WebKitFormBoundaryuTETT0zNHgTxZV1W--

Response: 200 OK

PATCH None
Remarks Must log in first

2.11.3 Image Update

/sys/update

Description Begin to update the files of edgelink device.


URL Structure https://{ip address}/sys/update/
HTTP Method POST
GET None
PUT None
POST Request:POST /sys/update
[Example]:
⚫ Request: POST /sys/update
Content-type: application/json

Response:
{
"Notice":"updating"
}
PATCH None

Remarks Must log in first

2.11.4 Get information in update process

/sys/update_info

Description Get the updating notice information


URL Structure https://{ip address}/sys/update_info
HTTP Method GET
GET Request:GET /sys/update_info
[Example]:
⚫ Request: GET /sys/update_info
Content-type: application/json

Response:
{
"updateinfo": {update information}
}

{update information}: Update notice information


PUT None

POST None

PATCH None

Remarks

2.11.5 Image version information

/sys/version?filename=/tmp/menifest.xml

Description Show the version information of the update package for Edgelink device.

URL Structure https://{ip address}/sys/version?filename=/tmp/menifest.xml

HTTP Method GET

GET Request:GET /sys/version?filename=/tmp/menifest.xml


[Example]:
⚫ Request:
GET /sys/version?filename=/tmp/menifest.xml
Content-type: application/json

PUT None

POST None

PATCH None

Remarks
2.11.6 Recover to default image

/sys/image/recovery

/sys/image/recovery?token={token}

Description Recover to default image of edgelink device.


URL Structure https://{ip address}/sys/image/recovery
HTTP Method POST
GET None
PUT None
POST Request:
POST /sys/image/recovery
POST /sys/image/recovery?token={token string}
[Example]:
⚫ Request: POST /sys/image/recovery
Content-type: application/json

Response:
{
"version": "2.8.2",
"token": "gQb4gRECXnyzuiFB3me7Lg=="
}
⚫ Request:
POST
/sys/image/recovery?token=gQb4gRECXnyzuiFB3me7Lg==
Content-type: application/json

If image file checksum fails:


Response: 200 OK
{
"Error":"Default image file on device corrupted, please upload
image manually first"
}

If token verification and image checksum are successful, edgelink device


reboot to recover image.
:
Response: 200 OK

PATCH None
Remarks Must log in first

2.12 System log file

Get syslog of device

/sys/log_create

Description Create a thread to get the syslog of edgelink device.

URL Structure https://{ip address}/sys/log_create

HTTP Method GET

GET Request:GET /sys/log_create


[Example]:
⚫ Request:GET /sys/log_create
Content-type: application/json

Response:
{
"TS":"1431773198"
}
PUT None

POST None

PATCH None

⚫ Resource value definitions:


Data
Field Abbreviation Property Description
Type
TimeStamp TS String R The timestamp to create the get
syslog message thread
Remarks

/sys/log_message

Description Get the syslog messages of Edgelink device between twice requests.
URL Structure https://{ip address}/sys/log_message

HTTP Method POST


GET None
PUT None
POST Request:POST /sys/log_message

[Example]:
⚫ Request: POST /sys/log_message
Content-type: application/json
Request:
{
"TS":"1431773198"
}
Response:
{
"syslog_info": {syslog information}
}

{syslog information}: The syslog messages on Edgelink device between


twice requests.
PATCH None

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
TimeStamp TS String R The timestamp to create the get
syslog message thread
Remarks
2.13 Network

2.13.1 GPRS Info

/data/cellular_info

Description Retrieves information about the cellular information.


URL https://{ip address}/data/cellular_info
Structure https://{ip address}/ data/cellular_info/{cellular item}
HTTP GET:Returns the representation of GPRS information.
Method
Multi Request:
GET GET / data/cellular_info/
Single information Request:
GET / data/cellular_info/{cellular item}

xxxx: name of some cellular information, such as: PUB_IP

[Example]:
⚫ Request: GET /data/cellular_info
Content-type: application/json
Response: 200 OK
{
"MOBILE_MNO": "No GPRS Service",
"MOBILE_MNT": "No GPRS Service",
"MOBILE_MPN": "0",
"MOBILE_MDT": "0 Bytes",
"MOBILE_SIGNAL_QUALITY": "Not Connected(0)",
"PUB_IP": "0.0.0.0"
}
⚫ Request: GET /data/cellular_info/ PUB_IP

Content-type: application/json
Response: 200 OK
{
"0.0.0.0"
}

PUT None

POST None

PATCH None
⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
Mobile MOBILE_MNO String R Mobile operator:
network China Mobile
operator China Unicom
China Telecom
China Tietong
Mobile MOBILE_MNT String R Mobile network type:
network type 2G, 3G, 4G
Mobile Phone MOBILE_MPN String R Mobile Phone Number
Number 86xxxxxxxxxxx
Mobile data MOBILE_MDT String R Mobile data traffic
traffic
Mobile signal MOBILE_SIGNAL String R Mobile signal quality
quality _QUALITY 0-100

IP address PUB_IP String R IP address of the public


network
Remark

2.13.2 Lan Configuration

/sys/net_basic/lan/

Description Retrieves the network link information.

URL http://{ip address}/sys/net_basic/lan


Structure
HTTP GET:Returns the representation of all of network link information resource.
Method PUT:Replace all of network link information resource.
PATCH:Apply partial modifications to network link information resource.
GET Request:
GET /sys/net_basic/lan
/sys/net_basic/lan/id_x

[Example]:
⚫ Request: GET /sys/net_basic/lan/

Content-type: application/json
Response: 200 OK
{
"ETH": [
{
"IF": "eth0",
"DN": "LAN1",
"SL": "",
"IfStat": "Down",
"LinkStat": "Not wired",
"ipv4": {
"IP": "192.168.172.223",
"MAC": "54:4A:16:8F:71:98",
"Msk": "255.255.255.0",
"GW": "192.168.172.1",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ""
}
},
"ipv6": {
"IP": "fe80::564a:16ff:fe8f:7198",
"MAC": "54:4A:16:8F:71:98",
"PrfL": "64",
"GW": "fe80::2276:93ff:fe2d:f474",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ""
}
},
"cnnttype": {
"CnCkTp": "None",
"PInt": 1,
"PHost": {
"host0": "",
"host1": "www.badiu.com",
"host2": ""
},
"MxSlcTm": 60,
"RbtTm": 0
}
},
{
"IF": "eth1",
"DN": "LAN2",
"SL": "",
"IfStat": "Up",
"LinkStat": "Wired",
"ipv4": {
"IP": "0.0.0.0",
"MAC": "54:4A:16:8F:71:9A",
"Msk": "0.0.0.0",
"GW": "0.0.0.0",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ""
}
},
"ipv6": {
"IP": "::",
"MAC": "54:4A:16:8F:71:9A",
"PrfL": "1",
"GW": "::",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ""
}
},
"cnnttype": {
"CnCkTp": "None",
"PInt": 1,
"PHost": {
"host0": "",
"host1": "www.badiu.com",
"host2": ""
},
"MxSlcTm": 60,
"RbtTm": 0
}
}
]
}
PUT Request:
PUT /sys/net_basic/lan/id_x
PUT /sys/net_basic/lan/id_x/ipv4/

[Example]:
⚫ Request: PUT /sys/net_basic/lan/id_0/ipv4/
Content-type: application/json
{
"IP": "10.0.0.2",
"Msk": "255.255.255.0",
"GW": "{ip address}",
"DHCP": 0
}
Response: 200 OK
{
"Success": "Config netcard completed"
}
Content-type: application/json
{
"DHCP": 1
}
Response: 200 OK
{
"Success": "Config netcard completed"
}

POST None

PATCH None

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description
Interface
IF String R Interface name: ex. eth0
name
Slot ID SL String R Slot ID: Onboard or Slot 0….
Interface
IfStat String R Interface status: Up or Down
status
Link status LinkStat String R Link status: Wired or Not wired
MAC ID MAC String R MAC address.
(12+5) characters, ex,
"00-D0-C9-F0-63-F7"
Get IP DHCP Number RW Get IP Method
Method 0 : static IP
1: DHCP
IP Address IP String RW IP address
Subnet Mask Msk String RW Subnet Mask
Gateway GW String RW Gateway address
Address
IPV6 PrfL String RW Subnet prefix length
DNS mode IsAuto String RW Auto DNS, or manual config DNS
address
DNS address DnsIP String RW DNS address
Connection CnCkTp String RW The type of check connection:
Check Type "None","Ping"
Ping Interval PInt Number RW Ping interval.
Unit: Second
Ping Host host String RW Host name used to check connection,
support 3 host name
Max Silence MxSlcTm Number RW Wait time for checking connection.
Time Unit: Minute
Reboot On RbtTm Number RW If connection failure time is exceeding
Failure Time the value, reboot edgelink device.
Unit: hour

Remarks

2.13.3 Wlan Configuration

/sys/net_basic/wlan/

Description Retrieves the wlan network link information.

URL http://{ip address}/sys/net_basic/wlan


Structure
HTTP GET:Returns the representation of all of network link information resource.
Method PUT:Replace all of network link information resource.
PATCH:Apply partial modifications to network link information resource.
GET Request:
GET /sys/net_basic/wlan
[Example]:
⚫ Request: GET /sys/net_basic/wlan

Content-type: application/json
Response: 200 OK
{
"WL": [
{
"general": {
"Nm": "wlan0",
"DevId": "1286:204a",
"En": 1,
"Md": "Client"
},
"client": {
"general": {
"SSID": "RD192_6633",
"BSSID": "",
"Scrt": "WPA/WPA2 PSK",
"Pswd": " YWR2YW50ZWNoNjYzMw=="
},
"ipv4": {
"IP": "0.0.0.0",
"MAC": "D4:CA:6E:90:1A:D3",
"Msk": "0.0.0.0",
"GW": "0.0.0.0",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ";;"
}
},
"ipv6": {
"IP": "::",
"MAC": "D4:CA:6E:90:1A:D3",
"PrfL": "1",
"GW": "::",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ";;"
}
},
"cnnttype": {
"CnCkTp": "Ping",
"PInt": 1,
"PHost": {
"host0": "www.baidu.com",
"host1": "",
"host2": ""
},
"MxSlcTm": 60,
"RbtTm": 0
}
},
"AP": {
"general": {
"Chn": "6",
"MxStn": "10",
"SSID": "WiFi AP",
"Scrt": "open",
"Pswd": ""
},
"ipv4": {
"IP": "192.168.180.1",
"MAC": "D4:CA:6E:90:1A:D3",
"Msk": "255.255.255.0",
"GW": "0.0.0.0",
"DHCP": 0
}
}
}
]
}

PUT Request:
PUT /sys/net_basic/wlan/id_0

[Example]:
⚫ Request: PUT /sys/net_basic/wlan/id_0
Content-type: application/json
{
"general": {
"Nm": "wlan0",
"DevId": "1286:204a",
"En": 1,
"Md": "Client"
},
"client": {
"general": {
"SSID": "RD192_6633",
"BSSID": "",
"Scrt": "WPA/WPA2 PSK",
"Pswd": " YWR2YW50ZWNoNjYzMw=="
},
"ipv4": {
"IP": "0.0.0.0",
"MAC": "D4:CA:6E:90:1A:D3",
"Msk": "0.0.0.0",
"GW": "0.0.0.0",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ";;"
}
},
"ipv6": {
"IP": "::",
"MAC": "D4:CA:6E:90:1A:D3",
"PrfL": "1",
"GW": "::",
"DHCP": 1,
"DNS": {
"IsAuto": "true",
"DnsIP": ";;"
}
},
"cnnttype": {
"CnCkTp": "Ping",
"PInt": 1,
"PHost": {
"host0": "www.baidu.com",
"host1": "",
"host2": ""
},
"MxSlcTm": 60,
"RbtTm": 0
}
},
"AP": {
"general": {
"Chn": "6",
"MxStn": "10",
"SSID": "WiFi AP",
"Scrt": "open",
"Pswd": ""
},
"ipv4": {
"IP": "192.168.180.1",
"MAC": "D4:CA:6E:90:1A:D3",
"Msk": "255.255.255.0",
"GW": "0.0.0.0",
"DHCP": 0
}
}
}
Response: 200 OK
{
"Success": "Config netcard completed"
}

POST None
PATCH None
⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
Interface
Nm String R Interface name, wlanx
Name
DeviceID DevId String R Device ID of the wifi module
Enable En String R Enble or disable wifi, 0 or 1
Mode Md String RW Client or AP mode
Service Set Id SSID String RW Service set identifier
AP MAC MAC address of access point, not
BSSID String RW
address necessary
Security type Scrt String RW Open, WPA/WPA2 PSK, WEP
Access point password, use base64
Password Pswd String RW
encode
Default :6,
Channel Chn String RW
Value: Auto, 1~11
Max station
MxStn String RW Maximum number of stations
number
MAC ID MAC String R MAC address.
(12+5) characters, ex,
"00-D0-C9-F0-63-F7"
Get IP DHCP Number RW Get IP Method
Method 0: static IP
1: DHCP
IP Address IP String RW IP address
Subnet Mask Msk String RW Subnet Mask
Gateway GW String RW Gateway address
Address
IPV6 PrfL String RW Subnet prefix length
DNS mode IsAuto String RW Auto DNS, or manual config DNS
address
DNS address DnsIP String RW DNS address
Connection CnCkTp String RW The type of check connection:
Check Type "None","Ping"
Ping Interval PInt Number RW Ping interval.
Unit: Second
Ping Host host String RW Host name used to check connection,
support 3 host name
Max Silence MxSlcTm Number RW Wait time for checking connection.
Time Unit: minute
Reboot On RbtTm Number RW If connection failure time is exceeding
Failure Time the value, reboot edgelink device.
Unit: hour

Remarks

2.13.4 Cellular Configuration

/sys/net_basic/cellular/

Description Retrieves the cellular link information.

URL http://{ip address}/sys/net_basic/cellular


Structure
HTTP GET:Returns the representation of all of network link information resource.
Method PUT:Replace all of network link information resource.
PATCH:Apply partial modifications to network link information resource.
GET Request:
GET /sys/net_basic/cellular

[Example]:
⚫ Request: GET /sys/net_basic/cellular

Content-type: application/json
Response: 200 OK

{
"MdlNm": "Auto",
"DevId": "2c7c:0125",
"DevDesc": "EC20CEFA-512-STD(Quectel) QMI(wwan0) ",
"CnntSt": false,
"DialType": "ppp",
"AcsPort": "/dev/ttyUSB0",
"SptDlType": "ppp;QMI",
"SwchTp": "",
"SwchTag": "",
"MstrSim": 0,
"Urat": "",
"sim": [
{
"Oprt": "",
"NtMd": "",
"APN": "",
"DialNm": "",
"PIN": "",
"bAuth": false,
"USR": "",
"PSWD": ""
},
{
"Oprt": "",
"NtMd": "",
"APN": "",
"DialNm": "",
"PIN": "",
"bAuth": false,
"USR": "",
"PSWD": ""
}
],
"DNS": {
"IsAuto": "false",
"DnsIP": ""
},
"cnnttype": {
"CnCkTp": "None",
"PInt": 0,
"PHost": {
"host0": "",
"host1": "",
"host2": ""
},
"MxSlcTm": 0,
"RbtTm": 0
}
}
PUT Request:
PUT /sys/net_basic/cellular

[Example]:
⚫ Request: PUT /sys/net_basic/cellular
Content-type: application/json
{
"MdlNm": "Auto",
"DevId": "2c7c:0125",
"DevDesc": "EC20CEFA-512-STD(Quectel) QMI(wwan0) ",
"CnntSt": false,
"DialType": "ppp",
"AcsPort": "/dev/ttyUSB0",
"SptDlType": "ppp;QMI",
"SwchTp": "",
"SwchTag": "",
"MstrSim": 0,
"Urat": "",
"sim": [
{
"Oprt": "",
"NtMd": "",
"APN": "",
"DialNm": "",
"PIN": "",
"bAuth": false,
"USR": "",
"PSWD": ""
},
{
"Oprt": "",
"NtMd": "",
"APN": "",
"DialNm": "",
"PIN": "",
"bAuth": false,
"USR": "",
"PSWD": ""
}
],
"DNS": {
"IsAuto": "false",
"DnsIP": ""
},
"cnnttype": {
"CnCkTp": "None",
"PInt": 0,
"PHost": {
"host0": "",
"host1": "",
"host2": ""
},
"MxSlcTm": 0,
"RbtTm": 0
}
}

Response: 200 OK
{
"Success": "Config netcard completed"
}

POST None

PATCH None
⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
Module name MdlNm String R Module name, e.g.: Auto
0:enable
Device ID DevId String R
1:disable
Device
DevDesc String R Cellular device description
description
Connection
CnnSt Bool RW Connection status
status
Dial type DialType String RW Dial type, ppp or QMI
Cellular device access port,
Access port AcsPort String R
e.g.: /dev/ttyUSB0
Support dial Supported dial type for
SptDlType String R
Type current cellular device
For dual-sims device,
Switch type *
SwchTp String RW according this field to
switch sim card
For dual-sims device, if
Switch tag *
SwchTag String RW switch type is tag, set tag
name here.
For dual-sims device,
Master sim *
MstrSim String RW master sim card index, 1 or
2.
Cellular Oprt String RW Cellular operator
Operator auto
unicom
cmnet
telecom
other
Network Type NtMd String RW Cellular network type
Auto
4G(LTE_M1)
4G(LTE_NB1)
4G(LTE)
3G(UMTS)
2G(GSM)
NBIOT
Access point APN String RW Access point name
Name
Dial Number DialNm String RW Dial number
PIN Number* PIN String RW Reserved
Authenticatio bAuth Bool RW Authentication or not
n
User Name USR String RW User name for authentication
Password PSWD String RW Password for authentication
Connection CnCkTp String RW The type of check connection:
Check Type "None","Ping"
Ping Interval PInt Number RW Ping interval.
Unit: second
Ping Host host String RW Host name used to check
connection, support 3 host
names
Max Silence MxSlcTm Number RW Wait time for checking
Time connection.
Unit: minute
Reboot On RbtTm Number RW If connection failure time is
Failure Time exceeding the value, reboot
edgelink device.
Unit: hour

Remarks

/sys/net_basic/cellular/status

Description Retrieves the cellular network link information.


URL http://{ip address}/sys/net_basic/cellular/status
Structure
HTTP GET:Returns the representation of all cellular information resource.
Method
GET Request:
GET /sys/net_basic/cellular/status

[Example]:
⚫ Request: GET /sys/net_basic/cellular/status

Content-type: application/json
Response: 200 OK
[{
"name": "#MOBILE_SIM",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127103",
"readwrite": "1"
}, {
"name": "#MOBILE_IP",
"type": "System Tag",
"value": "0.0.0.0",
"quality": "8080H",
"timestamp": "1681956310.127190",
"readwrite": "1"
}, {
"name": "#MOBILE_MNO",
"type": "System Tag",
"value": "No Cellular Service",
"quality": "8080H",
"timestamp": "1681956310.127449",
"readwrite": "1"
}, {
"name": "#MOBILE_MNT",
"type": "System Tag",
"value": "No Cellular Service",
"quality": "8080H",
"timestamp": "1681956310.127481",
"readwrite": "1"
}, {
"name": "#MOBILE_MPN",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127524",
"readwrite": "1"
}, {
"name": "#MOBILE_SIGNAL_QUALITY",
"type": "System Tag",
"value": "Not Connected",
"quality": "8080H",
"timestamp": "1681956310.127542",
"readwrite": "1"
}, {
"name": "#MOBILE_CSQ",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127562",
"readwrite": "1"
}, {
"name": "#MOBILE_MCC",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127586",
"readwrite": "1"
}, {
"name": "#MOBILE_MNC",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127607",
"readwrite": "1"
}, {
"name": "#MOBILE_IMEI",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127697",
"readwrite": "1"
}, {
"name": "#MOBILE_IMEI_RAW",
"type": "System Tag",
"value": "0",
"quality": "8080H",
"timestamp": "1681956310.127721",
"readwrite": "1"
}, {
"name": "#MOBILE_DATA_YEAR",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8080H",
"timestamp": "1681956310.127817",
"readwrite": "1"
}, {
"name": "#MOBILE_DATA_MONTH",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8080H",
"timestamp": "1681956310.127793",
"readwrite": "1"
}, {
"name": "#MOBILE_DATA_DAY",
"type": "System Tag",
"value": "0.00 Bytes",
"quality": "8080H",
"timestamp": "1681956310.127769",
"readwrite": "1"
}]
PUT None

POST None

PATCH None

⚫ Resource value definitions:

Abbreviation Data Type Property Description


Cellular sim card status
SIM_ERROR 0 error
1 MT is not
SIM_READY pending for any
password
2 MT is waiting SIM
SIM_PIN
PIN to be given
MOBILE_SIM String R 3 MT is waiting SIM
SIM_PUK
PUK to be given
4 MT is waiting SIM
SIM_PIN2
PIN2 to be given
5 MT is waiting SIM
SIM_PUK2
PUK2 to be given
SIM_PHNET_PI 6 waiting network
N personalization
password to be
given
7 waiting network
subset
SIM_PHNETSUB
personalization
_PIN
password to be
given
8 waiting service
provider
SIM_PHSP_PIN personalization
password to be
given
9 waiting corporate
SIM_PHCORP_P personalization
IN password to be
given
10 waiting phone to
SIM/UICC card
SIM_PHSIM_PIN
password to be
given
SIM_OTHER 99 unknown
MOBILE_IP String R Cellular device IP
MOBILE_MNO String R Mobile Network Operator
MOBILE_MNT String R Mobile Network type
MOBILE_MPN String R Mobile phone number
MOBILE_SIGNAL_QUALITY String R Signal quality of mobile network
MOBILE_CSQ String R Received Signal Strength Indication
MOBILE_MCC String R Mobile Country Code, MCC
MOBILE_MNC String R Mobile Network Code, MNC
MOBILE_IMEI String R IMEI, International Mobile Equipment
Identity
MOBILE_IMEI_RAW String R IMEI raw data, International Mobile
Equipment Identity
MOBILE_DATA_DAY String R Cellular data, current day used traffic
MOBILE_DATA_MONTH String R Cellular data, current month used traffic
MOBILE_DATA_YEAR String R Cellular data, current year used traffic
Remarks
2.13.5 GPS Configuration

/sys/net_basic/cellular/gps

Description Retrieves the GPS information.


URL http://{ip address}/sys/net_basic/cellular/gps
Structure
HTTP GET:Returns the representation of GPS information.
Method PATCH:Enable or disable GPS function.
GET Request:
GET /sys/net_basic/cellular/gps

[Example]:
⚫ Request: GET /sys/net_basic/cellular/gps

1. If GPS module is existed, and enabled

Content-type: application/json
Response: 200 OK
{
"EN": true,
"LTTD": "0.00",
"LNGTD": "0.00",
"ALTTD": "0.00"
}

2. If GPS module is existed, and disabled

Content-type: application/json
Response: 200 OK
{
"EN": false,
"LTTD": "0.00",
"LNGTD": "0.00",
"ALTTD": "0.00"
}

3. If GPS module is not existed, or dialed up failure

Content-type: application/json
Response: 200 OK
{
"gps_status": "Not connected"
}

PUT None

POST None

PATCH Request:
PATCH /sys/net_basic/cellular/gps

Response: 200 OK

[Example]:
⚫ Request: PATCH /sys/net_basic/cellular/gps

{"EN":true}


⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
Enable EN BOOL RW Enable or disable this function.
Latitude LTTD String R Latitude information
Longitude LNGTD String R Longitude information
Altitude ALTTD String R Altitude information
Remarks
2.14 Remoteit

/data/remotit

2.15 Web Page Setting


Description Retrieves remote.it information.
URL http://{ip address}/data/remoteit
Structure
HTTP GET:Returns the information of remote.it configuration information.
Method
GET Request:
GET /data/remoteit

[Example]:
⚫ Request: GET /data/remoteit
Content-type: application/json
Response: 200 OK
{
"remoteit_conf": "No config file"
}

PUT None

POST None

PATCH None

⚫ Resource value definitions:


Field Abbreviation Data Type Property Description

Remarks
/sys/websettings

Description Retrieves web page settings information.


URL http://{ip address}/sys/websettings
Structure
HTTP GET:Returns the representation of web page settings information.
Method PUT:Change web page settings.
GET Request:
GET /sys/websettings

[Example]:
⚫ Request: GET /sys/websettings

Content-type: application/json
Response: 200 OK
{
"web_refresh_interval": 1000
}

PUT Request:
PUT /sys/websettings

Response: 200 OK

[Example]:
⚫ Request: PUT /sys/ websettings

{
"web_refresh_interval": 1000
}
POST None
PATCH None
⚫ Resource value definitions:
Field Abbreviation Data Type Property Description
Tags refresh interval on web page
web_refresh_interval web_refresh_interval Number RW
unit: millisecond
Remarks

You might also like