| GET | /{Workspace}/AssetVisits/{AssetId}/{Date} | ||
|---|---|---|---|
| GET | /{Workspace}/AssetVisits/{AssetId}/{StartDate}/{EndDate} |
import 'package:servicestack/servicestack.dart';
class AssetVisits implements IConvertible
{
String? Workspace;
String? AssetId;
String? Date;
String? StartDate;
String? EndDate;
AssetVisits({this.Workspace,this.AssetId,this.Date,this.StartDate,this.EndDate});
AssetVisits.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Workspace = json['Workspace'];
AssetId = json['AssetId'];
Date = json['Date'];
StartDate = json['StartDate'];
EndDate = json['EndDate'];
return this;
}
Map<String, dynamic> toJson() => {
'Workspace': Workspace,
'AssetId': AssetId,
'Date': Date,
'StartDate': StartDate,
'EndDate': EndDate
};
getTypeName() => "AssetVisits";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
'AssetVisits': TypeInfo(TypeOf.Class, create:() => AssetVisits()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /{Workspace}/AssetVisits/{AssetId}/{Date} HTTP/1.1
Host: dev.fieldsquared.com
Accept: text/csv