Heartbeat Packet
Note: Every time a heartbeat packet is sent, the validity time of the token will be prolonged for 30min.
Endpoint
POST /api/v0.0.1/heartbeat?token={token}
Request Parameters
|
Required |
String |
Updated IP address of the application server. |
|
Required |
String |
The API port number that is set on 3rd-party application. |
|
Optional |
String |
URL of the application server. This URL is used to specify the sending path of event report to the application server. Note: If the parameter is not specified, the event report will be sent to the root folder of the 3rd-party application server. |
|
Optional |
String |
Specify the URL type:
Note: Using an absolute URL will ensure the API reports to be sent successfully in an complicated network environment. |
Examples
Request Example
When the 3rd-party application send API heartbeat packet to update IP, Port and URL. IP address is changed to 172.16.6.150, and the port is 8280, URL is changed to 172.16.6.150:8280/report
.
POST /api/v0.0.1/heartbeat?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1 HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
"ipaddr": "172.16.6.150",
"port": "8280",
"url": "172.16.6.150:8280",
"urltag": "1"
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
"status": "Success"
}