Field Squared API Services

<back to all web services

EsriImport

Bulk import a set of assets from an ESRI shape file..

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

/**
* Bulk import a set of assets from an ESRI shape file..
*/
class EsriImport implements IConvertible
{
    String? Workspace;
    String? Id;
    String? Type;
    String? Parent;
    Map<String,String?>? Mappings;

    EsriImport({this.Workspace,this.Id,this.Type,this.Parent,this.Mappings});
    EsriImport.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        Id = json['Id'];
        Type = json['Type'];
        Parent = json['Parent'];
        Mappings = JsonConverters.toStringMap(json['Mappings']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'Id': Id,
        'Type': Type,
        'Parent': Parent,
        'Mappings': Mappings
    };

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

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

Dart EsriImport 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}/EsriImport HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Workspace":"String","Id":"String","Type":"String","Parent":"String","Mappings":{"String":"String"}}