| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/DashboardAdmin/{DashboardItemId} | ||
|---|---|---|---|
| GET,PUT,POST,DELETE,OPTIONS | /v1/DashboardAdmin |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class DashboardItem implements IConvertible
{
int? ID;
DateTime? Date;
String? Title;
String? Message;
String? Author;
String? Hyperlink;
String? ThumbnailImage;
DateTime? StartDate;
DateTime? EndDate;
String? Type;
int? SortKey;
DashboardItem({this.ID,this.Date,this.Title,this.Message,this.Author,this.Hyperlink,this.ThumbnailImage,this.StartDate,this.EndDate,this.Type,this.SortKey});
DashboardItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Date = JsonConverters.fromJson(json['Date'],'DateTime',context!);
Title = json['Title'];
Message = json['Message'];
Author = json['Author'];
Hyperlink = json['Hyperlink'];
ThumbnailImage = json['ThumbnailImage'];
StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!);
EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!);
Type = json['Type'];
SortKey = json['SortKey'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Date': JsonConverters.toJson(Date,'DateTime',context!),
'Title': Title,
'Message': Message,
'Author': Author,
'Hyperlink': Hyperlink,
'ThumbnailImage': ThumbnailImage,
'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!),
'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!),
'Type': Type,
'SortKey': SortKey
};
getTypeName() => "DashboardItem";
TypeContext? context = _ctx;
}
class DashboardAdminRequest implements IConvertible
{
DashboardItem? DashboardItem;
String? DashboardItemId;
DashboardAdminRequest({this.DashboardItem,this.DashboardItemId});
DashboardAdminRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DashboardItem = JsonConverters.fromJson(json['DashboardItem'],'DashboardItem',context!);
DashboardItemId = json['DashboardItemId'];
return this;
}
Map<String, dynamic> toJson() => {
'DashboardItem': JsonConverters.toJson(DashboardItem,'DashboardItem',context!),
'DashboardItemId': DashboardItemId
};
getTypeName() => "DashboardAdminRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'DashboardItem': TypeInfo(TypeOf.Class, create:() => DashboardItem()),
'DashboardAdminRequest': TypeInfo(TypeOf.Class, create:() => DashboardAdminRequest()),
});
Dart DashboardAdminRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/DashboardAdmin HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"DashboardItem":{"ID":0,"Date":"0001-01-01T00:00:00.0000000","Title":"String","Message":"String","Author":"String","Hyperlink":"String","ThumbnailImage":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","Type":"String","SortKey":0},"DashboardItemId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ID":0,"Date":"0001-01-01T00:00:00.0000000","Title":"String","Message":"String","Author":"String","Hyperlink":"String","ThumbnailImage":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","Type":"String","SortKey":0}