Skip to main content

Field Hub - Current Location

A Field Hub reports its GPS location to the server every 30 seconds. When accessing /FieldHubs/:id/CurrentLocation via GET, the Slingshot API Server will return an XML document that contains the current most recent location registered for the Field Hub identified by {id}.

HTTP Method and URL

GET https://api.ravenslingshot.com/fieldhubs/{id}/currentlocation

URL Parameters

ParameterDescription
idThe {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.

ParameterDescription
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.

HeaderDescription
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>249329823</id>
<deviceid>352974026203117</deviceid>
<subtype>Field Hub</subtype>
<lat>43.550893333333</lat>
<lon>-96.724844333333</lon>
<alt>454</alt>
<speed>0</speed>
<direction>0</direction>
<valid>false</valid>
<gpsdatetime>2013-05-06T17:20:01Z</gpsdatetime>
</devicelocation>
</slingshotindex>

JSON

{
"DeviceLocation": [
{
"ID": "249329823",
"DeviceId": "352974026203117",
"SubType": "Field Hub",
"Lat": 43.550893333333,
"Lon": -96.724844333333,
"Alt": 454,
"Speed": 0,
"Direction": 0,
"Valid": false,
"GPSDateTime": "2013-05-06T17:20:01Z"
}
],
"TotalCount": 1,
"PageSize": 20,
"IsPreviousPage": false,
"IsNextPage": false,
"PageIndex": 0,
"TotalPages": 1
}