Jetlun REST Web Service Interface

REST API: Device Management

Send message to gateway

Description: Send Message to Gateway

Method: POST

Arguments: myjetlun_id, mac, message_type, message_value, api_key, timestamp, sign, format

Format: JSON, XML

Base URL: "http://api.myjetlun.com/v1/services/gateway/message "

This API will require a corresponding Content-Type header (set to "application/json" or "application/xml").

Curl example:

curl -X POST http://api.myjetlun.com/v1/services/gateway/message \
-H 'Content-Type: application/json' \

-d '{"control":{"message_type":"message","timestamp":"20120606114216","mac":"C8D2C1000470","api_key":"99918776","message_value":"unit_of_measurement=800","myjetlun_id":"4e7164c569eccc2d8b000546","sign":"584a01817441a87f14a6523faa26e3f9"}}'

Example Post JSON Body:

"{"control":{"message_type":"message","timestamp":"20120606114216","mac":"C8D2C1000470",

"api_key":"99918776","message_value":"unit_of_measurement=800",

"myjetlun_id":"4e7164c569eccc2d8b000546","sign":"584a01817441a87f14a6523faa26e3f9"}}"
			        

Example Post XML Body:

<xml> <control> <api_key>99918776</api_key> <timestamp>20120606114216</timestamp> <sign>584a01817441a87f14a6523faa26e3f9</sign> <myjetlun_id>4e7164c569eccc2d8b000546</myjetlun_id> <mac>C8D2C1000470</mac> <message_type>message</message_type> <message_value>unit_of_measurement=300</message_value> </control></xml>

Example Response:

{
“status”:“success”
}