Field Squared API Services

<back to all web services

TotalTimeOnSite

The following routes are available for this service:
GET/{Workspace}/TotalTimeOnSite/{StartDate}/{EndDate}
GET/{Workspace}/TotalTimeOnSite/{StartDate}/{EndDate}/{Recipient}
import 'package:servicestack/servicestack.dart';

class TotalTimeOnSite implements IConvertible
{
    String? Date;
    String? Workspace;
    String? Recipient;
    String? StartDate;
    String? EndDate;

    TotalTimeOnSite({this.Date,this.Workspace,this.Recipient,this.StartDate,this.EndDate});
    TotalTimeOnSite.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Date = json['Date'];
        Workspace = json['Workspace'];
        Recipient = json['Recipient'];
        StartDate = json['StartDate'];
        EndDate = json['EndDate'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Date': Date,
        'Workspace': Workspace,
        'Recipient': Recipient,
        'StartDate': StartDate,
        'EndDate': EndDate
    };

    getTypeName() => "TotalTimeOnSite";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev.fieldsquared.com', types: <String, TypeInfo> {
    'TotalTimeOnSite': TypeInfo(TypeOf.Class, create:() => TotalTimeOnSite()),
});

Dart TotalTimeOnSite DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /{Workspace}/TotalTimeOnSite/{StartDate}/{EndDate} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/jsv