Field Squared API Services

<back to all web services

FlexibleDataObject

Represents a set or rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.

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

/**
* Represents a set or rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.
*/
class FlexibleDataObject implements IConvertible
{
    String? Workspace;
    Map<String,String?>? Data;
    String? RequestData;
    Uint8List? RequestStream;
    bool? IsXml;

    FlexibleDataObject({this.Workspace,this.Data,this.RequestData,this.RequestStream,this.IsXml});
    FlexibleDataObject.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        Data = JsonConverters.toStringMap(json['Data']);
        RequestData = json['RequestData'];
        RequestStream = JsonConverters.fromJson(json['RequestStream'],'Uint8List',context!);
        IsXml = json['IsXml'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'Data': Data,
        'RequestData': RequestData,
        'RequestStream': JsonConverters.toJson(RequestStream,'Uint8List',context!),
        'IsXml': IsXml
    };

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

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

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

{"Workspace":"String","Data":{"String":"String"},"IsXml":false}