Send Heartbeat¶
Creates a new or updates an exicisting heartbeat of a sensor node in the
database. The request header must contain Content-Type:
application/x-www-form-urlencoded
. The project id, the node id, and the
heartbeat frequency in seconds must be submitted as form data (pid
, nid
,
and freq
). The server returns 201 Created on success. The server stores
project id, node id, frequency, IP address of the client, and timestamp with
timezone in the database.
URL¶
/api/v1/heartbeats/
Method¶
POST
Request Fields¶
Content-Type: application/x-www-form-urlencoded
Success Response¶
Request:
POST
Request Fields:
Content-Type: application/x-www-form-urlencoded
Code: 201 Created
Content: –
Error Response¶
Wrong Content-Type
:
Request:
POST
Request Fields:
Content-Type: application/json
Code: 405 Method not allowed
Response Fields:
Content-Type: application/json
Content:
{ "code": 405, "message": "Method not allowed." }