40
POST request
Using a POST request the user has read and write access to a data point.
Method: POST
URL:
The syntax of the request to the IoT Core is:
{ "
code
":"code_id", "
cid
":id,
adr
":"data_point/service", "
data
":{req_data},
"
auth
":{"user":"usr_id","passwd":"password"} }
Field
Parameter
Description
code
code_id
Service class
request
Request
transaction
Transaction
event
Event
cid
id
C
orrelation
Id
entifier for the assignment of request and response; ID freely
assignable by the user in the range from 0…32767.
adr
data_point
Data point of the element tree which is to be accessed
service
Service to be performed
(→
Overview: IoT services
(→
S.
93
))
data
(1)
req_data
Data to be transferred to the IoT Core (e.g. new values).
The syntax is depending on the service to send
auth
(2
)
usr_id
user name (base64 encoded); default value: administrator
password
password (base64 encoded)
(1)
= optional; only required for services, that submit data to the IoT core (e. g. setdata)
(2)
= optional; only required, if security mode is activated
Response data:
{ "
cid
":id, "
data
":{resp_data}, "
code
":diag_code }
Field
Parameter
Description
cid
id
C
orrelation
Id
entifier for the assignment of request and response
Device will respond with the same value as set in the request.
data
resp_data
Value of the data point; syntax depending on the service
code
diag_code
Diagnostic code
(→
IoT Core: Diagnostic codes )