sfgboxapi

<back to all web services

SystemEntitiesAdd

Requires Authentication
The following routes are available for this service:
POST/system_entities
import 'package:servicestack/servicestack.dart';

class SystemEntitiesAddResponse implements IConvertible
{
    // @DataMember(Order=2)
    String? entity;

    // @DataMember(Order=3)
    String? longDescription;

    // @DataMember(Order=5)
    ResponseStatus? responseStatus;

    SystemEntitiesAddResponse({this.entity,this.longDescription,this.responseStatus});
    SystemEntitiesAddResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        entity = json['entity'];
        longDescription = json['longDescription'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'entity': entity,
        'longDescription': longDescription,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

// @DataContract
class SystemEntitiesAdd implements IConvertible
{
    // @DataMember(Order=2)
    // @Validate(Validator="NotNull")
    String? entity;

    // @DataMember(Order=3)
    // @Validate(Validator="NotNull")
    String? longDescription;

    SystemEntitiesAdd({this.entity,this.longDescription});
    SystemEntitiesAdd.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        entity = json['entity'];
        longDescription = json['longDescription'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'entity': entity,
        'longDescription': longDescription
    };

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

TypeContext _ctx = TypeContext(library: 'api.sfgtec.com', types: <String, TypeInfo> {
    'SystemEntitiesAddResponse': TypeInfo(TypeOf.Class, create:() => SystemEntitiesAddResponse()),
    'SystemEntitiesAdd': TypeInfo(TypeOf.Class, create:() => SystemEntitiesAdd()),
});

Dart SystemEntitiesAdd 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 /system_entities HTTP/1.1 
Host: api.sfgtec.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"entity":"String","longDescription":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"entity":"String","longDescription":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}