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: 'sfgboxapi.dev.scadsoftware.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 .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 /system_entities HTTP/1.1 
Host: sfgboxapi.dev.scadsoftware.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	entity: String,
	longDescription: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
		}
	}
}