39
HTTP request call
There are two methods to request a service from the device.
GET request
Using the GET method the user has read access to a data point. The syntax of the request to the IoT Core is:
Method: GET
URL:
http://ip/data_point
Parameter
Description
ip
IP address of the IoT interface
data_point
Data point which is to be accessed
The syntax of the return of the IoT Core is:
{ "
cid
":id, "
data
":{"value":resp_data}, "
code
":diag_code }
Request element
Parameter
Description
cid
id
C
orrelation
id
entifier for the assignment of request.
In case of GET request, the value is always set to "-1"
data
resp_data
Value of the data point; depending on the data type of the data point
code
diag_code
Diagnostic code (See chapter ->
Example:
http://192.168.0.79:8080/dte105-0000034652/getidentity
or short form cause only one IoT Core is behind the URL
http://192.168.0.79:8080/getidentity
Response data:
{
"cid":-1,
"data":
{"iot":
{"name": "DTE105-0000034652",
"version": "1.3",
"catalogue":
{"name": "ifm-std",
"version": "1.2"},
"namespace": "JSON",
"deviceclass": "device"},
"security":
{"securityMode": "disabled",
"authScheme": "standard",
"isPasswdSet": "FALSE"}
},
"code":200
}