| GET | /v1/forms/{FormUID}/reports |
|---|
import 'package:servicestack/servicestack.dart';
class FormReportBar implements IConvertible
{
String? Id;
String? Label;
int? N;
double? Value;
String? Text;
String? Tone;
FormReportBar({this.Id,this.Label,this.N,this.Value,this.Text,this.Tone});
FormReportBar.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Label = json['Label'];
N = json['N'];
Value = JsonConverters.toDouble(json['Value']);
Text = json['Text'];
Tone = json['Tone'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Label': Label,
'N': N,
'Value': Value,
'Text': Text,
'Tone': Tone
};
getTypeName() => "FormReportBar";
TypeContext? context = _ctx;
}
class FormReportResponse implements IConvertible
{
int? Submissions;
int? Decided;
int? Approved;
String? RateText;
String? DecisionText;
int? Drafts;
int? Sla;
int? DraftDays;
bool? IsRecord;
List<FormReportBar>? Weeks = [];
List<FormReportBar>? Stages = [];
List<FormReportBar>? Pages = [];
int? Started;
int? SubmittedPct;
String? DropFrom;
int? DropN;
List<FormReportBar>? Durations = [];
List<FormReportBar>? Fields = [];
String? Field;
String? FieldLabel;
List<FormReportBar>? Options = [];
List<FormReportBar>? Reasons = [];
ResponseStatus? ResponseStatus;
FormReportResponse({this.Submissions,this.Decided,this.Approved,this.RateText,this.DecisionText,this.Drafts,this.Sla,this.DraftDays,this.IsRecord,this.Weeks,this.Stages,this.Pages,this.Started,this.SubmittedPct,this.DropFrom,this.DropN,this.Durations,this.Fields,this.Field,this.FieldLabel,this.Options,this.Reasons,this.ResponseStatus});
FormReportResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Submissions = json['Submissions'];
Decided = json['Decided'];
Approved = json['Approved'];
RateText = json['RateText'];
DecisionText = json['DecisionText'];
Drafts = json['Drafts'];
Sla = json['Sla'];
DraftDays = json['DraftDays'];
IsRecord = json['IsRecord'];
Weeks = JsonConverters.fromJson(json['Weeks'],'List<FormReportBar>',context!);
Stages = JsonConverters.fromJson(json['Stages'],'List<FormReportBar>',context!);
Pages = JsonConverters.fromJson(json['Pages'],'List<FormReportBar>',context!);
Started = json['Started'];
SubmittedPct = json['SubmittedPct'];
DropFrom = json['DropFrom'];
DropN = json['DropN'];
Durations = JsonConverters.fromJson(json['Durations'],'List<FormReportBar>',context!);
Fields = JsonConverters.fromJson(json['Fields'],'List<FormReportBar>',context!);
Field = json['Field'];
FieldLabel = json['FieldLabel'];
Options = JsonConverters.fromJson(json['Options'],'List<FormReportBar>',context!);
Reasons = JsonConverters.fromJson(json['Reasons'],'List<FormReportBar>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Submissions': Submissions,
'Decided': Decided,
'Approved': Approved,
'RateText': RateText,
'DecisionText': DecisionText,
'Drafts': Drafts,
'Sla': Sla,
'DraftDays': DraftDays,
'IsRecord': IsRecord,
'Weeks': JsonConverters.toJson(Weeks,'List<FormReportBar>',context!),
'Stages': JsonConverters.toJson(Stages,'List<FormReportBar>',context!),
'Pages': JsonConverters.toJson(Pages,'List<FormReportBar>',context!),
'Started': Started,
'SubmittedPct': SubmittedPct,
'DropFrom': DropFrom,
'DropN': DropN,
'Durations': JsonConverters.toJson(Durations,'List<FormReportBar>',context!),
'Fields': JsonConverters.toJson(Fields,'List<FormReportBar>',context!),
'Field': Field,
'FieldLabel': FieldLabel,
'Options': JsonConverters.toJson(Options,'List<FormReportBar>',context!),
'Reasons': JsonConverters.toJson(Reasons,'List<FormReportBar>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormReportResponse";
TypeContext? context = _ctx;
}
class FormReportRequest implements IConvertible
{
String? FormUID;
String? Field;
FormReportRequest({this.FormUID,this.Field});
FormReportRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
Field = json['Field'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID,
'Field': Field
};
getTypeName() => "FormReportRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormReportBar': TypeInfo(TypeOf.Class, create:() => FormReportBar()),
'FormReportResponse': TypeInfo(TypeOf.Class, create:() => FormReportResponse()),
'List<FormReportBar>': TypeInfo(TypeOf.Class, create:() => <FormReportBar>[]),
'FormReportRequest': TypeInfo(TypeOf.Class, create:() => FormReportRequest()),
});
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.
GET /v1/forms/{FormUID}/reports HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Submissions":0,"Decided":0,"Approved":0,"RateText":"String","DecisionText":"String","Drafts":0,"Sla":0,"DraftDays":0,"IsRecord":false,"Weeks":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Stages":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Pages":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Started":0,"SubmittedPct":0,"DropFrom":"String","DropN":0,"Durations":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Fields":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Field":"String","FieldLabel":"String","Options":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"Reasons":[{"Id":"String","Label":"String","N":0,"Value":0,"Text":"String","Tone":"String"}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}