Field Squared API Services

<back to all web services

GpxUpload

Bulk upload a GPX file for later import..

The following routes are available for this service:
POST/{Workspace}/GpxUpload
import 'package:servicestack/servicestack.dart';

/**
* Bulk upload a GPX file for later import..
*/
class GpxUpload implements IConvertible
{
    String? Workspace;
    String? Id;
    List<String>? Columns;
    int? RowCount;

    GpxUpload({this.Workspace,this.Id,this.Columns,this.RowCount});
    GpxUpload.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        Id = json['Id'];
        Columns = JsonConverters.fromJson(json['Columns'],'List<String>',context!);
        RowCount = json['RowCount'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'Id': Id,
        'Columns': JsonConverters.toJson(Columns,'List<String>',context!),
        'RowCount': RowCount
    };

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

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

Dart GpxUpload DTOs

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

HTTP + CSV

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

POST /{Workspace}/GpxUpload HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Workspace":"String","Id":"String","Columns":["String"],"RowCount":0}