Apiguide

Ping

Describes the Ping endpoint

Overview

The /ping endpoint is a simple way to determine if a device is online and reachable from the calling application. This endpoint returns OK if successful and the response will contain an echo of an input parameter.

The IP address of the device is required to call this endpoint. Check the Integration Guide for details on determining the device IP address.

The following endpoint, http://<YOUR_DEVICE_ADDRESS>/api/v1/ping/{msg}, is what is utilized to ping the device where msg is a nullable input.

Example

The below example uses the parameter sayhello as input, which is echoed back in the response as the msg parameter.

Request
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/v1/ping/sayhello" \
-X GET
Example Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "msg": "sayhello"
}

Request Parameters

msg: a nullable string that can be appended to the end of the url and returned by the response

Response Properties

The msg field returned is an echo response of the input msg parameter


Copyright © PHD Solutions 2024