Locations & Waypoints

The Xively API supports location metadata for devices. A device can optionally have: no location data, a static location, or a series of waypoints. By default devices have no location data.

Location information is input in decimal format.

The behavior of location data is determined by the “disposition” attribute of a device’s Feed.

  • If the “disposition” attribute is set to “fixed”, the location metadata for a Feed is static. Writing new location metadata to a Feed overwrites the previous location data. Reading a Feed will return the location information with the Feed’s metadata.

  • If the “disposition” attribute is set to “mobile”, the location metadata for a Feed is dynamic. Every time a new location is written to the device’s Feed, a waypoint is created from the existing location information and the timestamp, and stored in a list of historical waypoints. Reading a mobile Feed returns the location metadata representing the most recent location and a series of waypoints for each previous location stored.

Details of location and waypoint attributes are provided on the Xively Resource Attributes page.

Request

Parameters
Method PUT
Base URL https://api.xively.com
API Endpoint /v2/feeds/FEED_ID_HERE
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • DELETE/v2/feeds/FEED_ID_HERE.json

    {
        "location": {
            "disposition": "mobile",
            "name": "Monuriki Island",
            "exposure": "outdoor",
            "domain": "physical",
            "ele": "370000",
            "lat": 17.609991828964787,
            "lon": 177.03402996826173
        }
    }
    
  • DELETE/v2/feeds/FEED_ID_HERE.xml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <eeml>
        <environment>
            <location domain="physical" exposure="outdoor" disposition="mobile">
                <name>Monuriki Island</name>
                <lat>17.609991828964787</lat>
                <lon>177.03402996826173</lon>
                <ele>0</ele>
            </location>
        </environment>
    </eeml>
    
    
  • CSV format not supported for this call
    

 

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • This response does not contain body data
    
  • This response does not contain body data
    
  • This response does not contain body data