Field Squared API Services

<back to all web services

AssetVisits

The following routes are available for this service:
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()),
});

Dart AssetVisits 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

HTTP + JSON

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: application/json