Freepark Device List

Resource URL

https://api.freepark.co/device/list

Parameters

ParameterDescriptionOptionalDefault
property_id (Type is integer) False False

Example

POST https://api.freepark.co/device/list

Request

PHP Example
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://api.freepark.co/device/list");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded' ,"Authorization: Bearer ".$access_token));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"property_id=xx");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec ($ch);
echo $response;

Response

{
 "data":
         [
             {
                 "id":1,
                 "battery_level":73.2,
                 "device_no":1
             },
             {
                 "id":2,
                 "battery_level":65,
                 "device_no":2
             },
             {
                 "id":3,
                 "battery_level":55,
                 "device_no":3
             },
             {
                 "id":4,
                 "battery_level":20,
                 "device_no":4
             }
         ]
 }

Error Response

{
    "error":true,
    "error_description":"No found with the specified ID"
}

Resource Information

Rate Limited False
Response Format JSON
Authentication 1