REST API - Fetching Devices

Fetching Devices

The URL for this endpoint is: https://www.satvue.com.au/api/listDevices.

The listDevices endpoint will return all the devices on the company and all the client companies associated with the API Key. It requires the following parameters to be passed in via either HTTP GET or POST parameters. All parameters must be URL encoded.

  • access_id: The Access ID of the API Key.
  • secret: The Secret of the API Key.

The available devices for the API Key will be returned in the following JSON structure:

{
   "success": [true|false],
   "error": "[Error String if success=false]",
   "devices": [
      [
         "company": "[Name of the company that owns the device]",
         "name": "[Name of the device]",
         "type": "[IDP-690|IDP-680|ST-6100|YDOC|Iridium Edge]",
         "serial": "[Device Serial Number]",
         "last_upload": "[Timestamp of last upload from device]",
         "longitude": "[Current Location - Longitude]",
         "latitude": "Current Location - Latitude"
      ],
      ...
   ]
}
					

The following is an cURL example of how to use this API Endpoint using a GET request.

curl "https://www.satvue.com.au/api/listDevices?access_id=[ACCESS_ID]&secret=[SECRET]"
					

The following is an cURL example of how to use this API Endpoint using a POST request.

curl --data "access_id=[ACCESS_ID]&secret=[SECRET]" https://www.satvue.com.au/api/listDevices
					

The following is example the data returned by this endpoint.

{
   "success":true,
   "devices":[
      {
         "company":"Pacific Data Systems Australia",
         "name":"SatVUE Weather Station",
         "type":"IDP-690",
         "serial":"01026971SKY3444",
         "last_upload":"2020-11-26 18:00:23+00:00",
         "longitude":"153.096500",
         "latitude":"-27.580367"
      },
      {
         "company":"Pacific Data Systems Australia",
         "name":"YDOC Weather Station",
         "type":"YDOC",
         "serial":"108172709",
         "last_upload":"2020-05-03 16:38:51+10",
         "longitude":"0.000000",
         "latitude":"0.000000"
      }
   ]
}