Field Hub - Current Location for All
A Field Hub registers its GPS location every 30 seconds. When accessing /FieldHubs/all/CurrentLocation
via GET, the Slingshot API Server will return an XML document that contains the most recent location of all the Field Hubs that are assigned to the API Key and Access Key contained in the request headers.
HTTP Method and URL
GET https://api.ravenslingshot.com/fieldhubs/all/currentlocation
URL Parameters
Parameter | Description |
---|---|
id | The {id} portion of the URI is taken from the XML Document returned by a GET request to the /FieldHub URI. |
HTTP Query Parameters
To learn more about these parameters, read about Result Set Paging.
Parameter | Description |
---|---|
pagesize | [Optional] Number of rows to return for a result page. |
page | [Optional] Specific result page to return. |
HTTP Headers
To learn more about these parameters, read about Authentication.
Header | Description |
---|---|
X-SS-AccessKey | [Required] Token issued to a Slingshot user from the Raven Slingshot Portal Server. |
X-SS-APIKey | [Required] Token issued to the Slingshot developer from Raven. |
X-SS-Signature | [Required] The signature generated for a specific request. |
X-SS-TimeStamp | [Required] The timestamp of when the request was generated. |
Sample Responses
XML
<!--?xml version="1.0" encoding="utf-8"?-->
<slingshotindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.ravenslingshot.com/SlingshotIndex/2010">
<totalcount>1</totalcount>
<pagesize>20</pagesize>
<ispreviouspage>false</ispreviouspage>
<isnextpage>false</isnextpage>
<pageindex>0</pageindex>
<totalpages>1</totalpages>
<devicelocation>
<id>249329618</id>
<deviceid>352974026203117</deviceid>
<subtype>Field Hub</subtype>
<lat>43.550893833333</lat>
<lon>-96.7248445</lon>
<alt>454</alt>
<speed>0</speed>
<direction>0</direction>
<valid>false</valid>
<gpsdatetime>2013-05-06T17:10:31Z</gpsdatetime>
</devicelocation>
</slingshotindex>
JSON
{
"DeviceLocation": [
{
"ID": "249329618",
"DeviceId": "352974026203117",
"SubType": "Field Hub",
"Lat": 43.550893833333,
"Lon": -96.7248445,
"Alt": 454,
"Speed": 0,
"Direction": 0,
"Valid": false,
"GPSDateTime": "2013-05-06T17:10:31Z"
}
],
"TotalCount": 1,
"PageSize": 20,
"IsPreviousPage": false,
"IsNextPage": false,
"PageIndex": 0,
"TotalPages": 1
}