Field Squared API Services

<back to all web services

Feedback

Contains the data for a feedback object within the system

The following routes are available for this service:
GET,POST,PUT,DELETE/{Workspace}/Feedback/{ObjectId}
import 'package:servicestack/servicestack.dart';

class DomainItem implements IConvertible
{
    String? Workspace;
    String? ObjectId;
    String? VersionId;
    String? LastUpdated;

    DomainItem({this.Workspace,this.ObjectId,this.VersionId,this.LastUpdated});
    DomainItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Workspace = json['Workspace'];
        ObjectId = json['ObjectId'];
        VersionId = json['VersionId'];
        LastUpdated = json['LastUpdated'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Workspace': Workspace,
        'ObjectId': ObjectId,
        'VersionId': VersionId,
        'LastUpdated': LastUpdated
    };

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

/**
* Contains the data for a feedback object within the system
*/
class Feedback implements IConvertible
{
    String? ObjectId;
    String? VersionId;
    String? BasedOn;
    DateTime? SubmitDate;
    String? Description;
    DomainItem? User;
    String? Workspace;

    Feedback({this.ObjectId,this.VersionId,this.BasedOn,this.SubmitDate,this.Description,this.User,this.Workspace});
    Feedback.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ObjectId = json['ObjectId'];
        VersionId = json['VersionId'];
        BasedOn = json['BasedOn'];
        SubmitDate = JsonConverters.fromJson(json['SubmitDate'],'DateTime',context!);
        Description = json['Description'];
        User = JsonConverters.fromJson(json['User'],'DomainItem',context!);
        Workspace = json['Workspace'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ObjectId': ObjectId,
        'VersionId': VersionId,
        'BasedOn': BasedOn,
        'SubmitDate': JsonConverters.toJson(SubmitDate,'DateTime',context!),
        'Description': Description,
        'User': JsonConverters.toJson(User,'DomainItem',context!),
        'Workspace': Workspace
    };

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

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

Dart Feedback 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.

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

{
	ObjectId: String,
	VersionId: String,
	BasedOn: String,
	SubmitDate: 0001-01-01,
	Description: String,
	User: 
	{
		Workspace: String,
		ObjectId: String,
		VersionId: String,
		LastUpdated: String
	},
	Workspace: String
}