| POST | /App/AmwTabletBackup |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
// @DataContract
abstract class Eras2AppServiceModelBase
{
// @DataMember(Name="UserId")
String? UserId;
Eras2AppServiceModelBase({this.UserId});
Eras2AppServiceModelBase.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['userId'];
return this;
}
Map<String, dynamic> toJson() => {
'userId': UserId
};
getTypeName() => "Eras2AppServiceModelBase";
TypeContext? context = _ctx;
}
class AddFullBackupResponse implements IConvertible
{
ResponseStatus? responseStatus;
AddFullBackupResponse({this.responseStatus});
AddFullBackupResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "AddFullBackupResponse";
TypeContext? context = _ctx;
}
// @DataContract
class AddFullBackup extends Eras2AppServiceModelBase implements IConvertible
{
AddFullBackup();
AddFullBackup.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "AddFullBackup";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'calotec_portal_servamw.eras_online.de', types: <String, TypeInfo> {
'Eras2AppServiceModelBase': TypeInfo(TypeOf.AbstractClass),
'AddFullBackupResponse': TypeInfo(TypeOf.Class, create:() => AddFullBackupResponse()),
'AddFullBackup': TypeInfo(TypeOf.Class, create:() => AddFullBackup()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /App/AmwTabletBackup HTTP/1.1
Host: calotec-portal-servamw.eras-online.de
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
UserId: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
responseStatus:
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}
}