Field Squared API Services

<back to all web services

RouteList

The following routes are available for this service:
GET/{Workspace}/RouteList
GET/{Workspace}/RouteList/Count
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class RouteList
    {
        public String Workspace = null;
        public String DateGenerated = null;
        public ArrayList<Route> Routes = null;
        public Long RecordsAvailable = null;
        
        public String getWorkspace() { return Workspace; }
        public RouteList setWorkspace(String value) { this.Workspace = value; return this; }
        public String getDateGenerated() { return DateGenerated; }
        public RouteList setDateGenerated(String value) { this.DateGenerated = value; return this; }
        public ArrayList<Route> getRoutes() { return Routes; }
        public RouteList setRoutes(ArrayList<Route> value) { this.Routes = value; return this; }
        public Long getRecordsAvailable() { return RecordsAvailable; }
        public RouteList setRecordsAvailable(Long value) { this.RecordsAvailable = value; return this; }
    }

    /**
    * Contains the data for a route within the system.
    */
    public static class Route
    {
        public String Workspace = null;
        public String AssignedWorkspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public String Created = null;
        public String LastUpdated = null;
        public String Date = null;
        public String StartTime = null;
        public String EndTime = null;
        public String UserId = null;
        public String Name = null;
        public String Type = null;
        public ArrayList<RouteSegment> Segments = null;
        public Integer TotalTime = null;
        public Double TotalDistance = null;
        public ArrayList<RouteNode> Nodes = null;
        
        public String getWorkspace() { return Workspace; }
        public Route setWorkspace(String value) { this.Workspace = value; return this; }
        public String getAssignedWorkspace() { return AssignedWorkspace; }
        public Route setAssignedWorkspace(String value) { this.AssignedWorkspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public Route setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public Route setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public Route setBasedOn(String value) { this.BasedOn = value; return this; }
        public String getCreated() { return Created; }
        public Route setCreated(String value) { this.Created = value; return this; }
        public String getLastUpdated() { return LastUpdated; }
        public Route setLastUpdated(String value) { this.LastUpdated = value; return this; }
        public String getDate() { return Date; }
        public Route setDate(String value) { this.Date = value; return this; }
        public String getStartTime() { return StartTime; }
        public Route setStartTime(String value) { this.StartTime = value; return this; }
        public String getEndTime() { return EndTime; }
        public Route setEndTime(String value) { this.EndTime = value; return this; }
        public String getUserId() { return UserId; }
        public Route setUserId(String value) { this.UserId = value; return this; }
        public String getName() { return Name; }
        public Route setName(String value) { this.Name = value; return this; }
        public String getType() { return Type; }
        public Route setType(String value) { this.Type = value; return this; }
        public ArrayList<RouteSegment> getSegments() { return Segments; }
        public Route setSegments(ArrayList<RouteSegment> value) { this.Segments = value; return this; }
        public Integer getTotalTime() { return TotalTime; }
        public Route setTotalTime(Integer value) { this.TotalTime = value; return this; }
        public Double getTotalDistance() { return TotalDistance; }
        public Route setTotalDistance(Double value) { this.TotalDistance = value; return this; }
        public ArrayList<RouteNode> getNodes() { return Nodes; }
        public Route setNodes(ArrayList<RouteNode> value) { this.Nodes = value; return this; }
    }

    public static class RouteSegment
    {
        public Integer Time = null;
        public Double Distance = null;
        public String Start = null;
        public String End = null;
        public ArrayList<Location> Geometry = null;
        public ArrayList<String> DrivingDirections = null;
        public RouteNode EndNode = null;
        
        public Integer getTime() { return Time; }
        public RouteSegment setTime(Integer value) { this.Time = value; return this; }
        public Double getDistance() { return Distance; }
        public RouteSegment setDistance(Double value) { this.Distance = value; return this; }
        public String getStart() { return Start; }
        public RouteSegment setStart(String value) { this.Start = value; return this; }
        public String getEnd() { return End; }
        public RouteSegment setEnd(String value) { this.End = value; return this; }
        public ArrayList<Location> getGeometry() { return Geometry; }
        public RouteSegment setGeometry(ArrayList<Location> value) { this.Geometry = value; return this; }
        public ArrayList<String> getDrivingDirections() { return DrivingDirections; }
        public RouteSegment setDrivingDirections(ArrayList<String> value) { this.DrivingDirections = value; return this; }
        public RouteNode getEndNode() { return EndNode; }
        public RouteSegment setEndNode(RouteNode value) { this.EndNode = value; return this; }
    }

    public static class Location
    {
        public Double y = null;
        public Double x = null;
        
        public Double getY() { return y; }
        public Location setY(Double value) { this.y = value; return this; }
        public Double getX() { return x; }
        public Location setX(Double value) { this.x = value; return this; }
    }

    public static class RouteNode extends ClassedItem
    {
        public Location Location = null;
        public Integer StopTime = null;
        public Schedule Schedule = null;
        public String Name = null;
        
        public Location getLocation() { return Location; }
        public RouteNode setLocation(Location value) { this.Location = value; return this; }
        public Integer getStopTime() { return StopTime; }
        public RouteNode setStopTime(Integer value) { this.StopTime = value; return this; }
        public Schedule getSchedule() { return Schedule; }
        public RouteNode setSchedule(Schedule value) { this.Schedule = value; return this; }
        public String getName() { return Name; }
        public RouteNode setName(String value) { this.Name = value; return this; }
    }

    public static class ClassedItem
    {
        public String ObjectId = null;
        public String Class = null;
        public String VersionId = null;
        public ArrayList<String> Ancestors = null;
        public String Type = null;
        
        public String getObjectId() { return ObjectId; }
        public ClassedItem setObjectId(String value) { this.ObjectId = value; return this; }
        public String getClass() { return Class; }
        public ClassedItem setClass(String value) { this.Class = value; return this; }
        public String getVersionId() { return VersionId; }
        public ClassedItem setVersionId(String value) { this.VersionId = value; return this; }
        public ArrayList<String> getAncestors() { return Ancestors; }
        public ClassedItem setAncestors(ArrayList<String> value) { this.Ancestors = value; return this; }
        public String getType() { return Type; }
        public ClassedItem setType(String value) { this.Type = value; return this; }
    }

    public static class Schedule
    {
        public String Workspace = null;
        public String ObjectId = null;
        public String VersionId = null;
        public String BasedOn = null;
        public String Start = null;
        public String End = null;
        public String TimeZone = null;
        public ArrayList<String> Users = null;
        public ArrayList<String> Teams = null;
        public HashMap<String,Object> Data = null;
        
        public String getWorkspace() { return Workspace; }
        public Schedule setWorkspace(String value) { this.Workspace = value; return this; }
        public String getObjectId() { return ObjectId; }
        public Schedule setObjectId(String value) { this.ObjectId = value; return this; }
        public String getVersionId() { return VersionId; }
        public Schedule setVersionId(String value) { this.VersionId = value; return this; }
        public String getBasedOn() { return BasedOn; }
        public Schedule setBasedOn(String value) { this.BasedOn = value; return this; }
        public String getStart() { return Start; }
        public Schedule setStart(String value) { this.Start = value; return this; }
        public String getEnd() { return End; }
        public Schedule setEnd(String value) { this.End = value; return this; }
        public String getTimeZone() { return TimeZone; }
        public Schedule setTimeZone(String value) { this.TimeZone = value; return this; }
        public ArrayList<String> getUsers() { return Users; }
        public Schedule setUsers(ArrayList<String> value) { this.Users = value; return this; }
        public ArrayList<String> getTeams() { return Teams; }
        public Schedule setTeams(ArrayList<String> value) { this.Teams = value; return this; }
        public HashMap<String,Object> getData() { return Data; }
        public Schedule setData(HashMap<String,Object> value) { this.Data = value; return this; }
    }

}

Java RouteList DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /{Workspace}/RouteList HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/xml