| POST,OPTIONS | /v1/dashboard/kpiv2 |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class KpiV2Request
{
public Date FromDate = null;
public Date ToDate = null;
public ArrayList<UUID> LocationIds = new ArrayList<UUID>();
public Date getFromDate() { return FromDate; }
public KpiV2Request setFromDate(Date value) { this.FromDate = value; return this; }
public Date getToDate() { return ToDate; }
public KpiV2Request setToDate(Date value) { this.ToDate = value; return this; }
public ArrayList<UUID> getLocationIds() { return LocationIds; }
public KpiV2Request setLocationIds(ArrayList<UUID> value) { this.LocationIds = value; return this; }
}
public static class KpiV2Response
{
public ResponseStatus ResponseStatus = null;
public ArrayList<DashboardStatTile> Stats = new ArrayList<DashboardStatTile>();
public ArrayList<DashboardSeries> Trend = new ArrayList<DashboardSeries>();
public DashboardSeries ServicesByType = null;
public ArrayList<KpiV2LocationRow> LocationLeaderboard = new ArrayList<KpiV2LocationRow>();
public ArrayList<KpiV2WorkerRow> WorkerProductivity = new ArrayList<KpiV2WorkerRow>();
public ArrayList<KpiV2HeatPoint> Heatmap = new ArrayList<KpiV2HeatPoint>();
public ArrayList<KpiV2LiveRow> LiveQueue = new ArrayList<KpiV2LiveRow>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public KpiV2Response setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<DashboardStatTile> getStats() { return Stats; }
public KpiV2Response setStats(ArrayList<DashboardStatTile> value) { this.Stats = value; return this; }
public ArrayList<DashboardSeries> getTrend() { return Trend; }
public KpiV2Response setTrend(ArrayList<DashboardSeries> value) { this.Trend = value; return this; }
public DashboardSeries getServicesByType() { return ServicesByType; }
public KpiV2Response setServicesByType(DashboardSeries value) { this.ServicesByType = value; return this; }
public ArrayList<KpiV2LocationRow> getLocationLeaderboard() { return LocationLeaderboard; }
public KpiV2Response setLocationLeaderboard(ArrayList<KpiV2LocationRow> value) { this.LocationLeaderboard = value; return this; }
public ArrayList<KpiV2WorkerRow> getWorkerProductivity() { return WorkerProductivity; }
public KpiV2Response setWorkerProductivity(ArrayList<KpiV2WorkerRow> value) { this.WorkerProductivity = value; return this; }
public ArrayList<KpiV2HeatPoint> getHeatmap() { return Heatmap; }
public KpiV2Response setHeatmap(ArrayList<KpiV2HeatPoint> value) { this.Heatmap = value; return this; }
public ArrayList<KpiV2LiveRow> getLiveQueue() { return LiveQueue; }
public KpiV2Response setLiveQueue(ArrayList<KpiV2LiveRow> value) { this.LiveQueue = value; return this; }
}
public static class DashboardStatTile
{
public String Key = null;
public String Label = null;
public Double Value = null;
public Double PreviousValue = null;
public String Unit = null;
public Double DeltaPct = null;
public String getKey() { return Key; }
public DashboardStatTile setKey(String value) { this.Key = value; return this; }
public String getLabel() { return Label; }
public DashboardStatTile setLabel(String value) { this.Label = value; return this; }
public Double getValue() { return Value; }
public DashboardStatTile setValue(Double value) { this.Value = value; return this; }
public Double getPreviousValue() { return PreviousValue; }
public DashboardStatTile setPreviousValue(Double value) { this.PreviousValue = value; return this; }
public String getUnit() { return Unit; }
public DashboardStatTile setUnit(String value) { this.Unit = value; return this; }
public Double getDeltaPct() { return DeltaPct; }
public DashboardStatTile setDeltaPct(Double value) { this.DeltaPct = value; return this; }
}
public static class DashboardSeries
{
public String Name = null;
public ArrayList<DashboardSeriesPoint> Points = new ArrayList<DashboardSeriesPoint>();
public String getName() { return Name; }
public DashboardSeries setName(String value) { this.Name = value; return this; }
public ArrayList<DashboardSeriesPoint> getPoints() { return Points; }
public DashboardSeries setPoints(ArrayList<DashboardSeriesPoint> value) { this.Points = value; return this; }
}
public static class DashboardSeriesPoint
{
public String Label = null;
public Double Value = null;
public String getLabel() { return Label; }
public DashboardSeriesPoint setLabel(String value) { this.Label = value; return this; }
public Double getValue() { return Value; }
public DashboardSeriesPoint setValue(Double value) { this.Value = value; return this; }
}
public static class KpiV2LocationRow
{
public String LocationName = null;
public Integer Walkins = null;
public Integer Completed = null;
public Double AvgServiceMinutes = null;
public Double AbandonmentPct = null;
public String getLocationName() { return LocationName; }
public KpiV2LocationRow setLocationName(String value) { this.LocationName = value; return this; }
public Integer getWalkins() { return Walkins; }
public KpiV2LocationRow setWalkins(Integer value) { this.Walkins = value; return this; }
public Integer getCompleted() { return Completed; }
public KpiV2LocationRow setCompleted(Integer value) { this.Completed = value; return this; }
public Double getAvgServiceMinutes() { return AvgServiceMinutes; }
public KpiV2LocationRow setAvgServiceMinutes(Double value) { this.AvgServiceMinutes = value; return this; }
public Double getAbandonmentPct() { return AbandonmentPct; }
public KpiV2LocationRow setAbandonmentPct(Double value) { this.AbandonmentPct = value; return this; }
}
public static class KpiV2WorkerRow
{
public String WorkerName = null;
public Integer Completed = null;
public Double AvgServiceMinutes = null;
public String getWorkerName() { return WorkerName; }
public KpiV2WorkerRow setWorkerName(String value) { this.WorkerName = value; return this; }
public Integer getCompleted() { return Completed; }
public KpiV2WorkerRow setCompleted(Integer value) { this.Completed = value; return this; }
public Double getAvgServiceMinutes() { return AvgServiceMinutes; }
public KpiV2WorkerRow setAvgServiceMinutes(Double value) { this.AvgServiceMinutes = value; return this; }
}
public static class KpiV2HeatPoint
{
public Integer Dow = null;
public Integer Hr = null;
public Integer Cnt = null;
public Integer getDow() { return Dow; }
public KpiV2HeatPoint setDow(Integer value) { this.Dow = value; return this; }
public Integer getHr() { return Hr; }
public KpiV2HeatPoint setHr(Integer value) { this.Hr = value; return this; }
public Integer getCnt() { return Cnt; }
public KpiV2HeatPoint setCnt(Integer value) { this.Cnt = value; return this; }
}
public static class KpiV2LiveRow
{
public String LocationName = null;
public Integer Waiting = null;
public Integer InProgress = null;
public String getLocationName() { return LocationName; }
public KpiV2LiveRow setLocationName(String value) { this.LocationName = value; return this; }
public Integer getWaiting() { return Waiting; }
public KpiV2LiveRow setWaiting(Integer value) { this.Waiting = value; return this; }
public Integer getInProgress() { return InProgress; }
public KpiV2LiveRow setInProgress(Integer value) { this.InProgress = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/kpiv2 HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
FromDate: 0001-01-01,
ToDate: 0001-01-01,
LocationIds:
[
00000000000000000000000000000000
]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
Stats:
[
{
Key: String,
Label: String,
Value: 0,
PreviousValue: 0,
Unit: String
}
],
Trend:
[
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
}
],
ServicesByType:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
LocationLeaderboard:
[
{
LocationName: String,
Walkins: 0,
Completed: 0,
AvgServiceMinutes: 0,
AbandonmentPct: 0
}
],
WorkerProductivity:
[
{
WorkerName: String,
Completed: 0,
AvgServiceMinutes: 0
}
],
Heatmap:
[
{
Dow: 0,
Hr: 0,
Cnt: 0
}
],
LiveQueue:
[
{
LocationName: String,
Waiting: 0,
InProgress: 0
}
]
}