37
JSON objects
JSON requests
The ifm IoT Core interact with services. Each interaction is a "request" from the host over a URL with a
service element of the device.
JSON request object
{
"code" : "request",
"cid" : number,
"adr" : service_adr,
"reply" : "reply_data",
" data" : "serialized_data",
"auth" : {authinfo})
}
Field explanation
code
"request"
cid
The issuer of a call can give a number, that will be
incorporated into the response. The
c
orrelation
id
entifier is
provided by the issuer of the request and is mirrored back
to him in the response.
allowed values: [0 … 32768]
adr
The address of the service that should be called in the IoT
Core device.
reply
Optional:
The reply data of the response.
If this field is used, the "reply_data" will be sent in the
response.
data
Optional:
Data payload for the call. This is specific to the service that
is called.
Getdata
services does not need any parameters.
Setdata
services need additional parameters.
auth
Optional:
Authentication information depending on authScheme (see
getidentity service). In "standard" auth scheme, auth should
contain a sub object "user" with based64 encoded value
"administrator" = "YWRtaW5pc3RyYXRvcg==" plus base64
encoded password.