| Requires the role: | Admin | Requires the permission: | ReadData |
| GET | /stig/summary |
|---|
import 'package:servicestack/servicestack.dart';
class StigStreakView implements IConvertible
{
int? currentWeeks;
int? longestWeeks;
int? totalScanWeeks;
int? totalScans;
String? currentWeekKey;
String? lastScanWeekKey;
DateTime? lastScanUtc;
DateTime? currentStreakStartUtc;
bool? scannedThisWeek;
bool? atRisk;
StigStreakView({this.currentWeeks,this.longestWeeks,this.totalScanWeeks,this.totalScans,this.currentWeekKey,this.lastScanWeekKey,this.lastScanUtc,this.currentStreakStartUtc,this.scannedThisWeek,this.atRisk});
StigStreakView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
currentWeeks = json['currentWeeks'];
longestWeeks = json['longestWeeks'];
totalScanWeeks = json['totalScanWeeks'];
totalScans = json['totalScans'];
currentWeekKey = json['currentWeekKey'];
lastScanWeekKey = json['lastScanWeekKey'];
lastScanUtc = JsonConverters.fromJson(json['lastScanUtc'],'DateTime',context!);
currentStreakStartUtc = JsonConverters.fromJson(json['currentStreakStartUtc'],'DateTime',context!);
scannedThisWeek = json['scannedThisWeek'];
atRisk = json['atRisk'];
return this;
}
Map<String, dynamic> toJson() => {
'currentWeeks': currentWeeks,
'longestWeeks': longestWeeks,
'totalScanWeeks': totalScanWeeks,
'totalScans': totalScans,
'currentWeekKey': currentWeekKey,
'lastScanWeekKey': lastScanWeekKey,
'lastScanUtc': JsonConverters.toJson(lastScanUtc,'DateTime',context!),
'currentStreakStartUtc': JsonConverters.toJson(currentStreakStartUtc,'DateTime',context!),
'scannedThisWeek': scannedThisWeek,
'atRisk': atRisk
};
getTypeName() => "StigStreakView";
TypeContext? context = _ctx;
}
class StigLadderView implements IConvertible
{
List<int>? rungs;
int? rungsReached;
int? nextRung;
int? stigToNextRung;
int? progressBasisPoints;
StigLadderView({this.rungs,this.rungsReached,this.nextRung,this.stigToNextRung,this.progressBasisPoints});
StigLadderView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
rungs = JsonConverters.fromJson(json['rungs'],'List<int>',context!);
rungsReached = json['rungsReached'];
nextRung = json['nextRung'];
stigToNextRung = json['stigToNextRung'];
progressBasisPoints = json['progressBasisPoints'];
return this;
}
Map<String, dynamic> toJson() => {
'rungs': JsonConverters.toJson(rungs,'List<int>',context!),
'rungsReached': rungsReached,
'nextRung': nextRung,
'stigToNextRung': stigToNextRung,
'progressBasisPoints': progressBasisPoints
};
getTypeName() => "StigLadderView";
TypeContext? context = _ctx;
}
class StigSummaryResult implements IConvertible
{
String? fullPhoneNumber;
bool? known;
bool? excluded;
int? balance;
int? heldStig;
int? available;
int? lifetimeEarned;
DateTime? updatedUtc;
StigStreakView? streak;
StigLadderView? ladder;
int? statusCode;
String? message;
StigSummaryResult({this.fullPhoneNumber,this.known,this.excluded,this.balance,this.heldStig,this.available,this.lifetimeEarned,this.updatedUtc,this.streak,this.ladder,this.statusCode,this.message});
StigSummaryResult.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
fullPhoneNumber = json['fullPhoneNumber'];
known = json['known'];
excluded = json['excluded'];
balance = json['balance'];
heldStig = json['heldStig'];
available = json['available'];
lifetimeEarned = json['lifetimeEarned'];
updatedUtc = JsonConverters.fromJson(json['updatedUtc'],'DateTime',context!);
streak = JsonConverters.fromJson(json['streak'],'StigStreakView',context!);
ladder = JsonConverters.fromJson(json['ladder'],'StigLadderView',context!);
statusCode = json['statusCode'];
message = json['message'];
return this;
}
Map<String, dynamic> toJson() => {
'fullPhoneNumber': fullPhoneNumber,
'known': known,
'excluded': excluded,
'balance': balance,
'heldStig': heldStig,
'available': available,
'lifetimeEarned': lifetimeEarned,
'updatedUtc': JsonConverters.toJson(updatedUtc,'DateTime',context!),
'streak': JsonConverters.toJson(streak,'StigStreakView',context!),
'ladder': JsonConverters.toJson(ladder,'StigLadderView',context!),
'statusCode': statusCode,
'message': message
};
getTypeName() => "StigSummaryResult";
TypeContext? context = _ctx;
}
class StigSummaryRequest implements IConvertible
{
String? fullPhoneNumber;
StigSummaryRequest({this.fullPhoneNumber});
StigSummaryRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
fullPhoneNumber = json['fullPhoneNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'fullPhoneNumber': fullPhoneNumber
};
getTypeName() => "StigSummaryRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'stubbur_app.azurewebsites.net', types: <String, TypeInfo> {
'StigStreakView': TypeInfo(TypeOf.Class, create:() => StigStreakView()),
'StigLadderView': TypeInfo(TypeOf.Class, create:() => StigLadderView()),
'StigSummaryResult': TypeInfo(TypeOf.Class, create:() => StigSummaryResult()),
'StigSummaryRequest': TypeInfo(TypeOf.Class, create:() => StigSummaryRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /stig/summary HTTP/1.1 Host: stubbur-app.azurewebsites.net Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<StigSummaryResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<Available>0</Available>
<Balance>0</Balance>
<Excluded>false</Excluded>
<FullPhoneNumber>String</FullPhoneNumber>
<HeldStig>0</HeldStig>
<Known>false</Known>
<Ladder>
<NextRung>0</NextRung>
<ProgressBasisPoints>0</ProgressBasisPoints>
<Rungs xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:int>0</d3p1:int>
</Rungs>
<RungsReached>0</RungsReached>
<StigToNextRung>0</StigToNextRung>
</Ladder>
<LifetimeEarned>0</LifetimeEarned>
<Message>String</Message>
<StatusCode>0</StatusCode>
<Streak>
<AtRisk>false</AtRisk>
<CurrentStreakStartUtc>0001-01-01T00:00:00</CurrentStreakStartUtc>
<CurrentWeekKey>String</CurrentWeekKey>
<CurrentWeeks>0</CurrentWeeks>
<LastScanUtc>0001-01-01T00:00:00</LastScanUtc>
<LastScanWeekKey>String</LastScanWeekKey>
<LongestWeeks>0</LongestWeeks>
<ScannedThisWeek>false</ScannedThisWeek>
<TotalScanWeeks>0</TotalScanWeeks>
<TotalScans>0</TotalScans>
</Streak>
<UpdatedUtc>0001-01-01T00:00:00</UpdatedUtc>
</StigSummaryResult>