| POST,OPTIONS | /v1/dashboard/project |
|---|
import 'package:servicestack/servicestack.dart';
class DashboardStatTile implements IConvertible
{
String? Key;
String? Label;
double? Value;
double? PreviousValue;
String? Unit;
double? DeltaPct;
DashboardStatTile({this.Key,this.Label,this.Value,this.PreviousValue,this.Unit,this.DeltaPct});
DashboardStatTile.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Label = json['Label'];
Value = JsonConverters.toDouble(json['Value']);
PreviousValue = JsonConverters.toDouble(json['PreviousValue']);
Unit = json['Unit'];
DeltaPct = JsonConverters.toDouble(json['DeltaPct']);
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Label': Label,
'Value': Value,
'PreviousValue': PreviousValue,
'Unit': Unit,
'DeltaPct': DeltaPct
};
getTypeName() => "DashboardStatTile";
TypeContext? context = _ctx;
}
class DashboardSeriesPoint implements IConvertible
{
String? Label;
double? Value;
DashboardSeriesPoint({this.Label,this.Value});
DashboardSeriesPoint.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Label = json['Label'];
Value = JsonConverters.toDouble(json['Value']);
return this;
}
Map<String, dynamic> toJson() => {
'Label': Label,
'Value': Value
};
getTypeName() => "DashboardSeriesPoint";
TypeContext? context = _ctx;
}
class DashboardSeries implements IConvertible
{
String? Name;
List<DashboardSeriesPoint>? Points = [];
DashboardSeries({this.Name,this.Points});
DashboardSeries.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Points = JsonConverters.fromJson(json['Points'],'List<DashboardSeriesPoint>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Points': JsonConverters.toJson(Points,'List<DashboardSeriesPoint>',context!)
};
getTypeName() => "DashboardSeries";
TypeContext? context = _ctx;
}
class ProjectDashOverdueRow implements IConvertible
{
String? ProjectName;
String? JobName;
String? ExpectedCompletionDate;
int? DaysOverdue;
bool? IsAtRisk;
ProjectDashOverdueRow({this.ProjectName,this.JobName,this.ExpectedCompletionDate,this.DaysOverdue,this.IsAtRisk});
ProjectDashOverdueRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectName = json['ProjectName'];
JobName = json['JobName'];
ExpectedCompletionDate = json['ExpectedCompletionDate'];
DaysOverdue = json['DaysOverdue'];
IsAtRisk = json['IsAtRisk'];
return this;
}
Map<String, dynamic> toJson() => {
'ProjectName': ProjectName,
'JobName': JobName,
'ExpectedCompletionDate': ExpectedCompletionDate,
'DaysOverdue': DaysOverdue,
'IsAtRisk': IsAtRisk
};
getTypeName() => "ProjectDashOverdueRow";
TypeContext? context = _ctx;
}
class ProjectDashRollupRow implements IConvertible
{
String? ProjectName;
String? StatusName;
int? JobCount;
int? CompletedJobCount;
double? TaskPct;
double? MilestonePct;
ProjectDashRollupRow({this.ProjectName,this.StatusName,this.JobCount,this.CompletedJobCount,this.TaskPct,this.MilestonePct});
ProjectDashRollupRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ProjectName = json['ProjectName'];
StatusName = json['StatusName'];
JobCount = json['JobCount'];
CompletedJobCount = json['CompletedJobCount'];
TaskPct = JsonConverters.toDouble(json['TaskPct']);
MilestonePct = JsonConverters.toDouble(json['MilestonePct']);
return this;
}
Map<String, dynamic> toJson() => {
'ProjectName': ProjectName,
'StatusName': StatusName,
'JobCount': JobCount,
'CompletedJobCount': CompletedJobCount,
'TaskPct': TaskPct,
'MilestonePct': MilestonePct
};
getTypeName() => "ProjectDashRollupRow";
TypeContext? context = _ctx;
}
class ProjectDashResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<DashboardStatTile>? Stats = [];
DashboardSeries? JobStatus;
DashboardSeries? Throughput;
DashboardSeries? CycleDistribution;
DashboardSeries? Bottleneck;
List<ProjectDashOverdueRow>? OverdueJobs = [];
List<ProjectDashRollupRow>? Rollup = [];
ProjectDashResponse({this.ResponseStatus,this.Stats,this.JobStatus,this.Throughput,this.CycleDistribution,this.Bottleneck,this.OverdueJobs,this.Rollup});
ProjectDashResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Stats = JsonConverters.fromJson(json['Stats'],'List<DashboardStatTile>',context!);
JobStatus = JsonConverters.fromJson(json['JobStatus'],'DashboardSeries',context!);
Throughput = JsonConverters.fromJson(json['Throughput'],'DashboardSeries',context!);
CycleDistribution = JsonConverters.fromJson(json['CycleDistribution'],'DashboardSeries',context!);
Bottleneck = JsonConverters.fromJson(json['Bottleneck'],'DashboardSeries',context!);
OverdueJobs = JsonConverters.fromJson(json['OverdueJobs'],'List<ProjectDashOverdueRow>',context!);
Rollup = JsonConverters.fromJson(json['Rollup'],'List<ProjectDashRollupRow>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Stats': JsonConverters.toJson(Stats,'List<DashboardStatTile>',context!),
'JobStatus': JsonConverters.toJson(JobStatus,'DashboardSeries',context!),
'Throughput': JsonConverters.toJson(Throughput,'DashboardSeries',context!),
'CycleDistribution': JsonConverters.toJson(CycleDistribution,'DashboardSeries',context!),
'Bottleneck': JsonConverters.toJson(Bottleneck,'DashboardSeries',context!),
'OverdueJobs': JsonConverters.toJson(OverdueJobs,'List<ProjectDashOverdueRow>',context!),
'Rollup': JsonConverters.toJson(Rollup,'List<ProjectDashRollupRow>',context!)
};
getTypeName() => "ProjectDashResponse";
TypeContext? context = _ctx;
}
class ProjectDashRequest implements IConvertible
{
DateTime? FromDate;
DateTime? ToDate;
ProjectDashRequest({this.FromDate,this.ToDate});
ProjectDashRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FromDate = JsonConverters.fromJson(json['FromDate'],'DateTime',context!);
ToDate = JsonConverters.fromJson(json['ToDate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'FromDate': JsonConverters.toJson(FromDate,'DateTime',context!),
'ToDate': JsonConverters.toJson(ToDate,'DateTime',context!)
};
getTypeName() => "ProjectDashRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DashboardStatTile': TypeInfo(TypeOf.Class, create:() => DashboardStatTile()),
'DashboardSeriesPoint': TypeInfo(TypeOf.Class, create:() => DashboardSeriesPoint()),
'DashboardSeries': TypeInfo(TypeOf.Class, create:() => DashboardSeries()),
'List<DashboardSeriesPoint>': TypeInfo(TypeOf.Class, create:() => <DashboardSeriesPoint>[]),
'ProjectDashOverdueRow': TypeInfo(TypeOf.Class, create:() => ProjectDashOverdueRow()),
'ProjectDashRollupRow': TypeInfo(TypeOf.Class, create:() => ProjectDashRollupRow()),
'ProjectDashResponse': TypeInfo(TypeOf.Class, create:() => ProjectDashResponse()),
'List<DashboardStatTile>': TypeInfo(TypeOf.Class, create:() => <DashboardStatTile>[]),
'List<ProjectDashOverdueRow>': TypeInfo(TypeOf.Class, create:() => <ProjectDashOverdueRow>[]),
'List<ProjectDashRollupRow>': TypeInfo(TypeOf.Class, create:() => <ProjectDashRollupRow>[]),
'ProjectDashRequest': TypeInfo(TypeOf.Class, create:() => ProjectDashRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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/jsonl
Content-Type: text/jsonl
Content-Length: length
{"FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
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","DeltaPct":null}],"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}]}