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:
POSTRequest Fields:
Content-Type: application/x-www-form-urlencodedCode: 201 Created
Content: –
Error Response¶
Wrong Content-Type:
Request:
POSTRequest Fields:
Content-Type: application/jsonCode: 405 Method not allowed
Response Fields:
Content-Type: application/jsonContent:
{ "code": 405, "message": "Method not allowed." }