| POST,OPTIONS | /v1/dashboard/project |
|---|
import Foundation
import ServiceStack
public class ProjectDashRequest : Codable
{
public var fromDate:Date
public var toDate:Date
required public init(){}
}
public class ProjectDashResponse : Codable
{
public var responseStatus:ResponseStatus
public var stats:[DashboardStatTile] = []
public var jobStatus:DashboardSeries
public var throughput:DashboardSeries
public var cycleDistribution:DashboardSeries
public var bottleneck:DashboardSeries
public var overdueJobs:[ProjectDashOverdueRow] = []
public var rollup:[ProjectDashRollupRow] = []
required public init(){}
}
public class DashboardStatTile : Codable
{
public var key:String
public var label:String
public var value:Double
public var previousValue:Double?
public var unit:String
public var deltaPct:Double?
required public init(){}
}
public class DashboardSeries : Codable
{
public var name:String
public var points:[DashboardSeriesPoint] = []
required public init(){}
}
public class DashboardSeriesPoint : Codable
{
public var label:String
public var value:Double
required public init(){}
}
public class ProjectDashOverdueRow : Codable
{
public var projectName:String
public var jobName:String
public var expectedCompletionDate:String
public var daysOverdue:Int
public var isAtRisk:Bool
required public init(){}
}
public class ProjectDashRollupRow : Codable
{
public var projectName:String
public var statusName:String
public var jobCount:Int
public var completedJobCount:Int
public var taskPct:Double
public var milestonePct:Double
required public init(){}
}
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/project 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
}
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
}
],
JobStatus:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
Throughput:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
CycleDistribution:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
Bottleneck:
{
Name: String,
Points:
[
{
Label: String,
Value: 0
}
]
},
OverdueJobs:
[
{
ProjectName: String,
JobName: String,
ExpectedCompletionDate: String,
DaysOverdue: 0,
IsAtRisk: False
}
],
Rollup:
[
{
ProjectName: String,
StatusName: String,
JobCount: 0,
CompletedJobCount: 0,
TaskPct: 0,
MilestonePct: 0
}
]
}